7

As a package author, I want people to load my package with a version parameter like

\usepackage[version=4]{mhchem}

I decided to use a warning (and no error) if they did not, because not specifying a version works for basic usage and the differences will only be noticed on more complex chemical formulae.

I do not mind too much that questions asked here do not contain a version parameter. But the accepted answers should be completely correct, in my point of view. However, almost none of the accepted answers did so, initially.

This leads me to the conclusion that even experienced LaTeX users that post answers here, do not take a look at the LaTeX warnings, rendering the warning system of LaTeX virtually useless.

So before I consider changing my warning into an error, I wanted to ask here if there was the possibility to create more obvious warnings. (I doubt it, but I wanted to ask anyway.)

Update

Maybe you could report back how your editor behaves.

\documentclass{article}
\usepackage{expl3}
\begin{document}
a
\PackageWarning{test}{This is a traditional warning.}
\ExplSyntaxOn
\msg_new:nnn { test } { msg } { This~is~a~LaTeX3~warning.}
\msg_warning:nn { test } { msg }
\end{document}
  • TeXworks: Identifies traditional warning, but not LaTeX3 warning. Nevertheless hides console output after compilation, even if a warning was identified.
  • ...
  • 'More obvious' in what way? Most users use an (La)TeX editor rather than the command line, and most of those hide the log/terminal to a greater or lesser extent ... – Joseph Wright Feb 6 '16 at 17:10
  • Most obvious would really be to issue an error, like ledmac currently does. This will really draw attention. On the other hand, if using an older version is fine, why change? – Johannes_B Feb 6 '16 at 17:16
  • 3
    Ugly solution: Write a warning in the document.Somethig like This formula is generated with an old mhchem version So it is visible in the generated document. But if you do so, please accept also a final-option to supress the output. – knut Feb 6 '16 at 17:27
  • @JosephWright 'More obvious' in the way that users will see it. One idea could be: Use the traditional \PackageWarning, because the LaTeX3 warnings are not recognized by the majority of editors, yet? – mhchem Feb 6 '16 at 18:04
  • 1
    Why can't you make one version the default? It sounds curious that you force users to add it. – Ulrike Fischer Feb 6 '16 at 23:35
1

Thanks to your reports, my suspicion was confirmed.

If a package author wants users to see a warning, he/she should use the traditional warning (\PackageWarning), because LaTeX3 warnings (\msg_warning:nn) are not identified by a lot of LaTeX editors.

0

Kile identifies the traditional warning in the Log and Messages tab, but not the expl3 one. However, the complete output is available in the Output tab.

On the other hand, Kile in its current state can't find its own .cwl files, so I don't hold out much hope of its identifying expl3 syntax or warnings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.