ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Philipp Gesang <Philipp.Gesang@alumni.uni-heidelberg.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Setup font size by dimension variable
Date: Sun, 4 Aug 2013 12:48:05 +0200	[thread overview]
Message-ID: <20130804104805.GB3182@phlegethon> (raw)
In-Reply-To: <20130804104556.GA3182@phlegethon>


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

···<date: 2013-08-04, Sunday>···<from: Philipp Gesang>···

> ···<date: 2013-08-04, Sunday>···<from: Dmitriy Tokarev>···
> 
> > Hi all,
> > 
> > I want to set the font size by using the dimension variable, but it doesn't work. What am I doing wrong?
> > 
> > \definemeasure[AAA][20pt]
> > \newdimen\BBB \BBB=20pt
> > 
> > \starttext
> > TEXT
> > 
> > % don't work
> > \switchtobodyfont[\measure{AAA}]
> > AAA
> > 
> > % don't work
> > \switchtobodyfont[\the\BBB]
> > BBB
> > 
> > % ok
> > \switchtobodyfont[20pt]
> > TEXT 20pt
> > 
> > \stoptext
> 
> Hi Dmitriy,
> 
> 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

[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 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
___________________________________________________________________________________

  reply	other threads:[~2013-08-04 10:48 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 [this message]
2013-08-04 12:27     ` [***SPAM***] " Dmitriy Tokarev

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=20130804104805.GB3182@phlegethon \
    --to=philipp.gesang@alumni.uni-heidelberg.de \
    --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).