Skip to content

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 ?

@hackl hackl self-requested a review October 4, 2025 15:39
@hackl hackl self-assigned this Oct 4, 2025
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.

2 participants