ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* font size switching
@ 2016-10-17 16:15 Csikos Bela
  2016-10-17 17:09 ` Pablo Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: Csikos Bela @ 2016-10-17 16:15 UTC (permalink / raw)
  To: ntg-context

Dear context users:

It seems to me that some of the the font size switching commands do not work
as described in the context reference manual (contextref.pdf, 27/09/2013), e.g.
 \tfx. The manual writes on page 109 that "Note that these commands select
font sizes relative to the default, not relative to whatever font size is currently in
effect." But in my case \tfx switches to smaller compared to the size in effect, and
not smaller compared to default size.

In additions I couldn't find command for returning to default size after a font switching
command. How to switch (back) to normal size? 

Here is an MWE:

\starttext

default, {\tfa larger (a)}, {\tfb larger (b)}, {\tfc larger (c)}, {\tfd larger (d)}

default, {\tfx smaller (x)}, {\tfxx smaller (xx)}

This is normal text, (default 10pt).
{\tfa This is larger (a).}
Normal again.
{\tfx This is smaller, (x).}

This is normal size.
\bfa This is larger bold (a).
\tf This is normal larger (a), \backslash tf doesn't change size.

How to switch back to normal size, if there is no suffix for normal size?

\tfx And why isn't this smaller (x) if the suffix changes size relative to default size
as the manual states?

\stoptext


Thank you in advance,

bcsikos
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: font size switching
  2016-10-17 16:15 font size switching Csikos Bela
@ 2016-10-17 17:09 ` Pablo Rodriguez
  2016-10-17 17:31   ` Csikos Bela
  0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2016-10-17 17:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/17/2016 06:15 PM, Csikos Bela wrote:
> Dear context users:
> 
> It seems to me that some of the the font size switching commands do not work
> as described in the context reference manual (contextref.pdf, 27/09/2013), e.g.
>  \tfx. The manual writes on page 109 that "Note that these commands select
> font sizes relative to the default, not relative to whatever font size is currently in
> effect." But in my case \tfx switches to smaller compared to the size in effect, and
> not smaller compared to default size.
> 
> In additions I couldn't find command for returning to default size after a font switching
> command. How to switch (back) to normal size? 

Hi Csikos,

there is a workaround for that:

    \definefontsize[n]
    \setupbodyfontenvironment[default][n=1]

And then use \tfn.

BTW, font (and language) commands are switches, so they don’t require
text enclosed in parentheses (such as \emph{} in LaTeX). I would
discourage the use of \tfn, but you’re on your own.

x and xx are different font sizes, not x repeated (it could have been
named y or w instead). Here you have the difference:

    \starttext
    default, {\tfx smaller (x) {\tfx not smaller (x again)}}

    default, {\tfx smaller (x) {\tfxx smaller (xx now)}}
    \stoptext

BTW, default body font size is 12pt. I realized when I added and
commented the following command in the preamble:

    \setupbodyfont[12pt]

Just in case 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: font size switching
  2016-10-17 17:09 ` Pablo Rodriguez
@ 2016-10-17 17:31   ` Csikos Bela
  2016-10-17 17:56     ` Pablo Rodriguez
  2016-10-17 17:58     ` Thomas A. Schmitz
  0 siblings, 2 replies; 9+ messages in thread
From: Csikos Bela @ 2016-10-17 17:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Pablo Rodriguez írta:
>On 10/17/2016 06:15 PM, Csikos Bela wrote:
>> Dear context users:
>> 
>> It seems to me that some of the the font size switching commands do not work
>> as described in the context reference manual (contextref.pdf, 27/09/2013), e.g.
>>  \tfx. The manual writes on page 109 that "Note that these commands select
>> font sizes relative to the default, not relative to whatever font size is currently in
>> effect." But in my case \tfx switches to smaller compared to the size in effect, and
>> not smaller compared to default size.
>> 
>> In additions I couldn't find command for returning to default size after a font switching
>> command. How to switch (back) to normal size? 
>
>Hi Csikos,
>
>there is a workaround for that:
>
>    \definefontsize[n]
>    \setupbodyfontenvironment[default][n=1]
>
>And then use \tfn.

OK, I see. Thanks.

>
>BTW, font (and language) commands are switches, so they don’t require
>text enclosed in parentheses (such as \emph{} in LaTeX). I would
>discourage the use of \tfn, but you’re on your own.

Do you mean it's better to use e.g. {\bf some text} then \bf{some text}?

>x and xx are different font sizes, not x repeated (it could have been
>named y or w instead). Here you have the difference:
>
>    \starttext
>    default, {\tfx smaller (x) {\tfx not smaller (x again)}}
>
>    default, {\tfx smaller (x) {\tfxx smaller (xx now)}}
>    \stoptext

I know this. What I don't understand is that if I have the code:

\starttext
Default {\tfa Larger} {\tfx Smaller1} \\
Default \tfa Larger \tfx Smaller2
\stoptext

then I have Smaller1 in (x) size and Smaller2 in default size. Why?
I would expect Smaller2 to be in (x) size too (as the manual implies).

Thank you in advance,

bcsikos

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: font size switching
  2016-10-17 17:31   ` Csikos Bela
