* Alignment, indenting and font inside floats
@ 2014-07-28 19:29 Joshua Krämer
2014-07-28 21:23 ` Rik Kabel
0 siblings, 1 reply; 4+ messages in thread
From: Joshua Krämer @ 2014-07-28 19:29 UTC (permalink / raw)
To: ntg-context-wvrSQK3plZs
Dear list,
I want to setup all my floats' contents to be middle-aligned, not
indented and typeset in a distinct font. How can I do this? The
attached example does not work.
Thank you and kind regards,
Joshua Krämer
\setupindenting [yes, \the\baselineskip]
\definefontfamily [figurefamily] [serif] [Latin Modern Sans]
\setupfloats [align=middle, style={\switchtobodyfont[figurefamily]},
indenting=no]
\starttext
\input knuth
\startplacefigure
Word
\stopplacefigure
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Alignment, indenting and font inside floats
2014-07-28 19:29 Alignment, indenting and font inside floats Joshua Krämer
@ 2014-07-28 21:23 ` Rik Kabel
2014-07-28 21:45 ` Rik Kabel
2014-07-29 19:57 ` Joshua Krämer
0 siblings, 2 replies; 4+ messages in thread
From: Rik Kabel @ 2014-07-28 21:23 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1851 bytes --]
On 2014-07-28 15:29, Joshua Krämer wrote:
> Dear list,
>
> I want to setup all my floats' contents to be middle-aligned, not
> indented and typeset in a distinct font. How can I do this? The
> attached example does not work.
>
> Thank you and kind regards,
> Joshua Krämer
>
>
> \setupindenting [yes, \the\baselineskip]
> \definefontfamily [figurefamily] [serif] [Latin Modern Sans]
> \setupfloats [align=middle, style={\switchtobodyfont[figurefamily]},
> indenting=no]
>
> \starttext
> \input knuth
>
> \startplacefigure
> Word
> \stopplacefigure
>
> \stoptext
>
>
\setupexternalfigures[location={local,default}]
\setupindenting [yes, \the\baselineskip]
%\definefontfamily [figurefamily] [serif] [Latin Modern Sans]
%\setupfloats [align=middle,
style={\switchtobodyfont[figurefamily]}, indenting=no]
\setupcaptions [style=ss]
\setupframed[style=it]
\starttext
\input knuth
\startplacefigure[title={Not a figure}]
Word
\stopplacefigure
\startplacetable[title={A table}]
\starttable[||]
\NC Table\NC\NR
\stoptable
\stopplacetable
\startplacefigure[title={A bovine figure}]
\externalfigure[cow][width=5cm]
\stopplacefigure
\startplaceintermezzo[title={An intermezzo}]
\startframedtext
\input ward
\stopframedtext
\stopplaceintermezzo
\stoptext
Captions are styled separately from the floats, hence \setupcaptions.
"Word" is not a figure. \startplacefigure does not make what follows a
figure. When a real figure is set with \startplacefigure, it is centered
by default.
You may be able to get away with style=ss instead of a new font
definition if the sans is linked to the main serif font.
The contents of a float are styled according to the type of float.
[-- Attachment #1.2: Type: text/html, Size: 2582 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Alignment, indenting and font inside floats
2014-07-28 21:23 ` Rik Kabel
@ 2014-07-28 21:45 ` Rik Kabel
2014-07-29 19:57 ` Joshua Krämer
1 sibling, 0 replies; 4+ messages in thread
From: Rik Kabel @ 2014-07-28 21:45 UTC (permalink / raw)
To: ntg-context
On 2014-07-28 17:23, Rik Kabel wrote:
(much snipped)
> The contents of a float are styled according to the type of float.
Sorry, that last statement should have been:
The contents of a float are styled according to the type of contents.
That is, if a table is floated (with placetable or startplacetable), you
still use table-styling commands to style it.
--
Rik
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Alignment, indenting and font inside floats
2014-07-28 21:23 ` Rik Kabel
2014-07-28 21:45 ` Rik Kabel
@ 2014-07-29 19:57 ` Joshua Krämer
1 sibling, 0 replies; 4+ messages in thread
From: Joshua Krämer @ 2014-07-29 19:57 UTC (permalink / raw)
To: ntg-context-wvrSQK3plZs
On 2014-07-28, 17:23, Rik Kabel wrote:
> You may be able to get away with style=ss instead of a new font
> definition if the sans is linked to the main serif font.
This doesn't work for me, because I want the math to be typeset in the
new typeface, too.
> The contents of a float are styled according to the type of contents.
Thanks for your explanations. I'm now using a macro, which I insert
manually at the beginning of every float, with the following definition:
\define \Figurestyle
{
\setupindenting [no]
\setupalign [center]
\switchtobodyfont [figurefamily]
}
Kind regards,
Joshua
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context-wvrSQK3plZs@public.gmane.org / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-29 19:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-28 19:29 Alignment, indenting and font inside floats Joshua Krämer
2014-07-28 21:23 ` Rik Kabel
2014-07-28 21:45 ` Rik Kabel
2014-07-29 19:57 ` Joshua Krämer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).