A \tikz
command should be delimited by a corresponding ;
.
What happens with your code is that the first \tikz
instruction is not properly delimited. I slightly reformatted the code (but this is not influential and just allows to be able to see the entire code on the screen)
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary {graphs}
\usetikzlibrary{quotes}
\tikzgraphsset{
empty nodes,
nodes={circle, draw, inner sep=0pt, minimum size=2pt},
counterclockwise, radius=6pt, phase=210,
}
\tikzset{
baseline=-2pt,
every label/.style={font=\tiny, inner sep=0pt},
dashed/.style={dash pattern=on 1pt off 1pt},
label distance=1pt,
}
\begin{document}
Let $\mathcal{H}$ be \{\tikz \graph[n=3]{1,2,3;1--2,1--3,2--3}\} and
$\sigma$ be \tikz \graph[n=2, phase = 180] {1,2;2["2"'right],1["1"'left];1--2};
Let $\mathcal{H}$ be \{\tikz \graph[n=3]{1,2,3;1--2,1--3,2--3}\} and
$\sigma$ be \tikz \graph[n=2, phase = 180] {1,2;2["2"'right],1["1"'left];1--2};
\end{document}
When running LaTeX and going past errors we get
! Package tikz Error: Giving up on this path. Did you forget a semicolon?.
See the tikz package documentation for explanation.
Type H <return> for immediate help.
...
l.20 ...{\tikz \graph[n=3]{1,2,3;1--2,1--3,2--3}\}
and
?
! Package tikz Error: Giving up on this path. Did you forget a semicolon?.
See the tikz package documentation for explanation.
Type H <return> for immediate help.
...
l.23 ...{\tikz \graph[n=3]{1,2,3;1--2,1--3,2--3}\}
and
?
so you clearly see that something goes wrong with the first appearance of the graph in both paragraphs.
I guess that the Omega appears in the second instance because TikZ has been left in an unstable state. It has to do several global settings, and errors in one tikzpicture
might lead to unexpected output in following ones. Why Omega? It's the character that sits at slot "0A
in the standard font; something was left behind and the strange character appears (an Omega used to show in some Xy-pic diagrams, due to a bug, for instance).
If you switch to T1-encoded fonts the output is

(after the two error messages).
The conclusion is: never disregard error messages and terminate properly \tikz
.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary {graphs}
\usetikzlibrary{quotes}
\tikzgraphsset{
empty nodes,
nodes={circle, draw, inner sep=0pt, minimum size=2pt},
counterclockwise, radius=6pt, phase=210,
}
\tikzset{
baseline=-2pt,
every label/.style={font=\tiny, inner sep=0pt},
dashed/.style={dash pattern=on 1pt off 1pt},
label distance=1pt,
}
\begin{document}
Let $\mathcal{H}$ be \{\tikz \graph[n=3]{1,2,3;1--2,1--3,2--3};\} and
$\sigma$ be \tikz \graph[n=2, phase = 180] {1,2;2["2"'right],1["1"'left];1--2};
Let $\mathcal{H}$ be \{\tikz \graph[n=3]{1,2,3;1--2,1--3,2--3};\} and
$\sigma$ be \tikz \graph[n=2, phase = 180] {1,2;2["2"'right],1["1"'left];1--2};
\end{document}
Note ;\}
. No error and expected output. On the other hand, you should use math mode braces:
Let $\mathcal{H}$ be $\{\tikz \graph[n=3]{1,2,3;1--2,1--3,2--3};\}$ and
$\sigma$ be \tikz \graph[n=2, phase = 180] {1,2;2["2"'right],1["1"'left];1--2};
but it's a different concern.