@ 2016-10-17 17:56     ` Pablo Rodriguez
  2016-10-17 17:58     ` Thomas A. Schmitz
  1 sibling, 0 replies; 9+ messages in thread
From: Pablo Rodriguez @ 2016-10-17 17:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/17/2016 07:31 PM, Csikos Bela wrote:
> Pablo Rodriguez írta:
>> [...]
>> BTW, font (and language) commands are switches, so they don’t require
>> text enclosed in parentheses (such as \emph{} in LaTeX). I would
>> discourage the use of \tfn, but you’re on your own.
> 
> Do you mean it's better to use e.g. {\bf some text} then \bf{some text}?

No, I mean that {\bf text} is the only way of using it (afaIk, this is
TeX). See the code:

    \starttext
    \bf{text} tesafe
    \stoptext

All text in the sample is in bold font.

> [...]
> I know this. What I don't understand is that if I have the code:
> 
> \starttext
> Default {\tfa Larger} {\tfx Smaller1} \\
> Default \tfa Larger \tfx Smaller2
> \stoptext
> 
> then I have Smaller1 in (x) size and Smaller2 in default size. Why?
> I would expect Smaller2 to be in (x) size too (as the manual implies).

As far as I can understand, this might be a bug (or an inconsistency in
font size handling, at least). Isn’t it, Wolfgang?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: font size switching
  2016-10-17 17:31   ` Csikos Bela
  2016-10-17 17:56     ` Pablo Rodriguez
@ 2016-10-17 17:58     ` Thomas A. Schmitz
  2016-10-17 18:14       ` Pablo Rodriguez
  2016-10-20 16:07       ` Csikos Bela
  1 sibling, 2 replies; 9+ messages in thread
From: Thomas A. Schmitz @ 2016-10-17 17:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/17/2016 07:31 PM, Csikos Bela wrote:
> Do you mean it's better to use e.g. {\bf some text} then \bf{some text}?

The latter is not valid syntax. You want to read the wiki section on 
font switching: http://wiki.contextgarden.net/Font_Switching

>
>> >x and xx are different font sizes, not x repeated (it could have been
>> >named y or w instead). Here you have the difference:
>> >
>> >    \starttext
>> >    default, {\tfx smaller (x) {\tfx not smaller (x again)}}
>> >
>> >    default, {\tfx smaller (x) {\tfxx smaller (xx now)}}
>> >    \stoptext
> I know this. What I don't understand is that if I have the code:
>
> \starttext
> Default {\tfa Larger} {\tfx Smaller1} \\
> Default \tfa Larger \tfx Smaller2
> \stoptext
>
> then I have Smaller1 in (x) size and Smaller2 in default size. Why?
> I would expect Smaller2 to be in (x) size too (as the manual implies).
>
I'm not sure where you found the sentence you copied in your first mail. 
My copy of contextref.pdf says p. 107: "The various commands will adapt 
themselves to the actual setup of font and size." Which is exactly what 
you see.


Thomas




___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: font size switching
  2016-10-17 17:58     ` Thomas A. Schmitz
@ 2016-10-17 18:14       ` Pablo Rodriguez
  2016-10-17 18:28         ` Hans Hagen
  2016-10-20 16:07       ` Csikos Bela
  1 sibling, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2016-10-17 18:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/17/2016 07:58 PM, Thomas A. Schmitz wrote:
> On 10/17/2016 07:31 PM, Csikos Bela wrote:
>> [...]
>> then I have Smaller1 in (x) size and Smaller2 in default size. Why?
>> I would expect Smaller2 to be in (x) size too (as the manual implies).
>>
> I'm not sure where you found the sentence you copied in your first mail. 
> My copy of contextref.pdf says p. 107: "The various commands will adapt 
> themselves to the actual setup of font and size." Which is exactly what 
> you see.

Hi Thomas,

I must confess, I haven’t checked the manual. But why doesn’t it happen
the same with other commands?

    \starttext
    \startTEXpage[offset=1em]
    Default {\tfb Larger} {\tfd Larger 1} \\
    Default \tfb Larger \tfd Larger 2
    \stopTEXpage
    \stoptext


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: font size switching
  2016-10-17 18:14       ` Pablo Rodriguez
