Closed hcf-n closed 2 years ago
The problem is that when you add code using \AtBeginDocument
like this, it is executed before all other tags, which results in error. You can use something like this instead:
\ProvidesClass{mwe}
\LoadClass[12pt, a4paper]{article}
\RequirePackage[norsk]{babel}
\RequirePackage{fontspec}
% Problematic line
% \AtBeginDocument{\maketitle}
\ifdefined\HCode
\AtBeginDocument{\Configure{@BODY}{\maketitle}}
\else
\AtBeginDocument{\maketitle}
\fi
The \AtBeginDocument{\Configure{@BODY}{\maketitle}}
line ensures that the \maketitle
is inserted at a correct place.
Thanks! That works.
That's good to hear. So I hope I can close this.
I have a classfile that causes errors when running make4ht. The line in the classfile causing the error is
\AtBeginDocument{\maketitle}
The error is:
xtpipes error 37 --- At <xslt name="." xml="." xsl="text-p" > : javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The prefix "text" for element "text:p" is not bound.; The prefix "text" for element "text:p" is not bound.
MWE-class file:
MWE: