[Tex/LaTex] get this error with pdflatex


First, apologies for not having an MWE, I know it makes things harder. I am unable to replicate the problem on a small example.

I suspect there is some kind of bug with multirow and pdflatex.

I keep getting the following error:

         ! pdfTeX error (\pdfsetmatrix): Unrecognized format..
         <to be read again> 
                              \endgroup \set@typeset@protect 

         !  ==> Fatal error occurred, no output PDF file produced!

If I remove a table that uses multirow, this error disappears. Note that line 511 is way after the multiraw statements in the tabular environment, it is a random place in the text.

I can't figure out why this is happening, and I googled the error in combination of bug, multirow, etc. and nothing comes up. Any ideas how to either isolate the problem to understand it better, or otherwise understand what is its source?

EDIT: My use of multirow is completely correct. If I use "latex" (instead of "pdflatex") with the .tex file, it compiles fine.

(For the multirow statements, I use the multirow package.)

Best Answer

Line 511 is the line, where TeX has decided to call the output routine to ship out a page. The output routine in LaTeX starts with:

\begingroup           % the \endgroup is put in by \aftergroup
  % ...
  \shipout \vbox{%
    \aftergroup \endgroup
    \aftergroup \set@typeset@protect

Right after the closing group for \vbox, the tokens \endgroup and \set@typeset@protect are inserted that you can see in the error message. Thus the error occurs very likely inside the \shipout of the page.

\pdfsetmatrix is usually used by pdftex.def, the graphics driver for the graphics/graphicx package for scaling/resizing and rotating.

For analysis the values of the argument of \pdfsetmatrix can be useful (unhappily it is not shown by the error message). But the argument can be printed on the screen or put into the .log file, if you can add the following at the begin of the document:

  \typeout{* setmatrix: [#1]}%
  • Perhaps you can also identify the problematic operation, e.g. \scalebox, \resizebox, or \rotatebox that causes the trouble. Of course, a minimal working example (MWE) would be nice.

  • Which version of pdftex.def do you use? The file can be located via

    kpsewhich pdftex.def

    The version number is part of the first line containing \ProvidesFile.

  • I do not think, there is any direct relation to package mutlirow.

Related Question