To use stealth shaped arrow, I add this in preamble
\usetikzlibrary{shapes,arrows,chains,positioning,calc}
\usetikzlibrary{arrows.meta}
When compiling, the console gets stuck with
(C:\MiKTex\tex\generic\pgf\frontendlayer\tikz\libraries\tikzlibraryautomata.code.tex)
and there is no error message.
MWE:
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,chains,positioning,calc}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[scale=8]\centering
\usetikzlibrary{automata,positioning}
\tikzset{
%Define standard arrow tip
>=stealth',
%Define style for boxes
punkt/.style={
rectangle,
rounded corners,
very thick,
text width=6.5em,
minimum width = 5em,
minimum height=4em,
text centered},
% Define arrow style
pil/.style={
->,
thick,
shorten <=2pt,
shorten >=2pt,}
}
\node [punkt, draw = blue] at (0,0) {$x>y$};
\node [punkt, draw = red] at (0.8, 0) {$x<y$};
%
\node[] at (0.15, 0.03) (0up) {};
\node[] at (0.65, 0.03) (1up) {};
\path (0up) edge[pil, bend left=15] node [above] {A} (1up);
\node[] at (0.15, -0.03) (0down) {};
\node[] at (0.65, -0.03) (1down) {};
\path (1down) edge[pil, bend left=15] node [below] {B} (0down);
\end{tikzpicture}
\end{document}
My problem is that the MWE per se works well, but adding the same piece of code into my original tex file leads to the aforementioned problem.
Update: Finally found the the "MnonWE":
\documentclass[11pt]{article}
\usepackage{commath}
\usepackage{tikz}
% arrows in tikz
\usetikzlibrary{shapes,arrows,chains,positioning,calc}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[scale=8]
\tikzset{
%Define standard arrow tip
>=stealth',
%Define style for boxes
punkt/.style={
rectangle,
rounded corners,
very thick,
text width=6.5em,
minimum width = 5em,
minimum height=4em,
text centered},
% Define arrow style
pil/.style={
->,
thick,
shorten <=2pt,
shorten >=2pt,}
}
\node [punkt, draw = blue] at (0,0) {$\forall i:x_i>y_i$};
\node [punkt, draw = red] at (0.8, 0) {$\forall i:x_i<y_i$};
%
\node[] at (0.15, 0.03) (0up) {};
\node[] at (0.65, 0.03) (1up) {};
\path (0up) edge[pil, bend left=15] node [above] {A} (1up);
\node[] at (0.15, -0.03) (0down) {};
\node[] at (0.65, -0.03) (1down) {};
\path (1down) edge[pil, bend left=15] node [below] {B} (0down);
\end{tikzpicture}
\end{document}
So the file fails to compile only when \usepackage{commath} is included in preamble and $\forall i:x_i>y_i$ is used in the \node.
>=Stealth. – vi pa Jun 06 '21 at 19:13\centeringinside atikzpicture, but compile instead for me. Even load a library inside a tikzpicture is not good IMHO. – vi pa Jun 06 '21 at 19:23pdflatex? – vi pa Jun 06 '21 at 19:27\centeringand\usetikzlibraryinside works fine in the MWE. In the original file, the compiling gets stuck, but there is no specific error message. I compiled with both PDFTexify and PDFLaTex, results are similar – RandomBear Jun 06 '21 at 19:34\usetikzlibraryin the preamble, even though it seems to work in your MWE. That said though, you'll need to make an MWE that actually demonstrates the problem I think. Start with a copy of your original file, and remove as much code as you can without removing the problem. – Torbjørn T. Jun 06 '21 at 19:36%. – vi pa Jun 06 '21 at 19:45\draw ... \node ...instead of\draw ... node ...can create an infinite loop... – Rmano Jun 06 '21 at 20:51\documentclass{article} \usepackage{commath} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node {$:$}; \end{tikzpicture} \end{document}– hpekristiansen Jun 06 '21 at 23:24:active? – Rmano Jun 07 '21 at 06:17