[texhax] Problems with pxfonts/txfonts and lambda/Lambda + local macro modes

Johan Glimming glimming at kth.se
Sun Apr 10 16:45:29 CEST 2005


Dear TeXhax,

I have two different questions, so I decided to write them up in one 
single email.

1. I have had a hard time to typeset \lambda, \Lambda,
   and have still not figured out how to typeset
   \forall and \exists *nicely* while using pxfonts
   and txfonts. I use these fonts because in my
   opinion they look better on slides. However, I am
   using \mathtt{} for variables etc, and it looks
   extremely ugly with the tx/pxfonts math symbols.

   So, I introduced some hacks:

    \DeclareSymbolFont{greekletters}  {OML}{cmr}{m}{n}
    \DeclareSymbolFont{operators}     {OT1}{cmr}{m}{n}
    \DeclareMathSymbol{\lambda}{\mathalpha}
                      {greekletters}{"15}

    And then to write a nice lambda in mathtt{...}-
    contexts:

    \newcommand{\lam}[2]{\text{${\fontfamily{cmmii}
         \lambda}$}\tm{#1.\, #2}}

    Admittedly, this is an ugly hack, and my question
    -finally- is: can I more nicely change greek
    letters, and forall/exists to their standard
    mathtt format while using pxfonts/txfonts?

2. Suppose I have a bunch of local definitions in LaTeX, and wish to 
temporarilly
override some built-in macros, and set, say,
   \def\G{\Gamma}
   \def\L{\lambda}
   \def\D{\Delta}
for convenience. Is there a way to make a
"lambda mode" such that I can write
   \lambdaMode
   \endLambdaMode
rather than introducing brackets {...} which tends
to be cumbersome to match, and sometimes causes
hard-to-track-down errors in LaTeX?

Yours Sincerely,
Johan Glimming



More information about the texhax mailing list