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

15h
comment TikZ add frame to a picture
@oarfish Do Not Nest Tikzpictures. If you do, you're on your own and weird things can happen.
Aug
5
comment How to upload LaTeX-generated pdf paper to arXiv without LaTexXsources
@DavidSpivak Hadn't heard of pax (though I now see that it is mentioned in the pdfpages documentation). Looks worth a try if I ever end up doing this again, though one would need pax to work on the arXiv and one reason for doing this is that debugging arXiv's tex is haphazard.
Aug
3
comment TikZ: Intersection for Fraction Diagram
You could clip all subsequent drawing commands against the triangle (ie filldraw the triangle, then reuse the path with \clip and draw all the rest)
Jul
25
comment Saving and reusing/combining paths in TikZ?
@cfr No worries. (Note my comment about the different syntax; it was a complete rewrite.)
Jul
25
comment What is the code for the Halmos tombstone?
Me, I prefer to use Paulo's duck: arxiv.org/abs/1301.5493
Jul
25
comment Saving and reusing/combining paths in TikZ?
@cfr It already has, or at least an updated version (with different syntax): ctan.org/pkg/spath3
Jul
19
comment What is the easiest way to draw 3D cube with TikZ?
@rubenvb Fortunately, it doesn't matter who is "right". TikZ can draw it either way.
Jul
17
comment What is the easiest way to draw 3D cube with TikZ?
@rubenvb Technically, the thickening is correct since each line appears on its face so where you see two faces then you see two lines.
Jul
17
comment What is the easiest way to draw 3D cube with TikZ?
@rubenvb See my CW answer below for a link to a question about how to fix that issue.
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
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.).