ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* question about linespace adjustment
@ 2013-09-24 14:36 Lars Huttar
  2013-09-24 14:51 ` Aditya Mahajan
  2013-09-24 16:01 ` Lars Huttar
  0 siblings, 2 replies; 14+ messages in thread
From: Lars Huttar @ 2013-09-24 14:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,
I'm working through the reference manual trying to understand how things
work in regard to fonts. I'll be submitting clarifications and
elaborations to the manual in an attempt to help other non-experts to
grasp the design of ConTeXt.

There's a point that's confusing to me in section 5.5, Line spacing. On
page 108 of the manual it says
"Linespacing alters when a new bodyfont is used or when linespacing is
defined explicitly by \setupinterlinespace (which is explained later)"

But on the next page it says,
"When you make a font switch the linespacing is adapted when you give
the command \setupinterlinespace without any setup parameters and also
when you add the key reset, for example..."

So here's why I'm confused. When you change fonts, (a) does linespacing
get changed automatically, or (b) do you have to say
\setupinterlinespace? If (a), then why does the second quote above seem
to say you need \setupinterlinespace to make it happen? If (b), then
isn't the first quote above inaccurate?

Is there a distinction being drawn here between "when a new bodyfont is
used" and "when you make a font switch", or are those just variant
phrasings for what is intended to mean the same thing?

Thanks for your help,
Lars

___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-24 14:36 question about linespace adjustment Lars Huttar
@ 2013-09-24 14:51 ` Aditya Mahajan
  2013-09-24 16:01 ` Lars Huttar
  1 sibling, 0 replies; 14+ messages in thread
From: Aditya Mahajan @ 2013-09-24 14:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1430 bytes --]

On Tue, 24 Sep 2013, Lars Huttar wrote:

> Hello,
> I'm working through the reference manual trying to understand how things
> work in regard to fonts. I'll be submitting clarifications and
> elaborations to the manual in an attempt to help other non-experts to
> grasp the design of ConTeXt.
>
> There's a point that's confusing to me in section 5.5, Line spacing. On
> page 108 of the manual it says
> "Linespacing alters when a new bodyfont is used or when linespacing is
> defined explicitly by \setupinterlinespace (which is explained later)"
>
> But on the next page it says,
> "When you make a font switch the linespacing is adapted when you give
> the command \setupinterlinespace without any setup parameters and also
> when you add the key reset, for example..."
>
> So here's why I'm confused. When you change fonts, (a) does linespacing
> get changed automatically, or (b) do you have to say
> \setupinterlinespace? If (a), then why does the second quote above seem
> to say you need \setupinterlinespace to make it happen? If (b), then
> isn't the first quote above inaccurate?
>
> Is there a distinction being drawn here between "when a new bodyfont is
> used" and "when you make a font switch", or are those just variant
> phrasings for what is intended to mean the same thing?

Contrast

{\switchtobodyfont[14pt] \input ward \endgraf}

with

{\tfc \input ward \endgraf}

Aditya

