1ee6e0e087
+ Remove Text.Pandoc.Pretty; use doclayout instead. [API change] + Text.Pandoc.Writers.Shared: remove metaToJSON, metaToJSON' [API change]. + Text.Pandoc.Writers.Shared: modify `addVariablesToContext`, `defField`, `setField`, `getField`, `resetField` to work with Context rather than JSON values. [API change] + Text.Pandoc.Writers.Shared: export new function `endsWithPlain` [API change]. + Use new templates and doclayout in writers. + Use Doc-based templates in all writers. + Adjust three tests for minor template rendering differences. + Added indentation to body in docbook4, docbook5 templates. The main impact of this change is better reflowing of content interpolated into templates. Previously, interpolated variables were rendered independently and intepolated as strings, which could lead to overly long lines. Now the templates interpolated as Doc values which may include breaking spaces, and reflowing occurs after template interpolation rather than before.
32 lines
725 B
XML
32 lines
725 B
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
$if(mathml)$
|
|
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.1CR1//EN"
|
|
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
|
|
$else$
|
|
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
|
$endif$
|
|
<article>
|
|
<articleinfo>
|
|
<title>$title$</title>
|
|
$if(author)$
|
|
<authorgroup>
|
|
$for(author)$
|
|
<author>
|
|
$author$
|
|
</author>
|
|
$endfor$
|
|
</authorgroup>
|
|
$endif$
|
|
$if(date)$
|
|
<date>$date$</date>
|
|
$endif$
|
|
</articleinfo>
|
|
$for(include-before)$
|
|
$include-before$
|
|
$endfor$
|
|
$body$
|
|
$for(include-after)$
|
|
$include-after$
|
|
$endfor$
|
|
</article>
|