asciidoctor/asciidoctor-latex

Latex conversion of tables with "asciidoctor" style columns fails. Table captions missing too.

NormanDunbar opened this issue · 0 comments

If a column in a table has asciidoctor syntax and an "a" suffix, the conversion to latex fails and only the first character of each entry in the table will be translated.

Given the following two tables, one without asciidoctor syntax and one with:

[cols="2,4"]
.This works, sort of, but the list doesn't work.
|===
|Name|Very nice use case
|Actor|Fantastic user
|Description|Blablabla
|Precondition|Blablabla
|Scenario|
. Step
. Another step
. Yet another step
|Result|Blablabla
|Exceptions|Blablabla
|===

The above will render all columns "correctly" except, obviously, the asciidoctor list syntax will not be translated to a list within the table. If the "a" suffix is added to the column's details, to indicate asciidoctor code, as follows:

[cols="2,4a"]
.This doesn't work for the last column at all, one character only.
|===
|Name|Very nice use case
|Actor|Fantastic user
|Description|Blablabla
|Precondition|Blablabla
|Scenario|
. Step
. Another step
. Yet another step
|Result|Blablabla
|Exceptions|Blablabla
|===

Then the generated output truncates all entries in the second column to the first letter only, plus, where the list should be, that cell in the table is blank.

The test document generated the following Latex document (preamble omitted for brevity):

%% Begin Document %%

\begin{document}
\maketitle
\begin{center}
\begin{tabular}{|c|c|}
\hline
Name & Very nice use case \\ 
Actor & Fantastic user \\ 
Description & Blablabla \\ 
Precondition & Blablabla \\ 
Scenario & . Step
. Another step
. Yet another step \\ 
Result & Blablabla \\ 
Exceptions & Blablabla \\ 
\hline
\end{tabular}
\end{center}

\begin{center}
\begin{tabular}{|c|c|}
\hline
Name & V \\ 
Actor & F \\ 
Description & B \\ 
Precondition & B \\ 
Scenario & \ \\ 
Result & B \\ 
Exceptions & B \\ 
\hline
\end{tabular}
\end{center}

\end{document}

These tables do compile and render with asciidoctor-pdf, if that's in the slightest bit helpful!

In addition, the two tables generated from the above source code do not have their captions generated in the Latex output file.