[xyz-ips snippet=”intro”]
[xyz-ips snippet=”img1″]01/01[xyz-ips snippet=”img2″]
[xyz-ips snippet=”fig1″]Figure 1.1 – A classic LaTeX picture drawing[xyz-ips snippet=”fig2″]
\documentclass[border=30pt]{standalone}
\begin{document}
\setlength{\unitlength}{1cm}
\begin{picture}(1,1)
\put(0,0){\circle{1}}
\put(-0.5,0){\line(1,0){1}}
\put(-0.3,0.06){text}
\end{picture}
\end{document}
[xyz-ips snippet=”img1″]01/01[xyz-ips snippet=”img2″]
[xyz-ips snippet=”fig1″]Figure 1.2 – Our first TikZ drawing[xyz-ips snippet=”fig2″]
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{quotes}
\begin{document}
\begin{tikzpicture}
\draw circle (0.5);
\draw (-0.5,0) to ["text"] (0.5,0);
\end{tikzpicture}
\end{document}
Not that if you load the babel package with activated shorthand ” for German umlauts/accents such as in “Schön”, you may need to disable it to use the quotes syntax, either before or within the TikZ picture. For example:
\documentclass[border=10pt]{standalone}
\usepackage[ngerman]{babel}
\usepackage{tikz}
\usetikzlibrary{quotes}
\begin{document}
\begin{tikzpicture}
\shorthandoff{"}
\draw circle (0.5);
\draw (-0.5,0) to ["text"] (0.5,0);
\end{tikzpicture}
Sch"on.
\end{document}
[xyz-ips snippet=”chapter1″]02[xyz-ips snippet=”chapter2″]