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

fix for #25 breaks memoize on LuaTeX #34

Closed
cfr42 opened this issue Dec 1, 2024 · 3 comments
Closed

fix for #25 breaks memoize on LuaTeX #34

cfr42 opened this issue Dec 1, 2024 · 3 comments

Comments

@cfr42
Copy link
Contributor

cfr42 commented Dec 1, 2024

Refs: https://tex.stackexchange.com/q/731942/
Suspect commit: 40f67e2
Related: #25

This is Jasper's example:

\documentclass{article}
\usepackage{memoize}
\usepackage{tikz}
\begin{document}
\tikz \draw[red] (-5,-5) rectangle (5,5);

Hello World!

\tikz \draw[green] (-5,-5) rectangle (5,5);
\end{document}

jasper-test.log

If I amend the example as follows

\documentclass{article}
\usepackage{memoize}
\usepackage{tikz}
\ExplSyntaxOn
\makeatletter
\sys_if_engine_luatex:T
{
  \def\mmz@shipout@unrotate{}%
}
\makeatother
\ExplSyntaxOff
\begin{document}
\tikz \draw[red] (-5,-5) rectangle (5,5);

Hello World!

\tikz \draw[green] (-5,-5) rectangle (5,5);
\end{document}

it compiles fine. [Sorry - I know you don't like expl3.]

Jasper reports that adding \makeatletter\def\mmz@shipout@unrotate{}\makeatother to the preamble results in compilation successful compilation with updated TeX Live, whereas I tested with TeX Live pre the November LaTeX release. (I used a clone of your repo to test as the older memoize doesn't produce the error.)

cfr42 pushed a commit to cfr42/memoize that referenced this issue Dec 1, 2024
sasozivanovic added a commit that referenced this issue Dec 2, 2024
In LuaTeX, `\pdfpageattr` --> `\pdfvariable pageattr`.

Addresses #34.
@sasozivanovic
Copy link
Owner

Thanks for reporting this, and for the pull request — even if I didn't use it, as I changed the offending \pdfpageattr to \pdfvariable pageattr instead (c862f94). It completely slipped my mind I have to do this for LuaTeX.

Once I have more time on my hands, I need to investigate (as you have suggested on TeX.SE) whether the "unrotate" fix is even needed in LuaTeX.

@cfr42
Copy link
Contributor Author

cfr42 commented Dec 2, 2024

Thanks for reporting this, and for the pull request — even if I didn't use it, as I changed the offending \pdfpageattr to \pdfvariable pageattr instead (c862f94). It completely slipped my mind I have to do this for LuaTeX.

It was only in case you didn't have time to do anything else on the grounds it would then be less broken on LuaTeX. I didn't check what happened with rotation - I just copied the XeTeX code on the grounds something which worked in non-rotation cases would be better than something which didn't work at all ....

@sasozivanovic
Copy link
Owner

I just copied the XeTeX code on the grounds something which worked in non-rotation cases would be better than something which didn't work at all ....

A perfectly sound approach!

It was only in case you didn't have time to do anything else on the grounds it would then be less broken on LuaTeX.

And I indeed don't have the time to explore the LuaTeX situation further right now, or to address the other issue (#33) you have raised recently. Soon(ish) ... and thanks again for all the reports and TeX.SE activity!

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

2 participants