There are two issues: first you can't use \dynkin
inside of a dynkinDiagram
environment, you have to choose one or the other. Second for some reason the label list parser does not like \cosh
, so you can replace that with \text{cosh}
. To add a bit of space around the operator I added \,
in the code below.
To position the labels I added label directions={}
in the example below.
Note that I don't know anything about Dynkin diagrams, so probably the end result is not fully correct - but it does have labels.
MWE:
\documentclass{article}
\usepackage{dynkin-diagrams}
\begin{document}
\begin{center}
\dynkin[labels={m\,\text{cosh}\,\theta,1,2,3,,n-2,n-1,n,n+1},
label directions={,,left,,,,right,,},
scale=1.8,
extended] D{*ooo...oooo}
\end{center}
\end{document}
Result:
Following the comment from egreg below, you can also robustify \cosh
with etoolbox
to make the command survive processing by dynkin-diagrams
. This allows to use the original command instead of a poorly spaced \text{cosh}
. Note that if you want to use other non-robust commands then you need to robustify those separately.
\documentclass{article}
\usepackage{etoolbox}
\usepackage{dynkin-diagrams}
\robustify{\cosh}
\begin{document}
\begin{center}
\dynkin[labels={m\cosh\theta,1,2,3,,n-2,n-1,n,n+1},
label directions={,,left,,,,right,,},
scale=1.8,
extended] D{*ooo...oooo}
\end{center}
\end{document}