[OS X TeX] scaling fonts in latex

Thomas A.Schmitz thomas.schmitz at uni-bonn.de
Wed Mar 23 03:59:03 EST 2005


Hi all,

strictly speaking, this is a general latex question and not related to 
OS X, but given the general expertise of users here, I dare ask it:

I'm trying to write a new latex package for switching to Greek fonts. 
It should take the name of the font as an argument, and it works as 
expected. Here's some code:

\DeclareOption{Gentium}{\def\GreekFont{genti}} % & a couple more fonts

\ExecuteOptions{Gentium}
\ProcessOptions

% Then, the font itself is declared like so:

\newcommand{\localgreek}[1]{%
   \begingroup
      \catcode`\~=12%
      \catcode`\"=12%
      \endlinechar=-1
      \fontfamily{\GreekFont}\selectfont%
      \scantokens{#1}%
    \endgroup
}

% The scantokens... stuff is needed to keep the catcode changes inside 
commands like tables or
% footnotes.

So I invoke the package
\usepackage[Gentium]{mypackage}

NOW the question: I would like to have a second option to the package 
that would scale the font in relation to the main bodyfont of the 
document, something similar to what the helvet.sty package does:
\usepackage[Gentium,scale=.95]
e.g., to scale the Gentium font to 95 %. I tried and looked in the 
helvet.sty to see how it is done there, but my latex knowledge just 
isn't sufficient to do this (I usually use context). I think I need the 
keyval package, but I can't see where the scale-declaration would go. 
Can anybody help?

Thanks

Thomas

PS I get the list as a digest, so if anybody replies, I'd be grateful 
if you could cc me.

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list