1

tex4ht seems to ignore the article option in the memoir class. I say this because section numbers (and the corresponding cross-references) appear as 0.1, 0.2, etc. instead of 1, 2, etc. when outputting to .odt using tex4ht (but not when using xetex).

Is this a bug? If not, is there a way for me to modify this behavior?

2
  • Oops, I realized that I was totally confused about this one. I had assumed that the article option was supposed to do the trick, but now I realize that I needed to add an extra line (\renewcommand*{\thesection}{\arabic{section}}) to get xetex to do it right. And now tex4ht does it right too. What is the right TeX.SE protocol? Should I delete/close this question? Should I "answer" my own question and thus close it? Or should I just leave it as is with apologies for being too quick to post it? – Alex Roberts Feb 10 '19 at 1:37
  • 1
    I think it would be best to add your own answer with the correct code, to help people with the same issue in the future. – michal.h21 Mar 19 '19 at 23:04
1

As I mentioned in a comment, I realized that the problem had nothing to do with tex4ht but rather I was simply mistaken about memoir's default. So the answer is:

To achieve the desired output, one must add the line \renewcommand*{\thesection}{\arabic{section}} to the preamble.

MWE:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt,article,oldfontcommands]{memoir}

\renewcommand*{\thesection}{\arabic{section}}

\begin{document}

\section{first section}

Should be section 1 but is instead section 0.1.

\end{document}

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.