[-- 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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-24 14:36 question about linespace adjustment Lars Huttar
  2013-09-24 14:51 ` Aditya Mahajan
@ 2013-09-24 16:01 ` Lars Huttar
  2013-09-24 17:45   ` Lars Huttar
  1 sibling, 1 reply; 14+ messages in thread
From: Lars Huttar @ 2013-09-24 16:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya wrote,
> Contrast
>
> {\switchtobodyfont[14pt] \input ward \endgraf}
>
> with
>
> {\tfc \input ward \endgraf}
>

Thanks for your help. You've left me to draw my own conclusions from
this example, so I'll say what I think this implies, and please correct
me if I'm wrong.

(Note to other non-TeXnichians: \endgraf is a TeX synonym for \par: end
of paragraph.)

I think the principle that you're trying to demonstrate is that the
answer to my last paragraph is yes: there is an important distinction
between "making a font switch," e.g. \tfc, and "using a new body font",
of which \switchtobodyfont is apparently an example.
Namely, that the latter causes the interlinespace to be automatically
adjusted, whereas the former doesn't unless you explicitly use
\setupinterlinespace.

Can you explain how/why the two ways of increasing the font size should
have such different effects? (I have read section 5.8 and 5.9 about
selecting bodyfonts and interlinespace but still don't get it.)
\tfc is described as a "font selector" command (5.3.2). It seems to me
that both \tfc and \switchtobodyfont[20pt] simply attempt to switch to a
different size of whatever bodyfont is currently in effect. But there
must be something I'm missing. (Or else it's just an arbitrary
distinction, but that seems unlikely.)

Lars

___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-24 16:01 ` Lars Huttar
@ 2013-09-24 17:45   ` Lars Huttar
  2013-09-24 18:18     ` luigi scarso
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Huttar @ 2013-09-24 17:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 9/24/2013 12:01 PM, Lars Huttar wrote:
>
> Can you explain how/why the two ways of increasing the font size should
> have such different effects? (I have read section 5.8 and 5.9 about
> selecting bodyfonts and interlinespace but still don't get it.)
> \tfc is described as a "font selector" command (5.3.2). It seems to me
> that both \tfc and \switchtobodyfont[20pt] simply attempt to switch to a
> different size of whatever bodyfont is currently in effect. But there
> must be something I'm missing. (Or else it's just an arbitrary
> distinction, but that seems unlikely.)
>
>

Is it that \switchdobodyfont changes the *body* font, which engages the
associated bodyfont environment...
whereas \tfc changes the *font*, not the *body* font?

Lars

___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-24 17:45   ` Lars Huttar
@ 2013-09-24 18:18     ` luigi scarso
  2013-09-24 21:07       ` Lars Huttar
  0 siblings, 1 reply; 14+ messages in thread
From: luigi scarso @ 2013-09-24 18:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1501 bytes --]

On Tue, Sep 24, 2013 at 7:45 PM, Lars Huttar <lars_huttar@sil.org> wrote:

> On 9/24/2013 12:01 PM, Lars Huttar wrote:
> >
> > Can you explain how/why the two ways of increasing the font size should
> > have such different effects? (I have read section 5.8 and 5.9 about
> > selecting bodyfonts and interlinespace but still don't get it.)
> > \tfc is described as a "font selector" command (5.3.2). It seems to me
> > that both \tfc and \switchtobodyfont[20pt] simply attempt to switch to a
> > different size of whatever bodyfont is currently in effect. But there
> > must be something I'm missing. (Or else it's just an arbitrary
> > distinction, but that seems unlikely.)
> >
> >
>
> Is it that \switchdobodyfont changes the *body* font, which engages the
> associated bodyfont environment...
> whereas \tfc changes the *font*, not the *body* font?
>
> Lars
>
> You can look into
 font-pre.mkiv
\tfc augment the fontsize of a factor of 1.728
It's relative to the default fount size not to the current fontsize:
{\tfc foo {\tfc foo}} both foo have the same size
<http://contextgarden.net>

But interlinespace is not modified, so we need to reset
\starttext
OK: \input knuth\blank{\tfx WRONG: \input knuth\blank \tfc WRONG: \input
knuth\relax} \page
OK: \input knuth\blank{\tfx\setupinterlinespace OK: \input knuth\blank \tfc
WRONG: \input knuth\blank} \page
OK: \input knuth\blank{\tfx\setupinterlinespace OK: \input knuth\blank
\tfc\setupinterlinespace OK: \input knuth\blank}
\stoptext


--
luigi

[-- Attachment #1.2: Type: text/html, Size: 2202 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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-24 18:18     ` luigi scarso
@ 2013-09-24 21:07       ` Lars Huttar
  2013-09-24 21:25         ` Aditya Mahajan
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Huttar @ 2013-09-24 21:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Luigi,
Thanks for your reply.

On 9/24/2013 2:18 PM, luigi scarso wrote:
>
> On Tue, Sep 24, 2013 at 7:45 PM, Lars Huttar <lars_huttar@sil.org
> <mailto:lars_huttar@sil.org>> wrote:
>
>
>     Is it that \switchdobodyfont changes the *body* font, which
>     engages the
>     associated bodyfont environment...
>     whereas \tfc changes the *font*, not the *body* font?
>
>     Lars
>
> You can look into
>  font-pre.mkiv

OK. I'm looking at it,
http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/font-pre.mkiv
Is there anything in particular you had in mind that I can learn from it?
I found some aliases, e.g. \smaller, which are handy to know. But I
don't know how much I can rely on the undocumented ones to continue to
do what they do now.

> \tfc augment the fontsize of a factor of 1.728
> It's relative to the default fount size not to the current fontsize:
> {\tfc foo {\tfc foo}} both foo have the same size

Thank you, this is an important nugget that I didn't understand when
reading the documentation. \setsmallbodyfont and \setbigbodyfont, in
contrast, change the font size relative to the current size.

>
> But interlinespace is not modified, so we need to reset
> \starttext
> OK: \input knuth\blank{\tfx WRONG: \input knuth\blank \tfc WRONG:
> \input knuth\relax} \page
> OK: \input knuth\blank{\tfx\setupinterlinespace OK: \input knuth\blank
> \tfc WRONG: \input knuth\blank} \page
> OK: \input knuth\blank{\tfx\setupinterlinespace OK: \input knuth\blank
> \tfc\setupinterlinespace OK: \input knuth\blank}
> \stoptext

Ok. This confirms what Aditya said, and what the manual says: that you
have to use \setupinterlinespace after \tfx or \tfc if you want the
interlinespace to be adjusted.

But I would really like to understand the categories involved here.
So we have one category of font size selector commands, which includes
\setsmallbodyfont and \setbigbodyfont, that cause interlinespace to be
adjusted automatically.
Then we have another category, including \tfc, \tfx, \ita, and others,
that do not cause interlinespace to be adjusted.

What is the rhyme or reason behind these categories? And that would help
me know, which other commands belong to which category? E.g. would
\serif cause interlinespace to be adjusted? An experiment would reveal
the answer, at least in the circumstances that I think of testing, but
I'd like to understand the conceptual model.
Maybe the concept is that the first category affects the "body font"
(and therefore interacts with the properties of the body font
environment), and the second category only affects the "font" (and I'm
still not clear on how the "body font" differs from the current font).

Thanks for your help,
Lars

___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-24 21:07       ` Lars Huttar
@ 2013-09-24 21:25         ` Aditya Mahajan
  2013-09-25 19:54           ` Lars Huttar
  0 siblings, 1 reply; 14+ messages in thread
From: Aditya Mahajan @ 2013-09-24 21:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 24 Sep 2013, Lars Huttar wrote:

> environment), and the second category only affects the "font" (and I'm
> still not clear on how the "body font" differs from the current font).

(Sorry for the terse replies...)

{\switchtobodyfont[14pt] Text $math$ \sans{Sans} \endgraf}

{\tfc Text $math$ \sans{Sans} \endgraf}

Aditya
___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-24 21:25         ` Aditya Mahajan
@ 2013-09-25 19:54           ` Lars Huttar
  2013-09-25 21:00             ` luigi scarso
  2013-09-25 21:02             ` Wolfgang Schuster
  0 siblings, 2 replies; 14+ messages in thread
From: Lars Huttar @ 2013-09-25 19:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Aditya Mahajan

On 9/24/2013 5:25 PM, Aditya Mahajan wrote:
> On Tue, 24 Sep 2013, Lars Huttar wrote:
>
>> environment), and the second category only affects the "font" (and I'm
>> still not clear on how the "body font" differs from the current font).
>
> (Sorry for the terse replies...)
>
> {\switchtobodyfont[14pt] Text $math$ \sans{Sans} \endgraf}
>
> {\tfc Text $math$ \sans{Sans} \endgraf}
>
> Aditya

I don't know how this answers the above question. Can anybody explain?

Clearly you're drawing a comparison between \switchtobodyfont[14pt] and
\tfc.
I've run the sample, and I see that, as in other samples earlier in this
thread, \switchtobodyfont causes the interlinespace to be adjusted
accordingly, and \tfc doesn't.

Is that intended to be an answer to 'how the "body font" differs from
the current font'? And is the answer that the bodyfont is a conglomerate
of more properties than just the font, including interlinespace?

Thanks,
Lars

___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-25 19:54           ` Lars Huttar
@ 2013-09-25 21:00             ` luigi scarso
  2013-09-25 21:02             ` Wolfgang Schuster
  1 sibling, 0 replies; 14+ messages in thread
From: luigi scarso @ 2013-09-25 21:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2249 bytes --]

