-
Notifications
You must be signed in to change notification settings - Fork 3
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
Memoize produces an extern over and over again when used with the todo package #26
Comments
Sorry, I'm a bit swamped here, but I'll try to look into it asap. |
In general, memoize doesn't automatically treat a command which uses Running the MWE produces this, which seems somewhat weird: \mmzUsedCMemo {memos/3E9506E82B16BC2B8D51514961456FDF.memo}
\mmzNewCMemo {memos/3E9506E82B16BC2B8D51514961456FDF.memo} I thought it identified the memos by the hashes in their names, but I guess that was naïve.
\documentclass{scrartcl} % wouldn't article do?
\usepackage{todo}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node {\ref{myLabel}};
\end{tikzpicture}
\begin{tikzpicture}
\node [green,draw] {\Todo{missing green}};
\end{tikzpicture}
\begin{tikzpicture}
\node [blue,draw] {\todo{missing blue}};
\end{tikzpicture}
\begin{tikzpicture}
\node [red,draw] {\todo*{missing red}};
\end{tikzpicture}
\section{mySection} \label{myLabel}
xyz
\todos
\end{document} which produces the following \relax
\providecommand*\new@tpo@label[2]{}
\newlabel{todopage:1}{{1}{1}{}{}{}}
\newlabel{todopage:2}{{2}{1}{}{}{}}
\newlabel{todopage:3}{{3}{1}{}{}{}}
\@writefile{toc}{\contentsline {section}{\numberline {1}mySection}{1}{}\protected@file@percent }
\newlabel{myLabel}{{1}{1}{mySection}{}{}}
\newlabel{todolbl:1}{{1}{2}{mySection}{}{}}
\newlabel{todolbl:2}{{2}{2}{mySection}{}{}}
\newlabel{todolbl:3}{{3}{2}{mySection}{}{}}
\gdef \@abspage@last{2} But you don't really need to worry about the references to the list of to-dos. Because you're not using hyperref (and, if you were, memoize would break the links anyhow) and the default format, at least, only displays the counter, which is determined when the to-do is inserted rather than when the item in the to-dos is written. For the basic case, what matters is that the picture be regenerated if the value of One is that in the case of both The other is the So I don't think treating these as cross-refs is obviously the right strategy here. Something more similar to label? |
First of all sorry for the long delay from my side. Hm, ok I see.
Well in the end I am, it was just not necessary for the mwe. But I also thought, memoize would keep the links due to the But well for now I think the solution for me is to simply skip the memoization of those "pictures" (at some point in time the todo should be resolved after all and I personally delete the todo so then I can enable memoization again). I'd just keep this issue open to track this and to close it when/if this is really resolved (especially the weird thing that memoize doesn't seem to recognize the already present extern) |
Hi,
I quite frequently use the todo latex package when writing documents. Now when inserting a
\Todo
in e.g. a tikzpicture (which is memoized) I get some strange behavior and the extern for that image is produced over and over again. But see for yourself:Note that I'm using two tikzpictures, one using a simple
\ref
(for reference) and one using the\Todo
. Also note the comments I inserted in the (shortened) output below.Stripped output with comments
I have to admit, I'm not that familiar with the cross-referencing part but I think since
\Todo
uses\ref
internally, it should work out of the box, shouldn't it?So there may be one or two issues here:
todo
package does not work. But ok,todo
is not aware ofmemoize
and so I'd need to configure this manually, so maybe no real problem at all (still, I thought it would work automatically due to the usage of\ref
internally). Of course in the case I'd be interested in how one would make\Todo
/\todo
work. As far as i read the examples regarding theref
key, they all refer to commands which have the label they are refering to as argument.For reference
Complete output for reference
The text was updated successfully, but these errors were encountered: