Skip to content
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

Loading unicode-math package conflicts with \Vbar #1392

Open
jperon opened this issue Dec 2, 2017 · 9 comments
Open

Loading unicode-math package conflicts with \Vbar #1392

jperon opened this issue Dec 2, 2017 · 9 comments
Labels

Comments

@jperon
Copy link
Contributor

jperon commented Dec 2, 2017

Here is an mwe :

\documentclass{scrartcl}
\usepackage{unicode-math}
\usepackage[autocompile]{gregoriotex}

\begin{document}
\Vbar
\gabcsnippet{(c4) <sp>V/</sp>.(f)}
\end{document}

If you comment out \usepackage{unicode-math}, the ℣ is shown normally ; otherwise, it disappears.

@henryso henryso added the TeX label Dec 3, 2017
@henryso
Copy link
Contributor

henryso commented Dec 3, 2017

unicode-math defines \Vbar. I guess we need to put a gre prefix on these as well. @rpspringuel What do you think? I don't think I'll have time to make this change and see it through before I leave for December.

@henryso
Copy link
Contributor

henryso commented Dec 3, 2017

I guess the alternative is to document this and that redefining the Vbar after loading packages (using gregorio macros) can override the unicode-math definition.

@jperon
Copy link
Contributor Author

jperon commented Dec 3, 2017

What I don't understand is that, gregoriotex being loaded after unicode-math, it should overwrite \Vbar. As is, it doesn't work ; but if I put \let\Vbar\undefined just before loading gregoriotex, it works.

@jperon
Copy link
Contributor Author

jperon commented Dec 3, 2017

Please forget my last comment : I had commented out \usepackage{unicode-math}. So even undefining \Vbar doesn't solve the problem.

@jperon
Copy link
Contributor Author

jperon commented Dec 3, 2017

While investigating a little more, I saw that :

  • if I put \gresimpledefbarredsymbol{V}{0.1em} before \begin{document}, the problem appears ;
  • if I put it after \begin{document}, the problem disappears.

So, I don't know how, but I think that unicode-math's definitions are made only at \begin{document}.

@rpspringuel
Copy link
Contributor

rpspringuel commented Dec 4, 2017 via email

@rpspringuel
Copy link
Contributor

@jperon do you know where I can find the documentation for unicode-math?

@rpspringuel
Copy link
Contributor

@jperon Found it. CTAN's own search didn't want to show it to me, but Google did.

@rpspringuel
Copy link
Contributor

So, I don't know how, but I think that unicode-math's definitions are made only at \begin{document}.

Reading through the documentation, this is correct. They define all macros within \AtBeginDocument. This means that our \Vbar definition (which is not so protected) will be overwritten at that point and you can cause it to revert by redefining the command using our tools after \begin{document}.

I'm inclined to close this a won't fix. We can't guarantee that there will be no macro name clashes with all other packages.

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

No branches or pull requests

3 participants