Skip to content

Correct spurious prepend of labels #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

aagon
Copy link

@aagon aagon commented Mar 20, 2025

Hello Hr. Hackl,

First of all, thank you very much for this very useful package.

I have recently stumbled upon the issue mentioned in #6.

As M. Chareyron mentioned, the bug is reproducible only with french babel.

Indeed, when using the example you provided, namely :

\documentclass{standalone}
\usepackage{tikz-network}
\begin{document}
\begin{tikzpicture}
  \Vertex[position=above,label=a]{A}
  \Vertex[x=1,y=.7,position=below,label=b]{B}
  \Vertex[x=2,y=1,position=left,label=c]{C}
  \Vertex[x=2,position=right,label=d]{D}
  \Vertex[x=.2,y=1.5,position=75,label=e]{E}
\end{tikzpicture}
\end{document}

One gets the following, correct, result :

correct

However, when one includes babel, like so :

\documentclass{standalone}
\usepackage{tikz-network}
\PassOptionsToPackage{french}{babel}
\usepackage{babel}
\begin{document}
\begin{tikzpicture}
  \Vertex[position=above,label=a]{A}
  \Vertex[x=1,y=.7,position=below,label=b]{B}
  \Vertex[x=2,y=1,position=left,label=c]{C}
  \Vertex[x=2,position=right,label=d]{D}
  \Vertex[x=.2,y=1.5,position=75,label=e]{E}
\end{tikzpicture}
\end{document}

One gets this :

incorrect

I am not sure how tikz-network and babel interfere with each other. It is possibly due to how french babel treats cola. For this reason, the PR proposes to simply ditch the {position:label} syntax you use, and replace it with the equivalent and more robust {[label position = position]label}.

Applying the patch solves the issue on the example I provided, and I do not think it would break anything.

Thank you very much in advance.

Mit freundlichen Grüßen,

Aymeric

P.S. If you do indeed merge this, would you be so kind as to tag a new release, so that it gets distributed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant