Fonts & Character SetsUsage of \fontsize{}{} with \f@baselineskip

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
Julian_S_Moore
Posts: 72
Joined: Sun Nov 16, 2008 1:26 pm

Usage of \fontsize{}{} with \f@baselineskip

Post by Julian_S_Moore »

I want to have a series of letters (e.g."SSS") slowly decreasing in size; I would like to reference the current font size and decrement it. [Using TeXnicCenter and MiKTeX 2.7] Google and forum search here haven't helped... I am a complete beginner at this (though I have managed to get XeLaTex to include the weird fonts I am using.) - so apologies if this is a really dumb question.

I know the syntax is: \fontsize{size}{baselineskip} and the manual helpfully says that if I only want to change the size I should write e.g. \fontsize{12}{\f@baselineskip} (See e.g. http://www.latex-project.org/guides/fntguide.pdf, p8)

However, if I try that I get an "undefined control sequence" error, which then says
<argument> \f
@baselineskip
then "missing number" and "illegal unit of measure"

...and I can't find any information on \f or the @ symbol either.

The block in question looks something like this (other preamble etc. skipped)...

Code: Select all

\font\oddFont="Berylium/B/I/S=10" at 10pt
\begin{document}
\oddFont
You mus\fontsize{9}{\f@baselineskip}sst!
\enddocument
which comes out fine except for a complete absence of font-size change.

I was thinking that my decrement font size would eventually look like
\fontsize{\f@size-1}{\f@baselineskip} but...?

TIA - Julian

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Julian_S_Moore
Posts: 72
Joined: Sun Nov 16, 2008 1:26 pm

Re: Usage of \fontsize{}{} with \f@baselineskip

Post by Julian_S_Moore »

Ha!

If I preface access to \f@size and \f@baselineskip with \makeatletter (and then reset it afterwards) it works... because I now know that @ is a special symbol and unless TeX is told to treat it as a letter it won't...

This sort of thing is, to the beginner, bizarre language design - especially when (as I have seen courtesy of examples in documentation etc.) \makeatletter prefaces some code which does not contain the "@" yet still requires it because of code called - yet there is no way of knowing a priori that \makeatletter will be required. In other words, if you find a command that you think is just what you want, you really have to check the documentation on usage :cry:

I suppose it's just a historical thing... such are the pitfalls for the beginner.

NB I still can't get \makeatletter \fontsize{\f@size, 1.2\f@size} \makeatother to work (I can \typeout the \f@size, \f@baselineskip values but the \fontsize call is obviously inappropriate somehow) - but since no MWE is provided just take that as an observation... :)
Post Reply