Re: [NTG-context] fontsize changes not understood

2016-05-24 Thread Jean-Pierre Delange
Hi HansvdMeer,

There are many ways to answer your question. Maybe, the first and simple one is 
that we may want to have some narrow paragraphs in the middle of our work, as 
quotations, for example, or whatever you want. So, it is a question of method : 
to put it in the preamble as \setupbodyfont, and \switchbodyfont on demand is 
probably easier than populate your code with numerous other commands. See here 
the 3.11.2 paragraph of this Wikibook in French : 
https://fr.wikibooks.org/wiki/ConTeXt#D.C3.A9finir_une_police_et_changer_de_police_dans_un_m.C3.AAme_document)
JP

- Mail original -
De: "Hans van der Meer" <h.vanderm...@uva.nl>
À: "NTG ConTeXt" <ntg-context@ntg.nl>
Envoyé: Mardi 24 Mai 2016 17:47:19
Objet: Re: [NTG-context] fontsize changes not understood







On 24 May 2016, at 17:00, Wolfgang Schuster < schuster.wolfg...@gmail.com > 
wrote: 





Meer, Hans van der 
24. Mai 2016 um 16:28 







Thanks, I really didn't know that, it could not spot it in my copy of "Fonts in 
Context". 

But although reset works for \switchtobodyfont, it is not working in 
\usebodyfont[reset,9pt] in the second section. Why do you think \usebodyfont 
can be used to change the font size in your document, is this mentioned in a 
manual? 




There it keeps the size derived from the section title. Both commands however, 
are reported to inherit from \setupbodyfont (where the reset is named). Should 
that be correct? 
IIRC \usebodyfont can be used to preload a typeface at the begin of a document 
which make switching to it later in the document with \switchtobodyfont or 
\setupbodyfont faster but this also means settings like the font size have no 
effect. The reference manual shows "inherits from XXX" in such a case because 
a) it is true that the command inherits its values from another command b) it’s 
faster to document (can be changed but one has to check which arguments are 
valid). 



Never too old to learn something I didn't fully understood before. Thanks. 

met vriendelijke groet 
Hans van der Meer 





___
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
___
___
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
___

Re: [NTG-context] fontsize changes not understood

2016-05-24 Thread Meer, Hans van der

On 24 May 2016, at 17:00, Wolfgang Schuster 
> wrote:

Meer, Hans van der
24. Mai 2016 um 16:28

Thanks, I really didn't know that, it could not spot it in my copy of "Fonts in 
Context".

But although reset works for \switchtobodyfont, it is not working in 
\usebodyfont[reset,9pt] in the second section.
Why do you think \usebodyfont can be used to change the font size in your 
document, is this mentioned in a manual?
There it keeps the size derived from the section title. Both commands however, 
are reported to inherit from \setupbodyfont (where the reset is named). Should 
that be correct?
IIRC \usebodyfont can be used to preload a typeface at the begin of a document 
which make switching to it later in the document with \switchtobodyfont or 
\setupbodyfont faster but this also means settings like the font size have no 
effect. The reference manual shows "inherits from XXX" in such a case because 
a) it is true that the command inherits its values from another command b) it’s 
faster to document (can be changed but one has to check which arguments are 
valid).


Never too old to learn something I didn't fully understood before. Thanks.

met vriendelijke groet
Hans van der Meer




___
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
___

Re: [NTG-context] fontsize changes not understood

2016-05-24 Thread Wolfgang Schuster

Meer, Hans van der 
24. Mai 2016 um 16:28

Thanks, I really didn't know that, it could not spot it in my copy of 
"Fonts in Context".


But although reset works for \switchtobodyfont, it is not working in 
\usebodyfont[reset,9pt] in the second section.
Why do you think \usebodyfont can be used to change the font size in 
your document, is this mentioned in a manual?
There it keeps the size derived from the section title. Both commands 
however, are reported to inherit from \setupbodyfont (where the reset 
is named). Should that be correct?
IIRC \usebodyfont can be used to preload a typeface at the begin of a 
document which make switching to it later in the document with 
\switchtobodyfont or \setupbodyfont faster but this also means settings 
like the font size have no effect. The reference manual shows "inherits 
from XXX" in such a case because a) it is true that the command inherits 
its values from another command b) it’s faster to document (can be 
changed but one has to check which arguments are valid).


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
___

Re: [NTG-context] fontsize changes not understood

2016-05-24 Thread Meer, Hans van der

