Reputation
85,175
Next tag badge:
132/100 score
19/20 answers
Badges
19 222 462
Impact
~3.0m people reached

Jul
17
comment Are tikzmark and tikzexternalize incompatible? [targeting sub-nodes]
You need to do make -B -f filename. Though thinking about it, it might be best to modify the makefile to do two runs on each figure.
Jul
17
comment Are tikzmark and tikzexternalize incompatible? [targeting sub-nodes]
xelatex has other issues. With pdflatex, did you run the make command twice?
Jul
16
comment Tikz generated PDF produces ? when citing references
I see that you're using the externalisation library. That causes issues with references - have you read the section in the manual about how to enable them?
Jul
16
answered Are tikzmark and tikzexternalize incompatible? [targeting sub-nodes]
Jul
16
comment Are tikzmark and tikzexternalize incompatible? [targeting sub-nodes]
I meant in the output. I was thinking of building up the text as a series of actual nodes (or rather as a multipart node) but I don't think that would be easy with multi-lines. How about putting the pictures in individual files, compiling them separately, and \includegraphicsing them into the master document?
Jul
16
comment Are tikzmark and tikzexternalize incompatible? [targeting sub-nodes]
Your nodes with subnodes, are they all single line text? (ie no line breaks)
Jul
16
comment Are tikzmark and tikzexternalize incompatible? [targeting sub-nodes]
Okay, the basic problem is that the externalisation library disables writing the aux files for the pictures and tikzmark relies on saving information in the auxfile. So you need to re-enable the auxfile, but even doing that then it doesn't work properly (I get that the arrow is the right size but displaced) probably due to the page cropping.
Jul
16
comment Are tikzmark and tikzexternalize incompatible? [targeting sub-nodes]
You need to force it to compile twice which externalize won't naturally do. Use the force remake key.
Jul
15
comment Are tikzmark and tikzexternalize incompatible? [targeting sub-nodes]
Almost certainly! Do you need the \draw command to be part of a different tikzpicture? It ought to work if you put it as part of the original one.
Jul
15
comment tikzmark and xelatex
@cfr Well, it does. If I change the node {\pgfmark{nA} to coordinate (nA) and adjust the line drawing code accordingly then it works. So it solves the problem in that it gives code that works as expected. As I said above, \tikzmark and \pgfmark should not be used inside a tikzpicture because that is effectively putting a tikzpicture inside a tikzpicture and this Should Not Be Done. So while there may well be an underlying bug that should be squished, as far as the MWE in this question it doesn't need squishing to get code that will do what is wanted.
Jul
15
comment pgf inside macro
@egreg A little more experimenting shows that pgfplots suffers from the same issues. Freezing semi-colons as active disrupts the \addplot parser. So I'm inclined to say that "catcodes are tricksy" and that delimited macros are a nightmare. Which is a shame as they can be quite useful.
Jul
15
comment pgf inside macro
@egreg The TikZ parser goes to quite extreme lengths to avoid issues with changing catcodes to make it "just work". Whoever wrote the declare function part didn't go to the same lengths. I don't think that's really a problem with declare function, I think rather whoever wrote the TikZ code is to be congratulated for going to such great lengths to avoid the issue. (A particularly neat trick is that an active ; is defined to expand to a non-active ; and then arguments are expanded in an \edef before the parser sees it.).
Jul
14
answered Tikz: Once punctured torus?
Jul
14
answered pgf inside macro
Jul
12
comment Corners of 3D cube extend beyond where they meet / tikz / draw
@GonzaloMedina Yes, the clipping approach does work here.
Jul
12
comment Corners of 3D cube extend beyond where they meet / tikz / draw
See also my answer here: tex.stackexchange.com/a/30102/86
Jul
12
comment Corners of 3D cube extend beyond where they meet / tikz / draw
Whoa! I didn't mean to unilaterally close this! Obviously, the rules have changed since I last voted to close a question. If the linked question doesn't answer your problem, edit your question to explain why and it'll get reopened.
Jul
12
comment pgf inside macro
Or you could redefine declare function to take an active semi-colon. Or you could be even more sophisticated and have it try to detect the catcode of ; at invocation time and behave according. Which is the right solution depends on how you are using semi-colons in the rest of the document.
Jul
12
comment pgf inside macro
The problem is with the semi-colon in the define function. Because you are using Babel, at the start of the document (but crucially not before), ; is made active. So the ; in the define function bit is an active semi-colon. However, the code executed by define function is expecting ; with catcode of other so it panics. The solution depends on what you're doing in the rest of the document. You can switch ; back to 12 using \shorthandoff{;} before the \mymacro call but then it is disabled inside the \mymacro call (and you need to switch it back on after).
Jul
12
comment pgf inside macro
What happens if you comment out all references to babel?