Skip to content

Xe(La)TeX and \pdfobj #53

@ByronAhn

Description

@ByronAhn

Describe the bug
Compiling any document with Xe(La)TeX and accessibility.sty leads to an error in compiling; something like:

./accessibility.sty:81: Undefined control sequence.
<recently read> \pdfobj 
                        
l.81 \pdfobj
             reserveobjnum%

./accessibility.sty:81: LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.81 \pdfobj r
              eserveobjnum%
./accessibility.sty:82: Undefined control sequence.
<argument> ... c@StructTree\endcsname \pdflastobj 
                                                  \relax 
l.82 \setcounter{StructTree}{\pdflastobj}

It seems to me this is because \pdfobj is not a defined under the XeTeX engine (see this thread on tug.org).

To Reproduce
Steps to reproduce the behavior:

  1. Write a MWE that works under pdfTeX, e.g.:
\documentclass{article}
\usepackage{accessibility}
\begin{document}
This is a test.
\end{document}
  1. Try compiling that same .tex document using XeLaTeX, get errors.
  2. The compiled PDF looks like this:

reserveobjnum
=0=6
reserveobjnumThis is a test.

Expected behavior
It should compile, but it does not.

Version

  • Device: MacBook Air (M1, 2020)
  • OS: macOS 13.5.1
  • accessibility.sty Version: [2023/01/18 v. 2.1.0]
  • TeX Version: TeXLive 2021

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions