TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 7 down vote accepted

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.

share|improve this answer
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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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