From: Dmitriy Tokarev <dtkrv@ya.ru>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [***SPAM***] Re: Setup font size by dimension variable
Date: Sun, 04 Aug 2013 18:27:01 +0600 [thread overview]
Message-ID: <28961375619221@web16h.yandex.ru> (raw)
In-Reply-To: <20130804104805.GB3182@phlegethon>
04.08.2013, 16:49, "Philipp Gesang" <Philipp.Gesang@alumni.uni-heidelberg.de>:
>> the size-related arguments to \switchtobodyfont and
>> \setupbodyfont aren’t real TeX dimensions but identifiers for
>> predefined bodyfont sets. Example:
>>
>> \def\mainfontsize{20pt}
>> \definebodyfontenvironment [\mainfontsize]
>>
>> \starttext
>> TEXT
>> \switchtobodyfont [\mainfontsize]
>> TEXT 20pt
>> \stoptext
>>
>> See this thread for some background info:
>>
>> http://www.mail-archive.com/ntg-context@ntg.nl/msg63901.html
>
> Sorry for the self-reply, but I just remembered that I already
> wikified the topic:
>
> http://wiki.contextgarden.net/unexpected_behavior#Treacherous_Dimensions
>
Thanks, Philipp!
Now I realized that before the first use of "switchtobodyfont" I need to write "definebodyfontenvironment". In this case, everything is fine.
I also found another way without definebodyfontenvironment:
\definemeasure[AAA][20.123pt]
\newdimen\BBB \BBB=25.127pt
\starttext
TEXT
% ok
\normalizebodyfontsize\normalizedAAA{\measure{AAA}}
\switchtobodyfont[\normalizedAAA]
AAA \normalizedAAA
% ok
\normalizebodyfontsize\normalizedBBB\BBB
\switchtobodyfont[\normalizedBBB]
BBB \normalizedBBB
\stoptext
Is this code correct? Or it's better for some reason using "definebodyfontenvironment"?
--
Dmitriy
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2013-08-04 12:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-04 10:29 Dmitriy Tokarev
2013-08-04 10:45 ` Philipp Gesang
2013-08-04 10:48 ` Philipp Gesang
2013-08-04 12:27 ` Dmitriy Tokarev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28961375619221@web16h.yandex.ru \
--to=dtkrv@ya.ru \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).