-
Notifications
You must be signed in to change notification settings - Fork 110
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
\verb
is omitted from anchor
example code?
#1267
Comments
anchor
example \verb
is omitted ?\verb
is omitted from anchor
example code?
Which document class did you use?
\AtBeginDocument{\MakeShortVerb{\|}} An \documentclass{ltxdoc}
\begin{document}
normal text
|verb text|
\end{document} PS: The command \documentclass{article}
\usepackage{shortvrb}
\MakeShortVerb{\|}
\begin{document}
normal text
|verb text|
\end{document} |
When used as part of a node text, both the short verb For the sake of using \documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[node font=\ttfamily]
\node (shape) at (0,2) [draw] {class Shape};
\node (rect) at (-2,0) [draw] {class Rectangle};
\node (circle) at (2,0) [draw] {class Circle};
\node (ellipse) at (6,0) [draw] {class Ellipse};
\draw (node cs:name=circle,anchor=north) |- (0,1);
\draw (node cs:name=ellipse,anchor=north) |- (0,1);
\draw [arrows = -{Triangle[open, angle=60:3mm]}]
(node cs:name=rect,anchor=north)
|- (0,1) -| (node cs:name=shape,anchor=south);
\end{tikzpicture}
\end{document} |
Verbatim material inside node text does work. The parser uses pgf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex Lines 3865 to 3916 in 425b03d
|
Ah you're right! Then the \begin{codeexample}[preamble={\usepackage{shortvrb} \MakeShortVerb{\|}}] Or, as originally suggested, use |
Since no actual verbatim is required for the example, I prefer your proposal of simply changing the node font to |
Signed-off-by: muzimuzhi <muzimuzhi@gmail.com>
Signed-off-by: muzimuzhi <muzimuzhi@gmail.com>
Version
3.1.10
Details
In manual §13.2.3 anchor example code:
I compile this code with PDFLaTeX, the output is different from the manual:
After replacing
|
with\verb|
the output is same as the manual:The text was updated successfully, but these errors were encountered: