|
From: Schimon J. <sc...@fe...> - 2025-10-10 05:45:11
|
Guenter. Good day. I think that I already did that, after you asked, but upon my documents. I have created a test file which is based only on your text. Upon executing command rst2xml, Docutils outputs a couple of errors, one for author and one for date. I assume that these are errors of the directives author:: and date:: with two colons. $ rst2xml rst_preambles_and_directives_sample.rst >rst_preambles_and_directives_sample.xml rst_preambles_and_directives_sample.rst:7: (ERROR/3) Unknown directive type "author". .. author:: My Lin rst_preambles_and_directives_sample.rst:11: (ERROR/3) Invalid context: the "date" directive can only be used within a substitution definition. Schimon On Thu, 9 Oct 2025 18:46:31 -0000 (UTC) Guenter Milde via Docutils-users <doc...@li...> wrote: > On 2025-10-09, Schimon Jehudah via Docutils-users wrote: > ... > > > >> >> The preamble seems to use no standard but a home-grown syntax > >> >> that looks confusingly similar to reStructuredtext directives. > >> >> > > >> > How so? > > ... > > Steps to find out why I call the current Rivista metadata syntax > "confusingly similar" to Docutils directives: > > * create a file containing > > .. title: My simple example > > .. title:: My simple example > > * convert with rst2xml to see how the two statements are interpreted > by the docutils "rst" parser. > > * Optionally repeat with > > .. author: My Lin > > .. author:: My Lin > > * Optionally repeat with > > .. date: 2025-10-09 > > .. date: 2025-10-09 > Did you mean to add two consequent colons to the second instance of "date" (i.e. "date::")? > > Günter > > > > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. |