In both docutils 0.16 and the docutils snapshot at revision 8516, the LaTeX2e/XeTeX writers' template titlepage.tex makes use of the titlepage environment. When this is combined with --documentclass=memoir, building the resulting .tex file will fail, as the memoir class does not have an environment by that name; the equivalent environment in memoir is named titlingpage.
A user could work around this by placing the following in their latex-preamble:
\newenvironment{titlepage}%
{\begin{titlingpage}}%
{\end{titlingpage}\ignorespacesafterend}
or by just using a custom template, but it would be preferable if docutils took care of this itself automatically.
The following files are attached:
- titling.rst — a sample input file whose LaTeXification fails to build as described above
- titling.tex — the output from rst2latex.py --template=titlepage.tex --documentclass=memoir titling.rst; running pdflatex on it will fail because the titlepage environment is undefined
Thank you for reporting.
IMO, a clean solution would be to ship a template "titlingpage.tex". Could you provide one?
titlingpage.textemplate attached.Fixed in r8523.
Thank you for reporting and providing the template.
Thanks for the fix! However, you misspelled the name of the new template in the documentation (
docutils/docs/user/latex.txt): You wrote "titlinpage.tex", without the 'g' after the 'n'. Might want to fix that before it goes live.Fixed in Docutils 0.17.
Thanks again for your contribution.