On 01/14/2015 06:58 PM, Wolfgang Schuster wrote:
>> [...]
>> Is there a way to make ConTeXt automatically calculate the size of the
>> \setupbodyfont, so that the passage fits exactly to text width?
> 
> \starttext
> \WidthSpanningText{My Title}{\textwidth}{Serif}
> \WidthSpanningText{My Title}{12cm}{MonoBold}
> \WidthSpanningText{My Title}{14cm}{SansItalic}
> \stoptext

Many thanks for your reply, Wolfgang.

That was what I was looking for.

There is a minor issue with alignment:

    \starttext

    \startalign[center]
    \widthspanningtext{text}{.5\textwidth}{Serif}
    \stopalign

    \hfill\widthspanningtext{text}{.5\textwidth}{Serif}

    \stoptext

Am I missing something or is \hfill the only way to align the contents
from \widthspanningtext?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to