Modify variable in rst with pandoc
-
05-07-2021 - |
Вопрос
I'm converting a .rst
document to .tex
with pandoc
and I would like to modify variables, such as $date
in the .rst
document. I'm using:
============
My doc title
============
:Date: October
My first title
==============
Lipsum…
The variable is indeed overridden, but using field lists like this generates a definition section in the resulting LaTeX document:
\title{My doc title}
\date{Octobre}
\begin{document}
\maketitle
\begin{description}
\end{description}
This empty description
makes LaTeX compilation fail. When I don't use field lists, it disappears.
How can I avoid this description
section while using field lists in my RST document?
Решение
This is a bug in pandoc, which I just fixed. (The fix will be in the next release, but if you need it now, you can compile the development version: see here for instructions.)
Note also that pandoc currently only recognizes author, title, and date as metadata fields. If you're expecting other fields to set template variables, you'll be disappointed.