@ 2016-10-17 18:28         ` Hans Hagen
  2016-10-17 19:46           ` Pablo Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2016-10-17 18:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/17/2016 8:14 PM, Pablo Rodriguez wrote:
> On 10/17/2016 07:58 PM, Thomas A. Schmitz wrote:
>> On 10/17/2016 07:31 PM, Csikos Bela wrote:
>>> [...]
>>> then I have Smaller1 in (x) size and Smaller2 in default size. Why?
>>> I would expect Smaller2 to be in (x) size too (as the manual implies).
>>>
>> I'm not sure where you found the sentence you copied in your first mail.
>> My copy of contextref.pdf says p. 107: "The various commands will adapt
>> themselves to the actual setup of font and size." Which is exactly what
>> you see.
>
> Hi Thomas,
>
> I must confess, I haven’t checked the manual. But why doesn’t it happen
> the same with other commands?
>
>     \starttext
>     \startTEXpage[offset=1em]
>     Default {\tfb Larger} {\tfd Larger 1} \\
>     Default \tfb Larger \tfd Larger 2
>     \stopTEXpage
>     \stoptext

looks quite ok to me ... grouping works as expected

\starttext

\startTEXpage[offset=1em]
     Default {\tfb Larger} normal {\tfd Larger 1} \\
     Default  \tfb Larger  normal  \tfd Larger 2
\stopTEXpage

\stoptext

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: font size switching
  2016-10-17 18:28         ` Hans Hagen
@ 2016-10-17 19:46           ` Pablo Rodriguez
  0 siblings, 0 replies; 9+ messages in thread
From: Pablo Rodriguez @ 2016-10-17 19:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/17/2016 08:28 PM, Hans Hagen wrote:
> On 10/17/2016 8:14 PM, Pablo Rodriguez wrote:
>> [...]
>> I must confess, I haven’t checked the manual. But why doesn’t it happen
>> the same with other commands?
>>
>>     \starttext
>>     \startTEXpage[offset=1em]
>>     Default {\tfb Larger} {\tfd Larger 1} \\
>>     Default \tfb Larger \tfd Larger 2
>>     \stopTEXpage
>>     \stoptext
> 
> looks quite ok to me ... grouping works as expected

Hans,

I totally agree.

The point I was trying to make is that ungrouped font size switches
behave different if when fixed and when not fixed.


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: font size switching
  2016-10-17 17:58     ` Thomas A. Schmitz
  2016-10-17 18:14       ` Pablo Rodriguez
@ 2016-10-20 16:07       ` Csikos Bela
  1 sibling, 0 replies; 9+ messages in thread
From: Csikos Bela @ 2016-10-20 16:07 UTC (permalink / raw)
  To: ntg-context

"Thomas A. Schmitz" írta:
>On 10/17/2016 07:31 PM, Csikos Bela wrote:
>> Do you mean it's better to use e.g. {\bf some text} then \bf{some text}?
>
>The latter is not valid syntax. You want to read the wiki section on 
>font switching: http://wiki.contextgarden.net/Font_Switching

Thanks. I mixed it up with the mnemonic font switching commands.
I guess I thought that these (\bf \it etc) can be used similarly to \bold etc.

[....]

>> then I have Smaller1 in (x) size and Smaller2 in default size. Why?
>> I would expect Smaller2 to be in (x) size too (as the manual implies).
>>
>I'm not sure where you found the sentence you copied in your first mail. 
>My copy of contextref.pdf says p. 107:

The sentence I cited is on the same page (107/109), the top line.

> "The various commands will adapt 
>themselves to the actual setup of font and size." Which is exactly what 
>you see.

In my understanding this only means that if the current font is bold then an
\it changes the font to bold italic and not normal italic, and if the size is
for example (c) it will keep it and won't change back to normal size. It doesn't
mean that if you have size (b) and use a \tfa the size becomes a magnified
(b) (that is, (c).) According to my understanding using a \tfb should result
a (b) size font independently the currently used size according to the manual.
My question was why \tfx works differently than \tfa. I guess they answered this
in the meantime.

Thanks,

bcsikos

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2016-10-20 16:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 16:15 font size switching Csikos Bela
2016-10-17 17:09 ` Pablo Rodriguez
2016-10-17 17:31   ` Csikos Bela
2016-10-17 17:56     ` Pablo Rodriguez
2016-10-17 17:58     ` Thomas A. Schmitz
2016-10-17 18:14       ` Pablo Rodriguez
2016-10-17 18:28         ` Hans Hagen
2016-10-17 19:46           ` Pablo Rodriguez
2016-10-20 16:07       ` Csikos Bela

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