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

The warnings-off option fails to support comma-separated arguments; warning types not logged #646

Open
Fifis opened this issue Dec 31, 2024 · 0 comments

Comments

@Fifis
Copy link

Fifis commented Dec 31, 2024

Description

The intended mechanism of warning suppression \usepackage[warnings-off = {mathtools-overbracket, mathtools-colon}]{unicode-math} produces an error: 562: Package keyvalue Error: Unknown option 'mathtools-colon' for package(keyvalue) unicode-math-luatex. \ProcessKeysOptions {unicode-math} and a warning: I'm going to overwrite the following commands from the mathtools' package: \dblcolon, \coloneqq, \Coloneqq, \eqqcolon`. Moreover, the log output contradicts the documentation.

Additional information

Minimal example demonstrating the issue

% !TeX program = lualatex
\documentclass[12pt]{book}
\usepackage{mathtools}
\usepackage{fontspec}
% \usepackage{unicode-math}
% \usepackage[warnings-off = {mathtools-colon}]{unicode-math}
% \usepackage[warnings-off = {mathtools-overbracket}]{unicode-math}
\usepackage[warnings-off = {mathtools-overbracket, mathtools-colon}]{unicode-math}
\setmainfont{Times New Roman}
\setmathfont{XITS Math}

\begin{document}
Gauss said: $\sum_{i=1}^{100} n = 5050$.
\end{document}

Further details

I am getting an error in LuaHBTeX, Version 1.18.0 (TeX Live 2024/Arch Linux), Development id: 7611 when trying to suppress warnings, as documented.

The documentation (um-doc-main.tex) mentions the syntax but the example below will show that this does not work:

As an experimental feature, these can be turn off on an individual basis with the package option |warnings-off| which takes a comma-separated list of warnings to suppress.
A warning will give you its name when printed on the console output; e.g.,
\begin{Verbatim}
  * unicode-math warning: "mathtools-colon"
  *
  * ... <warning message> ...
\end{Verbatim}
This warning could be suppressed by loading the package as follows:
\begin{Verbatim}
  \usepackage[warnings-off={mathtools-colon}]{unicode-math}
\end{Verbatim}

As per many recommendations, I am loading the packages in this order: mathtools, then fontspec, then unicode-math. The comma-separated option for suppressing warnings does not work:

  • \usepackage{unicode-math} produces 2 warnings: Using \overbracket and \underbracket from mathtools' packageandI'm going to overwrite the following commands from the mathtools' package: \dblcolon, \coloneqq, \Coloneqq, \eqqcolon.

  • Using [warnings-off = {mathtools-colon}] or [warnings-off = {mathtools-overbracket}] works, but leaves the other warning.

Also, contrary to the documentation, \jobname.log does not contain the warning names:

...
Package unicode-math Warning: Using \overbracket and \underbracket from
(unicode-math)                `mathtools' package.
(unicode-math)                 
(unicode-math)                 Use \Uoverbracket and \Uunderbracket for
(unicode-math)                original `unicode-math' definition.


Package unicode-math Warning: I'm going to overwrite the following commands
(unicode-math)                from the `mathtools' package: 
(unicode-math)                 
(unicode-math)                     \dblcolon, \coloneqq, \Coloneqq, \eqqcolon.
(unicode-math)                
(unicode-math)                 
(unicode-math)                 Note that since I won't overwrite the other
(unicode-math)                colon-like commands, using them will lead to
(unicode-math)                inconsistencies.

I should be grateful if someone could fix two birds with one drone: bring the warning names into the main log file, and allow multiple comma-separated warning types to be ignored. Or even simpler, maybe we should allow suppressing ALL warnings via something as simple as

\usepackage[warnings-off]{unicode-math}

? After all, the intended way of using YYYLaTeX is writing good code the produced no warnings on its own, right?

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

No branches or pull requests

1 participant