Hi Jon,
I'll give this a try. However, the problem I had was not commands
containing "f" in my source document, but commands containing "f" being
executed during the process (e.g. "\writefile."). The approach should avoid
the writefile commands that come into play for section headings, but may
still present a problem for equations, captions, index commands, etc.
For moving arguments, it would probably be easier just to use "\/" in line.
John Mullen
-----Original Message-----
From: Jonathan Flynn [mailto:***@flynn-web.freeserve.co.uk]
Sent: Tuesday, September 17, 2002 7:09 AM
To: miktex-***@lists.sourceforge.net;
miktex-***@lists.sourceforge.net; miktex-***@lists.sourceforge.net
Subject: RE: [MiKTeX] Suppressing Ligatures
Well, I messed up there a bit. There were two blindingly obvious errors in
my approach. First, you
need to have \catcode`f=\active when you're ready to break ligatures.
Second, the macro replacement
text should not contain the letter f. Fixing these problems gives the
definitions:
\let\eph=f
{\let\xxx=\gdef \catcode`f=\active \xxx f{\eph\relax}}
\catcode`f=\active %This line should appear in the document where you want
to start breaking ligatures.
As mentioned elsewhere in this thread, after \catcode`f=\active, you cannot
use any control sequences
that contain `f' in the name. However, this technique can still be used by
defining a suitable LaTeX
environment.
Here's a complete example. Run LaTeX or pdfLaTeX on the following:
------------------------------------------------------
\documentclass{article}
\let\eph=f
\def\makeFActive{\catcode`f=\active}
\def\makeFLetter{\catcode`f=11 }
{\let\xxx=\gdef \catcode`f=\active \xxx f{\eph\relax}}
\newenvironment{noFligs}{\makeFActive}{\makeFLetter}
\begin{document}
\section{Ligatures}
Here are some words containing ligatures.
find, difficult, influence, stuffy, affluent.
\hfill (?`!`Godd Eh!?)
\section{No Ligatures}
\begin{noFligs}
Here are the same words without ligatures.
find, difficult, influence, stuffy, affluent.
\makeFLetter\hfill\makeFActive (?`!`Godd Eh!?)
\end{noFligs}
\end{document}
------------------------------------------------------
The second section (No Ligatures) demonstrates how to handle control
sequences that contain `f' in
their name, (\hfill). It also shows that the inverted question mark and
exclamation mark ligatures
that are in cmr10 are not broken (?` and !`).
(ASIDE: Elsewhere in this thread, it was mentioned that the tt fonts do not
contain any ligatures.
However, the two ligatures ?` and !` *do* exist in cmtt10. Plain TeX and
LaTeX use a similar method
to the \catcode trick above to break these ligatures in verbatim mode.)
Moving arguments may need some care. For example, to break the ligature in
the section heading and the
table of contents, something similar to the following construction may be
needed:
\makeFActive\section{\protect\makeFActive Stuffy}\makeFLetter \label...
Of course, the noFLigs environment is only useful where there are large
blocks of text with few control
sequences.
An alternative approach would be to define your own \output routine that
intercepts the ligatures then
breaks them. Any ideas on this anyone?
Regards,
Jon Flynn
_______________________________________________________________________
Freeserve AnyTime, only £13.99 per month with one month's FREE trial!
For more information visit http://www.freeserve.com/time/ or call free on
0800 970 8890
-------------------------------------------------------
Sponsored by: AMD - Your access to the experts on Hammer Technology!
Open Source & Linux Developers, register now for the AMD Developer
Symposium. Code: EX8664 http://www.developwithamd.com/developerlab