Re: [NTG-context] Probably simple: using a variable for \switchtobodyfont size

2023-05-19 Thread Hans van der Meer via ntg-context
\def\relationsFontSize{8pt}\starttextHello World!\crlf\switchtobodyfont[\relationsFontSize]Hello, world!\stoptext

Untitled.pdf
Description: Adobe PDF document
dr. Hans van der MeerOn 19 May 2023, at 11:43, Gerben Wierda via ntg-context  wrote:I want to use a variable for a font size so I can set it based on language (as some translated texts have widely different sizes)This fails:%===\newdimen\relationsFontSize\relationsFontSize=8pt\starttext\switchtobodyfont[\relationsFontSize]Hello, world!\stoptext%===How can I use a variable to steer \switchtobodyfont size?
Gerben Wierda (LinkedIn, Mastodon)R IT Strategy (main site)Book: Chess and the Art of Enterprise ArchitectureBook: Mastering ArchiMate


___If your question is of interest to others as well, please add an entry to the Wiki!maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net__
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Probably simple: using a variable for \switchtobodyfont size

2023-05-19 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 19.05.2023 um 11:43:
I want to use a variable for a font size so I can set it based on 
language (as some translated texts have widely different sizes)


This fails:

%===
\newdimen\relationsFontSize
\relationsFontSize=8pt
\starttext
\switchtobodyfont[\relationsFontSize]
Hello, world!
\stoptext
%===

How can I use a variable to steer \switchtobodyfont size?


You need \the\, i.e.

\switchtobodyfont[\the\relationsFontSize]

but I would use the measure command, e.g.

\definemeasure[relationsFontSize][8pt]
\starttext
\switchtobodyfont[\measure{relationsFontSize}]
Hello, world!
\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Probably simple: using a variable for \switchtobodyfont size

2023-05-19 Thread Gerben Wierda via ntg-context
I want to use a variable for a font size so I can set it based on language (as 
some translated texts have widely different sizes)

This fails:

%===
\newdimen\relationsFontSize
\relationsFontSize=8pt
\starttext
\switchtobodyfont[\relationsFontSize]
Hello, world!
\stoptext
%===

How can I use a variable to steer \switchtobodyfont size?

Gerben Wierda (LinkedIn , Mastodon 
)
R IT Strategy  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___