[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pygments support in PDFs with LM fonts

From: Jean Abou Samra
Subject: Re: pygments support in PDFs with LM fonts
Date: Fri, 3 Dec 2021 21:04:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

Le 01/12/2021 à 14:06, Werner LEMBERG a écrit :
Here is my solution for using the LM typewriter fonts for pygments
support in texinfo.  It consists of the following.

* Files `lm-ot1.tex` and `lm-ot1-map.tex`.  They should be executed as

     export TEXINPUTS="<TeXLive>/fonts/afm/public/lm;"
     tex lm-ot1.tex
     tex lm-ot1-maps.tex

   to produce a bunch of files.  This expects that the 'lm' TeXLive
   package is installed.

* Run the created script ``.  After this, the
   following files are of interest:

     lmttr.tfm   Metric files in OT1TT encoding for the LM fonts.
     ot1tt.enc   An encoding file needed for the LM fonts.    A font mapping file to tell the TeX engine how to
                 use the LM fonts in the PDF output.

   All other generated files can be deleted.

   TeX uses the following environment variables for finding the various

     *.tfm:  TFMFONTS (or TEXFONTS)
     *.enc:  ENCFONTS
     *.map:  TEXFONTMAPS

   For testing it is sufficient to place the files into the current
   directory; however, for integration into LilyPond the environment
   variables are necessary.

* The demo file `pygments.texinfo` contains the new macro stuff and
   some tests; I've also appended the resulting PDF.

As can be seen, the LM fonts are a *light* version of CM typewriter.
This is not ideal IMHO, but...

Thanks a lot for preparing this.

Stupid question: how do I find the path to TeXLive
in the build system? Also, can we rely on TeX being
installed via TeXLive? (This is a genuine question.)
Do we have CG instructions to update with respect
to having lm and fontinst installed?

Again, thanks!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]