3
\documentclass[12pt]{amsbook}
\usepackage{amsmath}
\usepackage{dynkin-diagrams}


\begin{document}
 
$\mathbb{K}$ can be displayed and so can \dynkin[labels = \theta] A1 
but replacing $\theta$ by $\mathbb{K}$ (both without dollar signs in the actual command) yields an error what goes wrong and how do you fix it?

Thanks a lot,
Hercule
\end{document}
3
  • Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it).
    – dexteritas
    Jan 17, 2022 at 10:12
  • thanks very much Jan 17, 2022 at 20:14
  • I cannot reproduce the problem with a 2021 TeX installation. You could try with \dynkin[label,labelmacro/.code={\mathbb{K}}] A1 . Jan 19, 2022 at 10:43

3 Answers 3

4
+100

It seems that with the latest version of the package (which should be included in a 2021 TeX installation, you should actually be able to write \dynkin[labels={\mathbb{K}}] A1 (even without curly brackets).

As an alternative approach, you can try using the label macro option like in the following example:

\documentclass[12pt]{amsbook}
\usepackage{amsmath}
\usepackage{dynkin-diagrams}

\begin{document}
 
$\mathbb{K}$ can be displayed and so can \dynkin[label,label
macro/.code={\mathbb{K}}] A1 .

\end{document}

enter image description here

See the package documentation at "8. Label subscripts".

0
3

You could try:

\documentclass[12pt]{amsbook}
\usepackage{dynkin-diagrams}
\begin{document}
\dynkin[labels={K},label macro/.code={\mathbb{#1}}] A1 
\end{document}

enter image description here

which will put all labels in to the mathematics blackboard font; I suppose that is probably what you want. But I admit I need to work out why your first guess:

\dynkin[labels={\mathbb{K}}] A1 

doesn't work. I can confirm that it doesn't work with the last version of the dynkin-diagrams package.

2
  • 1
    The latter does work with dynkin-diagrams 2021/04/04 for me (using PDFLaTeX). Jan 19, 2022 at 12:49
  • Thanks both for your help, I could not split bounty points so gave it to Jasper as he was first. Jan 19, 2022 at 23:59
0

I don't have enough reputation to comment yet, and I'm not sure if this is relevant enough but I thought I'd add something in case someone as silly as me runs into the same issue.

If you have the underscore package loaded you will run into the "Missing number, treated as zero" error when you use a label like \alpha_1 in the diagram.

\documentclass{article}
\usepackage{dynkin-diagrams}
\usepackage{underscore}

\begin{document}
$ \dynkin[Coxeter, gonality=3, label, labels={\alpha_1,2}] I{} $
\end{document}

will result in

1

rather than the following, if \usepackage{underscore} is removed

2

3
  • 1
    Welcome to TeX.SE!
    – Mensch
    Oct 9, 2022 at 17:08
  • With use of recent version of MiKTeX I can't reproduce your result. Try to upgrade your LaTeX installation. BTW. your answer is more like to new question than answer.
    – Zarko
    Oct 9, 2022 at 17:38
  • With the most recent TeXLive, I can't reproduce this error. Nov 22, 2022 at 15:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .