[texhax] query font size in document

Uwe Lück uwe.lueck at web.de
Wed Jan 2 00:17:08 CET 2013


[summary: \f at size]

Am Dienstag, den 01.01.2013, 10:17 -0800 schrieb Pierre MacKay:
> On 01/01/2013 05:27 AM, Dr A K Hannaby wrote:
> > Tug

I am not Tug, not even a member of TUG, may I answer though?
(Or have you ever met Tux, http://en.wikipedia.org/wiki/Tux?)

> > In Latex, 

Latex is the stable dispersion (emulsion) of polymer microparticles 
in an aqueous medium. (http://en.wikipedia.org/wiki/Latex)

> > is there a construction to (temporarily) query what is the font size
> > currently being used?
> > 
> > Running amsbook under Miktex 2.9

This information is not needed, you may be following obsolete rules 
about asking questions on mailing lists properly, maybe insisted on 
by Robin Fairbairns only, just for the sake of intimidating newbies.
(I do not know what kind of dispersion miktex is, but it reminds me 
of Tux, see above, as a kind of opposite. Or of the Mixtecs, 
http://en.wikipedia.org/wiki/Mixtecs.)

> \show\the\font is a basic TeX sequence which ought to work in LaTeX.
> It should be placed immediately following a word that you know ought
> to be in the font you want to identify.  It will temporarily suspend
> TeX, which can be started again with a CR.  It should have no effect
> on the DVI output, but will be recorded in the log file. You can also
> get at the standard \fontdimen s such as \fontdimen2, the default
> interword skip in  similar ways.  \show\thefont will drill down to the
> original basic font definition, which may not be the way LaTeX chooses
> to refer to it.

Is this a way to find the answer for the OP's question on "what is the
font size currently being used?" Actually, I am away from my TeXbook, 
I believe there is some <m> such that \fontdimen<m>\font is the current 
em size, which may be a good guess ...

Now for something completely different. Thinking of Leslie Lamport's 
LaTeX, in latex.ltx we find:

    \def\set at fontsize#1#2#3{%
        \@defaultunits\@tempdimb#2pt\relax\@nnil
        \edef\f at size{\strip at pt\@tempdimb}%

>From this we learn that  \f at size (in \makeatletter mode, or 
"the token"), expands to a number <p> such that the current 
font size is <p>pt. (Perhaps due to NFSS, not Lamport.)

Also, \@currsize has the same expansion as the most recent 
LaTeX font size command processed in "typesetting mode"
(such as \small).

Hope that helps, or the reader is shuddering

 -- 29 April (according to the Mixtec naming scheme)


P.S.: I see that Mixtecs even live in the United States, 
(http://en.wikipedia.org/wiki/Mixtec_transnational_migration) 
maybe TUX, sorry, the TUG has Mixtec members who can help you better.

P.P.S.: As Indiana Jones will find out soon, one of the famous
Mixtec codices apparently was typeset with a kind of early version 
of MiKTeX (-5.0.2). Almost at the same time (astonishingly), 
Gutenberg experimented with MaGTeX in Mainz (Germany). 
Today, local announcement codices (such as "Mrs. 15 Ocelot 
will celebrate her 94th birthday on her husband's, Mr. 20 Jaguar's, 
funeral on Friday") usually are typeset with MixTeX.




More information about the texhax mailing list