julienlabbe / latex-packages

LaTeX packages
LaTeX Project Public License v1.3c
0 stars 0 forks source link

Undefined control sequence error with tikz option #1

Closed quark67 closed 1 week ago

quark67 commented 1 week ago

According to the manual (section 3.6, page 11), I use this code (with pdflatex):

\documentclass{article}
\usepackage[tikz]{overarrows}
\NewOverArrowCommand[tikz]{\overtikzarrow}{}

\begin{document}
Test $\overtikzarrow{v}$
\end{document}

Result:

Undefined control sequence.
<argument> \overtikzarrow 

l.3 \NewOverArrowCommand[tikz]{\overtikzarrow}{}
Undefined control sequence.
<argument> ovar@\overtikzarrow 
                               @normal
l.3 \NewOverArrowCommand[tikz]{\overtikzarrow}{}
Undefined control sequence.
<argument> ovar@\overtikzarrow 
                               @starred
l.3 \NewOverArrowCommand[tikz]{\overtikzarrow}{}
Undefined control sequence.
<argument> \overtikzarrow 

l.3 \NewOverArrowCommand[tikz]{\overtikzarrow}{}
Undefined control sequence.
<recently read> \overtikzarrow 

l.6 Test $\overtikzarrow
                        {v}$

So, how to use this package with the Tikz drawn ?

julienlabbe commented 1 week ago

It works for me. I suspect you have an old version of the package overarrows. Initially (versions 1.0 and 1.1), commands should be defined without the backslash \:

\NewOverArrowCommand[tikz]{overtikzarrow}{}

The common syntax, with the backslash \ like in \newcommand or \NewDocumentCommand is supported since the version 1.2, released the 2024-07-11. Now both

\NewOverArrowCommand[tikz]{\overtikzarrow}{}

and

\NewOverArrowCommand[tikz]{overtikzarrow}{}

are accepted.

quark67 commented 1 week ago

Thanks for the explanation. Yes, the package version was older than 1.2 (and I read the documentation on the CTAN, so the documentation for the current version). Perhaps can you add a note in the documentation about the restriction in the older versions ? And also in the changelog (the current section 5.4 of the documentation says nothing about this change).

julienlabbe commented 1 week ago

Thanks for the feedback. In fact, there's a little mention of the change in the section 4.2.1 Macro for commands creation. It was not clearly documented as the backward compatibility is assured (no breaking change, old codes still work with the new version).