zestedesavoir / zmarkdown

Live demo: https://zestedesavoir.github.io/zmarkdown/
MIT License
226 stars 52 forks source link

rebber: array header alignement #433

Closed Karnaj closed 3 years ago

Karnaj commented 3 years ago

For now, rebber produces a LaTeX code which center the header row. It seems better to have a left alignment.

+---+---+
| a | a |
+===+===+
| a | a |
+---+---+
| a | a |
+---+---+

produces this code.

\begin{longtabu}{|m{\dimexpr(\linewidth) / 2}|m{\dimexpr(\linewidth) / 2}|} \hline
\rowfont[c]{\bfseries}
a & a \\ \hline
\rowfont[l]{}
a & a \\ \hline
a & a \\ \hline
\end{longtabu}

To have a left alignment, \rowfont[c]{\bfseries} => \rowfont{\bfseries} (and the second \rowfont is not useful). So we obtain this code.

\begin{longtabu}{|m{\dimexpr(\linewidth) / 2}|m{\dimexpr(\linewidth) / 2}|} \hline
\rowfont{\bfseries}
a & a \\ \hline
a & a \\ \hline
a & a \\ \hline
\end{longtabu}