> On 24 May 2016, at 15:57, Wolfgang Schuster  
> wrote:
> 
>> Meer, Hans van der  24. Mai 2016 um 15:04
>> 
>> Can someone explain to me the changes in fontsize in the following example?
>> Enclosing the fontswitches in a group did not change the behaviour.
>> 
>> \setupbodyfont[dejavu,12pt]
>> \def\MarkMasterA{\inmargin[location=left]{\bgroup\switchtobodyfont[9pt]\red 
>> Master\egroup}}
>> \def\MarkMasterB{\inmargin[location=left]{\bgroup\usebodyfont[9pt]\red 
>> Master\egroup}}
>> \starttext
>> \startsection[title=\MarkMasterA First title]
>> \input hawking
>> \MarkMasterA
>> \input hawking
>> \stopsection
>> \startsection[title=\MarkMasterB First title]
>> \input hawking
>> \MarkMasterB
>> \input hawking
>> \blank
>> contextversion=\contextversion
>> \stopsection
>> \stoptext
>> 
>> In the first section the absolute value of 9 pt appears not to be honoured 
>> but it looks as if there is a reduction relative to the surrounding font.
>> In the second section the size does not change and looks even bigger than 
>> the first one above.
>> 
>> I am baffled and do not understand why not all fontsizes are the same 
>> absolute 9pt as requested?
> When you flush the margin text in the heading its style (e.g. \tfa) is added 
> to your font size for the margin text.
> 
> To get rid of the size change from \section in your example you can add the 
> "reset" keyword to \switchtobodyfont.

Thanks, I really didn't know that, it could not spot it in my copy of "Fonts in 
Context".

But although reset works for \switchtobodyfont, it is not working in 
\usebodyfont[reset,9pt] in the second section. There it keeps the size derived 
from the section title. Both commands however, are reported to inherit from 
\setupbodyfont (where the reset is named). Should that be correct?

Hans van der Meer




___
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
___

Re: [NTG-context] fontsize changes not understood

2016-05-24 Thread Hans Hagen

On 5/24/2016 3:04 PM, Meer, Hans van der wrote:


Can someone explain to me the changes in fontsize in the following example?
Enclosing the fontswitches in a group did not change the behaviour.

\setupbodyfont[dejavu,12pt]
\def\MarkMasterA{\inmargin[location=left]{\bgroup\switchtobodyfont[9pt]\red
Master\egroup}}
\def\MarkMasterB{\inmargin[location=left]{\bgroup\usebodyfont[9pt]\red
Master\egroup}}
\starttext
\startsection[title=\MarkMasterA First title]
\input hawking
\MarkMasterA
\input hawking
\stopsection
\startsection[title=\MarkMasterB First title]
\input hawking
\MarkMasterB
\input hawking
\blank
contextversion=\contextversion
\stopsection
\stoptext

In the first section the absolute value of 9 pt appears not to be
honoured but it looks as if there is a reduction relative to the
surrounding font.
In the second section the size does not change and looks even bigger
than the first one above.

I am baffled and do not understand why not all fontsizes are the same
absolute 9pt as requested?


inmargin also has a style parameter that can be set (and maybe it is)

\setupbodyfont is a global font switch that should be used local (as it 
affects the headers footers, spacing etc



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-
___
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
___

Re: [NTG-context] fontsize changes not understood

2016-05-24 Thread Wolfgang Schuster

Meer, Hans van der 
24. Mai 2016 um 15:04

Can someone explain to me the changes in fontsize in the following 
example?

Enclosing the fontswitches in a group did not change the behaviour.

\setupbodyfont[dejavu,12pt]
\def\MarkMasterA{\inmargin[location=left]{\bgroup\switchtobodyfont[9pt]\red 
Master\egroup}}
\def\MarkMasterB{\inmargin[location=left]{\bgroup\usebodyfont[9pt]\red 
Master\egroup}}

\starttext
\startsection[title=\MarkMasterA First title]
\input hawking
\MarkMasterA
\input hawking
\stopsection
\startsection[title=\MarkMasterB First title]
\input hawking
\MarkMasterB
\input hawking
\blank
contextversion=\contextversion
\stopsection
\stoptext

In the first section the absolute value of 9 pt appears not to be 
honoured but it looks as if there is a reduction relative to the 
surrounding font.
In the second section the size does not change and looks even bigger 
than the first one above.


I am baffled and do not understand why not all fontsizes are the same 
absolute 9pt as requested?
When you flush the margin text in the heading its style (e.g. \tfa) is 
added to your font size for the margin text.


To get rid of the size change from \section in your example you can add 
the "reset" keyword to \switchtobodyfont.


\def\MarkMasterA{\margindata[inleft][style={\switchtobodyfont[reset,9pt]},color=red]{Master}}

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
___

[NTG-context] fontsize changes not understood

2016-05-24 Thread Meer, Hans van der

Can someone explain to me the changes in fontsize in the following example?
Enclosing the fontswitches in a group did not change the behaviour.

\setupbodyfont[dejavu,12pt]
\def\MarkMasterA{\inmargin[location=left]{\bgroup\switchtobodyfont[9pt]\red 
Master\egroup}}
\def\MarkMasterB{\inmargin[location=left]{\bgroup\usebodyfont[9pt]\red 
Master\egroup}}
\starttext
\startsection[title=\MarkMasterA First title]
\input hawking
\MarkMasterA
\input hawking
\stopsection
\startsection[title=\MarkMasterB First title]
\input hawking
\MarkMasterB
\input hawking
\blank
contextversion=\contextversion
\stopsection
\stoptext

In the first section the absolute value of 9 pt appears not to be honoured but 
it looks as if there is a reduction relative to the surrounding font.
In the second section the size does not change and looks even bigger than the 
first one above.

I am baffled and do not understand why not all fontsizes are the same absolute 
9pt as requested?

Hans van der Meer






marginfontsize.pdf
Description: marginfontsize.pdf
___
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
___