1

I am trying to move to locally running my documents. In doing this, I have actually been quite successful - all of my packages except one are running smoothly.

Pardon me if this is a silly question, but I can't seem to get memoize to work right now - which is strange, since it worked before. I just want some help troubleshooting the error.

\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} 

The log is huge, so I will post a snippet of it.

c:/Users/twill/TeX_Folder/MWE.tex:5: Undefined control sequence. <argument> \pdfpageattr {/Rotate 0} l.5 \tikz \draw[red] (-5,-5) rectangle (5,5); The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. [1] No file MWE.memo.dir/89CF3ABB71B828505525EA2E771A5C63-E778DCCCB8AAB0BBD3F6CFEEFD2421F8.pdf c:/Users/twill/TeX_Folder/MWE.tex:5: Undefined control sequence. <argument> \pdfpageattr {/Rotate 0} l.5 \tikz \draw[red] (-5,-5) rectangle (5,5); The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. 
19
  • 1
    no I just tried on lualatex and I get the same, you could try adding \usepackage{luatex85} before memoize to give the pdflatex names in lualatex but that should never be needed. there are others here with more knowledge of memoize though who will probably answer Commented Nov 30, 2024 at 21:10
  • 1
    @Jasper I just came back to delete my comment. I can reproduce without updating my system ;). now I have my own log ;). Commented Dec 1, 2024 at 2:27
  • 1
    @Jasper no, I mean NOT that ;). my guess is your log has the same error over and over. in any case, can you try adding \makeatletter\def\mmz@shipout@unrotate{}\makeatother to your preamble and see if that works? Commented Dec 1, 2024 at 2:40
  • 1
    @cfr you are right, it was in my working directory. It runs in a clean one Commented Dec 1, 2024 at 2:57
  • 1
    @cfr the problem was that you cant use \makeatother in a .sty (in my document) that's why it worked in a clean directory when I used it in the preamble. Commented Dec 1, 2024 at 3:06

1 Answer 1

2

Update: should be fixed in v1.4.1 if I'm not mistaken.


Reported at https://github.com/sasozivanovic/memoize/issues/34#issue-2708360076.

Workaround:

\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} 

Note that this may cause problems if you use pdflscape and create externs in landscape orientation when compiling with LuaTeX. I haven't checked this, but, if LuaTeX is used, the code undoes a commit intended to fix an issue with pdflscape. However, since that fix actually breaks memoize whether landscape is used or not when LuaTeX is used, undoing provides at least a quick fix if you're not rotating memoized content.

10
  • but I'm not sure the fix is even required with luatex? Commented Dec 1, 2024 at 4:35
  • 1
    @Jasper do you use TeX Live or MikTeX? Either way, don't remove it yet, no. The fix is on CTAN, but it takes at least a day or two for TeX Live to pick it up and the mirrors to sync. TeX Live picking it up requires somebody to manually re-package it from CTAN. But they are usually very quick. MikTeX usually take longer. Commented Dec 3, 2024 at 15:29
  • 1
    @Jasper It should be Sašo's tick really. Commented Dec 5, 2024 at 6:50
  • 1
    @Jasper well, I know he read my first comment ;). Commented Dec 5, 2024 at 7:04
  • 1
    @Jasper I just got the update from the Warwick server, so TL seem to have picked it up. Commented Dec 5, 2024 at 16:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.