Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to run pdftex with a specific map file that is not named 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

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

share|improve this question

2 Answers 2

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, 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{}} \dump This would always read the file after the default 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{}\input test"
pdflatex "\pdfmapfile{}\input{test}"

If you say \pdfmapfile{} this will substitute completely; with \pdfmapfile{} entries in will override those in 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.