On Wed, Sep 25, 2013 at 9:54 PM, Lars Huttar <lars_huttar@sil.org> wrote:

> And is the answer that the bodyfont is a conglomerate
> of more properties than just the font, including interlinespace?
>


You can read  font-ini.mkvi :

%D \macros
%D   {setupbodyfont,switchtobodyfont}
%D
%D The next two macros are user ones. With \type{\setupbodyfont}
%D one can set the document bodyfont size, font family, style
%D and/or options defined in files, for example:
%D
%D \starttyping
%D \setupbodyfont[modern,12pt,roman]
%D \stoptyping
%D
%D This command affects the document as a whole: text, headers
%D and footers. The second macro however affects only the text:
%D
%D \starttyping
%D \switchtobodyfont[10pt]
%D \stoptyping
%D
%D So we've got:
%D
%D \showsetup{setupbodyfont}
%D \showsetup{switchtobodyfont}
%D
%D Both macros look alike. The second one also has to take
%D all kind of keywords into account.
If you follow switchtobodyfont you can see

unexpanded\def\font_basics_switchtobodyfont#specification%
  {\edef\m_font_step{\bodyfontvariable{#specification}}%
   \ifx\m_font_step\empty
     \font_helpers_set_font\zerocount{#specification}%
   \else
     \font_helpers_switch_bodyfont_step % so we have a fast [small] switch
   \fi
   \the\everybodyfont
   \the\everyswitchtobodyfont}

\unexpanded\def\switchtobodyfont[#specification]% could become an ifx

{\doifsomething{#specification}{\font_basics_switchtobodyfont{#specification}}}


The token register \everybodyfont  and
 \everyswitchtobodyfont take care for spaces:

(still in font-ini.mkvi)

%D   {everybodyfont,Everybodyfont,everyglobalbodyfont}
%D
%D Every change in bodyfont size has conseqences for the baseline
%D distance and skips between paragraphs. These are initialized
%D in other modules. Here we only provide the hooks that
%D garantees their handling.

%D At the system level one can initialize thing like:
%D
%D \starttyping
%D \appendtoks \setupspacing \to \everybodyfont
%D \stoptyping

In core-def.mkiv

\appendtoks
    \synchronizelocallinespecs
\to \everyswitchtobodyfont

while  spac-ver.mkiv

\unexpanded\def\synchronizelocallinespecs
  {\bodyfontlineheight \normallineheight
   \bodyfontstrutheight\strutheight
   \bodyfontstrutdepth \strutdepth}



-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 3235 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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-25 19:54           ` Lars Huttar
  2013-09-25 21:00             ` luigi scarso
@ 2013-09-25 21:02             ` Wolfgang Schuster
  2013-09-25 21:45               ` Lars Huttar
  1 sibling, 1 reply; 14+ messages in thread
From: Wolfgang Schuster @ 2013-09-25 21:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 25.09.2013 um 21:54 schrieb Lars Huttar <lars_huttar@sil.org>:

> On 9/24/2013 5:25 PM, Aditya Mahajan wrote:
>> On Tue, 24 Sep 2013, Lars Huttar wrote:
>> 
>>> environment), and the second category only affects the "font" (and I'm
>>> still not clear on how the "body font" differs from the current font).
>> 
>> (Sorry for the terse replies...)
>> 
>> {\switchtobodyfont[14pt] Text $math$ \sans{Sans} \endgraf}
>> 
>> {\tfc Text $math$ \sans{Sans} \endgraf}
>> 
>> Aditya
> 
> I don't know how this answers the above question. Can anybody explain?
> 
> Clearly you're drawing a comparison between \switchtobodyfont[14pt] and
> \tfc.
> I've run the sample, and I see that, as in other samples earlier in this
> thread, \switchtobodyfont causes the interlinespace to be adjusted
> accordingly, and \tfc doesn't.
> 
> Is that intended to be an answer to 'how the "body font" differs from
> the current font'? And is the answer that the bodyfont is a conglomerate
> of more properties than just the font, including interlinespace?


You can’t expect from \tfa etc. to change the interlinespace because these
commands can be used in your paragraphs to change the size of certain
words only and in this case you don’t want a forced change of the interlinespace.

To adapt the interlinespace when you now use \tfa etc. you have to add
\setupinterlinespace to your code (arguments aren’t needed) to tell context
to recalculate it.

<example>
\setuppapersize[A3]

\starttext

% Standard text size

\begingroup

\input ward

\endgroup

\blank

% Bigger font size with standard linespacing

\begingroup \tfd

\the\bodyfontsize

\input ward

\endgroup

\blank

% Bigger font size with adapted linespacing

\begingroup \tfd \setupinterlinespace

\input ward

\endgroup

\blank

% Larger bodyfont

\begingroup \switchtobodyfont[25pt]

\input ward

\endgroup

\stoptext
</example>

Wolfgang
___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-25 21:02             ` Wolfgang Schuster
@ 2013-09-25 21:45               ` Lars Huttar
  2013-09-26 19:47                 ` Wolfgang Schuster
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Huttar @ 2013-09-25 21:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang, thanks for your response.

On 9/25/2013 5:02 PM, Wolfgang Schuster wrote:
> You can’t expect from \tfa etc. to change the interlinespace because these
> commands can be used in your paragraphs to change the size of certain
> words only and in this case you don’t want a forced change of the interlinespace.

Well... \switchtobodyfont[20pt] can also be used in paragraphs to change
the size of just a few words.
But the above suggests that \switchtobodyfont shouldn't be used for that
purpose, and commands like \tfc should?

> To adapt the interlinespace when you now use \tfa etc. you have to add
> \setupinterlinespace to your code (arguments aren’t needed) to tell context
> to recalculate it.
>

Thank you. What I'm trying to learn now is *why* that's true. Or more
precisely, where is the boundary between the font-changing commands that
automatically adjust interlinespace, and those commands that don't? and
what is the conceptual model that motivates the boundary, and helps
users remember and predict where the boundary lies?

What I think I'm hearing is that \switchtobodyfont is intended for
changes of longer duration, say, at least a paragraph. Whereas \tfa and
so on are intended for brief changes, to set off a phrase, for example.

As an example of "where's the boundary", experimentation shows that
\setsmallbodyfont is in the same category as \switchtobodyfont: it
automatically affects the interlinespace. Nevertheless I can't find
anywhere in the manual or on the wiki that tells me that
\setsmallbodyfont differs from \tx in this way (let alone *why* it
differs). Maybe I should expect that any command that has "bodyfont" in
its name is intended for long-term changes, and other commands aren't?

Sorry if I'm being slow on the uptake.
Documentation like
http://wiki.contextgarden.net/Command/switchtobodyfont just doesn't seem
to explain this difference in intention.

Thanks again. I do hope to use this experience to contribute
clarifications to the manual. I've already done that some on the wiki
(hoping that if I get it wrong, someone will correct my mistakes!)

Lars

___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-25 21:45               ` Lars Huttar
@ 2013-09-26 19:47                 ` Wolfgang Schuster
  2013-09-27 15:57                   ` Lars Huttar
  2013-09-30 20:22                   ` Lars Huttar
  0 siblings, 2 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2013-09-26 19:47 UTC (permalink / raw)
  To: Lars Huttar; +Cc: mailing list for ConTeXt users


Am 25.09.2013 um 23:45 schrieb Lars Huttar <lars_huttar@sil.org>:

> Wolfgang, thanks for your response.
> 
> On 9/25/2013 5:02 PM, Wolfgang Schuster wrote:
>> You can’t expect from \tfa etc. to change the interlinespace because these
>> commands can be used in your paragraphs to change the size of certain
>> words only and in this case you don’t want a forced change of the interlinespace.
> 
> Well... \switchtobodyfont[20pt] can also be used in paragraphs to change
> the size of just a few words.
> But the above suggests that \switchtobodyfont shouldn't be used for that
> purpose, and commands like \tfc should?

You can use \switchtobodyfont to change the size for certain parts of a text
but it’s best to keep this to a minimum because \tfa etc. are a  lot faster.

The reason why you don’t need \setupinterlinespace when you use
\switchtobodyfont is that \setupinterlinespace is already called by
\switchtobodyfont.

Another thing which shouldn’t be forgotten is that \switchtobodyfont
controls and changes the sizes for \tfa etc.

Wolfgang
___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-26 19:47                 ` Wolfgang Schuster
@ 2013-09-27 15:57                   ` Lars Huttar
  2013-09-30 20:22                   ` Lars Huttar
  1 sibling, 0 replies; 14+ messages in thread
From: Lars Huttar @ 2013-09-27 15:57 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 9/26/2013 3:47 PM, Wolfgang Schuster wrote:
> Am 25.09.2013 um 23:45 schrieb Lars Huttar <lars_huttar@sil.org>:
>
>> Wolfgang, thanks for your response.
>>
>> On 9/25/2013 5:02 PM, Wolfgang Schuster wrote:
>>> You can’t expect from \tfa etc. to change the interlinespace because these
>>> commands can be used in your paragraphs to change the size of certain
>>> words only and in this case you don’t want a forced change of the interlinespace.
>> Well... \switchtobodyfont[20pt] can also be used in paragraphs to change
>> the size of just a few words.
>> But the above suggests that \switchtobodyfont shouldn't be used for that
>> purpose, and commands like \tfc should?
> You can use \switchtobodyfont to change the size for certain parts of a text
> but it’s best to keep this to a minimum because \tfa etc. are a  lot faster.
>
> The reason why you don’t need \setupinterlinespace when you use
> \switchtobodyfont is that \setupinterlinespace is already called by
> \switchtobodyfont.

OK, good to know.

> Another thing which shouldn’t be forgotten is that \switchtobodyfont
> controls and changes the sizes for \tfa etc.

Can you elaborate on that?
A few days ago, Luigi wrote,

> \tfc augment the fontsize of a factor of 1.728
> It's relative to the default font size not to the current fontsize

So when he says "relative to the default font size", does that mean the
same thing as "relative to the current body font size"? I think so. The
following example shows that the function of \tfc is relative to the
size set by \switchtobodyfont:

{\tfc tfc \tfc tfc}


{\switchtobodyfont[20pt] 20pt \tfc tfc}


{\switchtobodyfont[6pt] 6pt \tfc tfc}


Here the text after \tfc appears in three different sizes, proportional
to (and larger than) the \switchtobodyfont setting in effect. However,
the first line shows us that \tfc is *not* affected by previous effects
of \tfc. So as Luigi said, there is a distinction between the current
font size (which is affected by \tfc), and the "default font size" -- or
maybe it should be described as "the current body font size" -- which is
not affected by \tfc.
Is that correct?

So does \tfc mean "set the current font size to be three steps up from
the current body font size"?

Thanks. I'm contributing clarifications into the manual as I come to
understand how things are designed to work.

Lars

___________________________________________________________________________________
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] 14+ messages in thread

* Re: question about linespace adjustment
  2013-09-26 19:47                 ` Wolfgang Schuster
  2013-09-27 15:57                   ` Lars Huttar
@ 2013-09-30 20:22                   ` Lars Huttar
  1 sibling, 0 replies; 14+ messages in thread
From: Lars Huttar @ 2013-09-30 20:22 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 9/26/2013 3:47 PM, Wolfgang Schuster wrote:
> You can use \switchtobodyfont to change the size for certain parts of a text
> but it’s best to keep this to a minimum because \tfa etc. are a  lot faster.
>
> The reason why you don’t need \setupinterlinespace when you use
> \switchtobodyfont is that \setupinterlinespace is already called by
> \switchtobodyfont.
>
> Another thing which shouldn’t be forgotten is that \switchtobodyfont
> controls and changes the sizes for \tfa etc.
>
> Wolfgang

To summarize this, and what I've learned from others on this list over
the last week or two, I've updated the wiki page
http://wiki.contextgarden.net/Font_Switching
It's a pretty substantial change, so I hope someone knowledgeable will
look at it and make sure it's right.

I'm trying to find ways to express the fact that, as I understand it,
there are two distinct concepts of "current font" in effect at any given
time:
1) the bodyfont, which is set by \setupbodyfont or \switchtobodyfont
2) the "effective" font (is there a more standard term for this?) which
is changed by \tfa, \ss, etc.

\tfa etc. change the effective font based on what the bodyfont is.
Anything that changes the bodyfont, such as \switchtobodyfont, also
affects the linespacing.
Just changing the effective font does not affect the linespacing.
Changing the bodyfont changes the effective font.

Does that give an accurate picture?

Thanks,
Lars




___________________________________________________________________________________
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] 14+ messages in thread

end of thread, other threads:[~2013-09-30 20:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-24 14:36 question about linespace adjustment Lars Huttar
2013-09-24 14:51 ` Aditya Mahajan
2013-09-24 16:01 ` Lars Huttar
2013-09-24 17:45   ` Lars Huttar
2013-09-24 18:18     ` luigi scarso
2013-09-24 21:07       ` Lars Huttar
2013-09-24 21:25         ` Aditya Mahajan
2013-09-25 19:54           ` Lars Huttar
2013-09-25 21:00             ` luigi scarso
2013-09-25 21:02             ` Wolfgang Schuster
2013-09-25 21:45               ` Lars Huttar
2013-09-26 19:47                 ` Wolfgang Schuster
2013-09-27 15:57                   ` Lars Huttar
2013-09-30 20:22                   ` Lars Huttar

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