Please consider the MWE below which just places an ISBN bar-code on the backpage of a book cover using the bookcover.cls



A text ...
more text ...



It works fine with "latex" and produces the correct bar-code. When attempting to use it with "xelatex" though we get the following error

ABD: EveryShipout initializing macros [1] (./mwe.aux)Error: /undefined in tx@Dict
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1916   1   3   %oparray_pop   1915   1   3   %oparray_pop   1899   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   1916   1   3   %oparray_pop   1915   1   3   %oparray_pop   1899   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1179/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
Current allocation mode is local
Current file position is 8
GPL Ghostscript 9.10: Unrecoverable error, exit code 1

The pst-barcode package works fine when used with "xelatex" under the article, book, report, ... classes. The problems seems to be related to the fact that bookcover uses "textpos" and its incompatibility with "pst-barcode" has been explored here in the past. Is there anything that can be done at the user-level in this case?

  • Under MiKTeX, I also have an ‘Unrecoverable error’, but nonetheless have a perfecly correct .pdf file. Did uou enable the --shell-escape switch? – Bernard Nov 7 '15 at 23:52

This bug is fixed in version 2.2

If you use version 2.1, then the next code works with xelatex and latex too:

\makeatletter\TP@absposfalse\makeatother\newgeometry{left=0em,top=-1em} % fixing code
\parbox[b][1in]{1.5in}{\psbarcode{978-85-85818-86-9}{includetext width=1.5 height=1}{isbn}}
  • Welcome to TeX.SX! Can you add a full example? I'm uncertain about \newgeometry not being followed by \restoregeometry. – egreg Nov 8 '15 at 14:56

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.