Take the 2-minute tour ×
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 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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.