pandoc/test/tables.rtf
John MacFarlane 1ee6e0e087 Use new doctemplates, doclayout.
+ 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.
2019-08-25 14:24:31 -07:00

359 lines
8.3 KiB
Text

{\pard \ql \f0 \sa180 \li0 \fi0 Simple table with caption:\par}
{
\trowd \trgaph120
\clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}
\cell}
}
\intbl\row}
{\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Simple table without caption:\par}
{
\trowd \trgaph120
\clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}
\cell}
}
\intbl\row}
{\pard \ql \f0 \sa180 \li0 \fi0 \par}
{\pard \ql \f0 \sa180 \li0 \fi0 Simple table indented two spaces:\par}
{
\trowd \trgaph120
\clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}
\cell}
}
\intbl\row}
{\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table with caption:\par}
{
\trowd \trgaph120
\clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6912
\trkeep\intbl
{
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Centered Header\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left Aligned\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right Aligned\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default aligned\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx1296\cellx2484\cellx3888\cellx6912
\trkeep\intbl
{
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx1296\cellx2484\cellx3888\cellx6912
\trkeep\intbl
{
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par}
\cell}
}
\intbl\row}
{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's the caption. It may span multiple lines.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table without caption:\par}
{
\trowd \trgaph120
\clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6912
\trkeep\intbl
{
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Centered Header\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left Aligned\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right Aligned\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default aligned\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx1296\cellx2484\cellx3888\cellx6912
\trkeep\intbl
{
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx1296\cellx2484\cellx3888\cellx6912
\trkeep\intbl
{
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par}
\cell}
}
\intbl\row}
{\pard \ql \f0 \sa180 \li0 \fi0 \par}
{\pard \ql \f0 \sa180 \li0 \fi0 Table without column headers:\par}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx2160\cellx4320\cellx6480\cellx8640
\trkeep\intbl
{
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par}
\cell}
}
\intbl\row}
{\pard \ql \f0 \sa180 \li0 \fi0 \par}
{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table without column headers:\par}
{
\trowd \trgaph120
\cellx1296\cellx2484\cellx3888\cellx6912
\trkeep\intbl
{
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par}
\cell}
}
\intbl\row}
{
\trowd \trgaph120
\cellx1296\cellx2484\cellx3888\cellx6912
\trkeep\intbl
{
{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par}
\cell}
{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par}
\cell}
{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par}
\cell}
}
\intbl\row}
{\pard \ql \f0 \sa180 \li0 \fi0 \par}