You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error for the ntheorem package that seems to weirdly depend on the order of commands:
I redefine the break inbuild theorem style and then also define another style
\documentclass{article}
\usepackage{ntheorem}
\renewtheoremstyle{break}%
{\item[\hskip\labelsep ##1\ HELLO ##2]\normalfont}%
{\item[\hskip\labelsep ##1\ ##2]{(##3)}\newline\normalfont}
\newtheoremstyle{plain1}%
{\item[\hskip\labelsep ##1\ HELLO ##2]\normalfont}%
{\item[\hskip\labelsep ##1\ ##2]{(##3)}\newline\normalfont}
\theoremstyle{break}
\newtheorem{theorem}{Theorem}
\theoremstyle{plain1}
\newtheorem{remark}{Remark}
\begin{document}
\begin{theorem}
This is a theorem.
\end{theorem}
\begin{remark}
This is a theorem.
\end{remark}
\end{document}
and running latexmlc --destination=paper.html --format=html5 --path=. test.tex, I get the following error:
latexmlc (LaTeXML version 0.8.8)
processing started Thu Jan 23 22:00:29 2025
Error:undefined:\renewtheoremstyle The token T_CS[\renewtheoremstyle] is not defined. at test.tex; line 4 col 18
Error:misdefined:# The token T_PARAM[#] should never reach Stomach! at test.tex; line 6 col 35
Error:misdefined:# The token T_PARAM[#] should never reach Stomach! at test.tex; line 6 col 36
Error:undefined:{theorem} The environment {theorem} is not defined. at test.tex; line 18 col 0
Warning:undefined:theoremstyle Unknown theorem style '\lx@tag', reverting to 'plain'. at test.tex; line 22 col 3
Conversion complete: 1 warning; 4 errors; 2 undefined macros[\renewtheoremstyle, {theorem}] (See /Users/lamberttheisen/Desktop/theoremstyle/test.latexml.log)
Post-processing complete: No obvious problems
Status:conversion:2
However, if I just change the order, i.e. first define my own style and then redefine the inbuilt style:
\documentclass{article}
\usepackage{ntheorem}
\newtheoremstyle{plain1}%
{\item[\hskip\labelsep ##1\ HELLO ##2]\normalfont}%
{\item[\hskip\labelsep ##1\ ##2]{(##3)}\newline\normalfont}
\renewtheoremstyle{break}%
{\item[\hskip\labelsep ##1\ HELLO ##2]\normalfont}%
{\item[\hskip\labelsep ##1\ ##2]{(##3)}\newline\normalfont}
\theoremstyle{break}
\newtheorem{theorem}{Theorem}
\theoremstyle{plain1}
\newtheorem{remark}{Remark}
\begin{document}
\begin{theorem}
This is a theorem.
\end{theorem}
\begin{remark}
This is a theorem.
\end{remark}
\end{document}
I get no error:
latexmlc (LaTeXML version 0.8.8)
processing started Thu Jan 23 22:02:55 2025
Conversion complete: No obvious problems
Post-processing complete: No obvious problems
Status:conversion:0
What is going on? How can I fix it?
The problem is actually a MWE of an error produced by the SIAM templates (https://epubs.siam.org/journal-authors#macros) (line 1419 in the cls-file errors) when uploading a preprint to arXiv, where latexml is used to generate the HTML version.
The text was updated successfully, but these errors were encountered:
Thank you for the report. If I am not seeing this wrong, the binding is unfinished -- it seems to use \newtheoremstyle and \renewtheoremstyle as imported from amsthm.sty.ltxml, but those macros have a different argument signature ntheorem docs here.
So even for the example that you show working, it is working by a very lucky accident. (Assuming I am not misreading something in ntheorem.sty.ltxml)
I get an error for the
ntheorem
package that seems to weirdly depend on the order of commands:I redefine the
break
inbuild theorem style and then also define another styleand running
latexmlc --destination=paper.html --format=html5 --path=. test.tex
, I get the following error:However, if I just change the order, i.e. first define my own style and then redefine the inbuilt style:
I get no error:
What is going on? How can I fix it?
The problem is actually a MWE of an error produced by the SIAM templates (https://epubs.siam.org/journal-authors#macros) (line 1419 in the
cls
-file errors) when uploading a preprint to arXiv, where latexml is used to generate the HTML version.The text was updated successfully, but these errors were encountered: