ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Making \setupinterlinespace work with \switchtobodyfont
@ 2015-04-30 12:18 Pavneet Arora
  2015-04-30 14:10 ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Pavneet Arora @ 2015-04-30 12:18 UTC (permalink / raw)
  To: ConTeXt Mailing list

Hello,

I am trying to have inter-line space change according to the current 
size of the body font, which I modify with \switchtobodyfont, but I 
cannot seem to affect the desired change as per the MWE below.  
\setupinterlinespace seems to take its lead from the original 
\setupbodyfont directive in the document, and does not revise it even 
when font size is changed.

Is there a prescribed method to properly use \setupinterlinespace (or 
for that matter \setupwhitespace when switching font sizes?

Many thanks.

>>>> MWE

\setuppagenumbering[location=,state=stop] 

\definefontfamily[mainface][rm][Pagella]
\definefontfamily[mainface][ss][Heros]
\definefontfamily[mainface][mm][Latin Modern Math]
\setupbodyfont[mainface,72pt]
\setupinterlinespace

\starttext
\startalignment[center]
The Title
\blank
{\switchtobodyfont[36pt]\setupinterlinespace%
Subtitle line 1\\
Subtitle line 2}
\blank
{\switchtobodyfont[18pt]\setupinterlinespace%
Sub-subtitle line 1\\
Sub-subtitle line 2}
\stopalignment
\stoptext

<<<<

-- 
----
Pavneet Arora           m: 647.406.6843
Waroc Informatik        t: 416.937.9276
___________________________________________________________________________________
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] 3+ messages in thread

* Re: Making \setupinterlinespace work with \switchtobodyfont
  2015-04-30 12:18 Making \setupinterlinespace work with \switchtobodyfont Pavneet Arora
@ 2015-04-30 14:10 ` Pablo Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2015-04-30 14:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 04/30/2015 02:18 PM, Pavneet Arora wrote:
> Hello,
> 
> I am trying to have inter-line space change according to the current 
> size of the body font, which I modify with \switchtobodyfont, but I 
> cannot seem to affect the desired change as per the MWE below.  
> \setupinterlinespace seems to take its lead from the original 
> \setupbodyfont directive in the document, and does not revise it even 
> when font size is changed.
> 
> Is there a prescribed method to properly use \setupinterlinespace (or 
> for that matter \setupwhitespace when switching font sizes?

Hi Paavnet,

yes, you need a paragraph to make \setupinterlinespace work.

Your improved sample:

    \setuppagenumbering[location=,state=stop]

    \definefontfamily[mainface][rm][Pagella]
    \definefontfamily[mainface][ss][Heros]
    \definefontfamily[mainface][mm][Latin Modern Math]
    \setupbodyfont[mainface,72pt]
    \setupinterlinespace

    \starttext
    \startalignment[center]
    The Title
    \blank
    {\switchtobodyfont[36pt]\setupinterlinespace%
    Subtitle line 1\\
    Subtitle line 2\par}
    \blank
    {\switchtobodyfont[18pt]\setupinterlinespace%
    Sub-subtitle line 1\\
    Sub-subtitle line 2\par}
    \stopalignment
    \stoptext

I hope it helps,


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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Making \setupinterlinespace work with \switchtobodyfont
@ 2015-04-30 16:00 Pavneet Arora
  0 siblings, 0 replies; 3+ messages in thread
From: Pavneet Arora @ 2015-04-30 16:00 UTC (permalink / raw)
  To: ConTeXt Mailing list

Thanks Pablo!

> Hi Paavnet,
>
> yes, you need a paragraph to make \setupinterlinespace work.

-- 
----
Pavneet Arora           m: 647.406.6843
Waroc Informatik        t: 416.937.9276
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2015-04-30 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-30 12:18 Making \setupinterlinespace work with \switchtobodyfont Pavneet Arora
2015-04-30 14:10 ` Pablo Rodriguez
2015-04-30 16:00 Pavneet Arora

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).