paolobrasolin / commutative-diagrams

CoDi: Commutative Diagrams for TeX
https://paolobrasolin.github.io/commutative-diagrams/
MIT License
30 stars 3 forks source link

How are nodes containing macros named? #39

Closed I0amLK closed 1 year ago

I0amLK commented 1 year ago

I am currently using the CoDi package to create commutative diagrams in LaTeX and I encountered an issue that I hope you could help me with.

Here is the minimal example to reproduce the problem:


\begin{codi}
    \obj { A_{\mathbb C} & B \\ };
    \mor A_{\mathbb C} f:-> B;
\end{codi}
paolobrasolin commented 1 year ago

Hi @I0amLK! Thanks for using CoDi and sorry for the delay.

The mechanism that automatically names nodes drops the special \ character, so you should drop it when referring to the nodes.

Here's a working example:

\documentclass[margin=.5cm]{standalone}
\usepackage{commutative-diagrams}
\usepackage{amsfonts}

\begin{document}

\begin{codi}[prompter]
    \obj { A_{\mathbb C} & B \\ };
    \mor A_{mathbb C} f:-> B;
\end{codi}

\end{document}

The prompter option decorates nodes with their names, so it's useful when you're unsure about automatically generated names: image