Alignment, indenting and font inside floats
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
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.
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
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
participants (2)
-
Joshua Krämer
-
Rik Kabel