2

This question is related to this one. 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.

I've tried to follow these instructions on my format creation, without success. I've placed the instruction at the end of the pdftexconfig.tex file, the way it used to work in the pdftex.cfg file, but I get the error

MLTeX v2.2 enabled
***pdflatex.ini
(/texmf/tex/initex/pdflatex.ini (/texmf/tex/initex/pdftexcf.tex
! Missing { inserted.
<to be read again> 
                   {
l.23 \everyjob\expandafter{\the\everyjob
                                        \pdfmapfile{+cmfonts.map}}
? x

Otherwise (without this addition at the end of the pdftexcf.tex file) the format creation goes without trouble. Anyone's guess why is this the case?

Caveat: I shortened the name of the configuration file as I am running on DOS; for that very same reason, I cannot afford to run updmap.

  • 2
    I could reproduce that error message by setting the catcode of { to something other than 1. Can you put \showthe\catcode`\{ a line above that and report back, please? – Phelype Oleinik Aug 22 at 21:04
  • It's other (12). I initialized the grouping catcodes and now it works. I knew I was missing something, but didn't quite figure it out. – texnezio Aug 22 at 21:36
  • 1
    I posted an answer, for the record (and because I'm procrastinating, hard :-) – Phelype Oleinik Aug 22 at 22:10
1

The error was really strange-looking, at first, because \the\everyjob should expand to the contents of the \everyjob register, and then everything should work normally. The Missing { inserted message is clear: TeX was looking for a { (which is there, apparently), but didn't find it. The only way to have that is if { is not actually a {:

\everyjob{}
\catcode`\{=12
\everyjob\expandafter{\the\everyjob\pdfmapfile{+cmfonts.map}}

then the error message is the same:

! Missing { inserted.
<to be read again>
                   {
l.3 \everyjob\expandafter{\the\everyjob
                                       \pdfmapfile{+cmfonts.map}}
?

As GuM pointed out in the comment, INITEX does a barely minimal catcode setup, so that you can actually use it, and all other characters are initialised with catcode 12. The paragrah from The TeXBook:

When INITEX begins, it knows nothing but TeX's primitives. All 256 characters are initially of category 12, except that <return> has category 5, <space> has category 10, <null> has category 9, <delete> has category 15, the 52 letters A...Z and a...z have category 11, % and \ have the respective categories 14 and 0. It follows that INITEX is initially incapable of carrying out some of TeX's primitives that depend on grouping; you can't use \def or \hbox until there are characters of categories 1 and 2. The format in Appendix B begins with \catcode commands to provide characters of the necessary categories; e.g.,

\catcode`\{=1

In fact, if you were to skip the next (assuming at least a catcode-2 }, for the sake of sanity) error message (Too many }'s), and you did \showthe\everyjob you would see: {\pdfmapfile {+cmfonts.map. Delightful :-)

With that message TeX is telling you that it found an illegal token (here, anything non-expandable, non-{) while looking for a {. The bottom two context lines show that it didn't even arrive at \pdfmapfile, so that isn't the problem, and \everyjob is empty (we made sure of that above). The only thing left is the { itself. The <to be read again> line means that the token { will be read again after the missing { is inserted (TeX is funny).

Moral: TeX's error message are very clear in meaning. You just have to think really hard to understand some.


For the sake of completeness, in order to restore the original pdftex.cfg functionality, you must add

\begingroup
  \catcode`\{=1 %
  \catcode`\}=2 %
  \global\everyjob\expandafter{\the\everyjob\pdfmapfile{+cmfonts.map}}
\endgroup

at the end of the pdftexconfig.tex file. Edit the rest of the configuration file according to your needs.

  • 1
    The fourth paragraph on p. 39 of The TeXbook (a double dangerous bend paragraph, of course!) warns that “when INITEX [ = tex --ini] begins… all 256 characters are initially of category 12, except…” (a list of exceptions follows, that includes \, which has category 0, and %, which has category 14, but does not include { and }, which, therefore, remain of category 12). The paragraph continues: “It follows that INITEX is initially incapable of carrying out some of TeX’s primitives that depend on grouping”. I think you should add this quotation to your answer. – GuM Aug 22 at 23:23
  • @GuM Done. Thanks :-) – Phelype Oleinik Aug 22 at 23:34
  • Now I can upvote! ;-D ;-D ;-D – GuM Aug 23 at 14:30

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.