Is it possible to run pdftex with a specific map file that is not named pdftex.map? I am aware that I can specify a search path for map files using the environmentvariable TEXFONTMAPS, but it seems that pdftex only uses a map file from this path if it is called pdftex.map.

Some background: I am developing a font package and would like to generate a font chart using fontchart.tex from the build directory without the need to install the font. pdftex has access to all necessary files (TFM, PFB and ENC files plus the map file), but doesn't process the map file since it is not called pdftex.map.


See documentation of pdfTeX (pdftex-a.pdf). You can use e.g. \pdfmapfile in you document. Or to quote the documentation:

If you want to use a base map file name other than pdftex.map, or change its processing options through a pdfTeX format, you can do this by appending the \pdfmapfile command to the \everyjob{} token list for the -ini run, e. g.: \everyjob\expandafter{\the\everyjob\pdfmapfile{+myspecial.map}} \dump This would always read the file myspecial.map after the default pdftex.map file.

  • Thanks. I had a look at the documentation, but concentrated on command line options. – Michael Ummels May 30 '11 at 18:36

For a run-time version, this is the call from the shell

pdftex "\pdfmapfile{+myspecial.map}\input test"
pdflatex "\pdfmapfile{+myspecial.map}\input{test}"

If you say \pdfmapfile{myspecial.map} this will substitute completely pdftex.map; with \pdfmapfile{=myspecial.map} entries in myspecial.map will override those in pdftex.map if the font name (precisely the tfm file name) match.

  • Thanks. Actually, the \pdfmapline primitive is even more convenient for me. – Michael Ummels May 30 '11 at 18:55
  • @Michael Ummels: The usage is just the same, but of course you've already discovered it. – egreg May 30 '11 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.