LaTeX-Package-Repositories / ucs

LaTeX ucs/utf8x
Other
0 stars 0 forks source link

Problem with XeLaTeX for option mathletters #2

Open raedma opened 7 months ago

raedma commented 7 months ago

I am trying to convert a Jupyter Lab notebook to LaTeX and then pdf document with pandoc. By default, XeLaTeX is used for the creation of the pdf from the LaTeX file in pandoc.

Running xelatex -synctex=1 -interaction=nonstopmode ucsoptionmathletterstest.tex on Windows with MikTeX and ucs version 2.4 the MWE below produces a warning:

Package ucs Warning: ucs package ignored with utf8 based engines.

Followed by an error:

! LaTeX Error: Unknown option `mathletters' for package `ucs'.

However, the version installed by the MikTeX package manager is 2.4 from Thu Nov 16 10:51:38 2023 and the CTAN release is from 2023-11-09 with the same number 2.4. Was there a later update maybe that is not fetched by MikTeX as it is the same version number?

Is this desired behavior and more a problem of pandoc or should ucs behave differently here? The compilation works fine with pdflatex. So one is able to configure pandoc to use pdflatex.


MWE

\documentclass{article}

\usepackage[mathletters]{ucs}

\begin{document}
Hello World!
\end{document}
davidcarlisle commented 7 months ago

It is really user error (and always has been) to use ucs with xelatex. As the warning says, it's ignored. Howver it would be good if it ignored it completely and did not fail on the option handling, I'll check what changed...

davidcarlisle commented 7 months ago

Please test in a local copy ammending the start of the package to

ifx\ProvidesPackage\undefined\else
\ProvidesPackage{ucs}[2023/11/09 v2.4 UCS: Unicode input support]%
\fi
\ifx\Umathchar\undefined\else
\ifx\PackageWarningNoLine\undefined\else
\PackageWarningNoLine{ucs}{ucs package ignored with utf8 based engines}
\fi
\expandafter\let\csname opt@ucs.sty\endcsname\@empty%%% ADD THIS LINE
\expandafter\endinput
\fi
\catcode`\@11
raedma commented 7 months ago

That works. I still get the warning as desired but the error during option handling is gone. Thanks.

davidcarlisle commented 7 months ago

Thanks, I'll sort out an update to ctan

u-fischer commented 7 months ago

However, the version installed by the MikTeX package manager is 2.4 from Thu Nov 16 10:51:38 2023 and the CTAN release is from 2023-11-09 with the same number 2.4. Was there a later update maybe that is not fetched by MikTeX as it is the same version number?

miktex doesn't update daily its packages. So it can take up a few days or sometimes even weeks before a package update from CTAN is added to miktex and the dates in the miktex package manager can differ. That is nothing to worry about. The current ucs version in miktex is identical to the one in texlive and on ctan.

raedma commented 7 months ago

Thanks, I'll sort out an update to ctan

Thanks. I'll close the issue here then.

davidcarlisle commented 7 months ago

re-opening, to remind me to actually push out an update