Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"You can't use a prefix with `\begingroup' " #29

Open
urrameu opened this issue Oct 2, 2020 · 0 comments
Open

"You can't use a prefix with `\begingroup' " #29

urrameu opened this issue Oct 2, 2020 · 0 comments

Comments

@urrameu
Copy link

urrameu commented Oct 2, 2020

Hi,

Writing the wrong combination of \providebool + \global\booltrue to the aux file may cause the error mentioned in the title.

The MWE below crashes on the second pass, but uncommenting the \def\blah{} lines makes the problem go away (I got this from a remark by Joseph Wright somewhere on tex.stackexchange.com).

Thanks!

\documentclass{article}
\usepackage{etoolbox}

\makeatletter
\AtEndDocument{ % or AtBeginDocument
  \immediate\write\@mainaux{\providebool{myboolI}}
  \immediate\write\@mainaux{\global\booltrue{myboolI}}
  %\immediate\write\@mainaux{\string\def\string\blah{}}

  \immediate\write\@mainaux{\providebool{myboolII}}
  \immediate\write\@mainaux{\global\booltrue{myboolII}}
  %\immediate\write\@mainaux{\string\def\string\blah{}}
}
\makeatother

\begin{document}\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant