Omikhleia/markdown.sile

Tables at 100% width break when centered

Omikhleia opened this issue · 2 comments

Converting a markdown or djot document and using the resilient.book class with default styling

image

Workaround:

Tweak the style file of the document:

table:
  origin: "resilient.book"
  style:
    paragraph:
      after:
        vbreak: false
      align: "justify" # was "center"
      before:
        indent: false

Analysis:

It has to do with the table being 100% of the line, and the "center" (idem for "left", "right") adding lskip/rskip glues around it.
I'm not sure exactly why and if this point towards something deeper.

Actually unrelated to resilient's way of implementing centering -- it's reproduceable with plain SILE and no table:

\begin{document}
\neverindent
\nofolios
\use[module=packages.rules]
Justified 100\% content

\hrule[height=2pt, width=100%fw]\par
\hrule[height=2pt, width=100%fw]\par

Centered 100\% content

\center{%
\hrule[height=2pt, width=100%fw]\par
\hrule[height=2pt, width=100%fw]\par
}

Centered 99.99999999999\% content

\center{%
\hrule[height=2pt, width=99.99999999999%fw]\par
\hrule[height=2pt, width=99.99999999999%fw]\par
}
\end{document}

image

--> Move to markdown.sile (so that not to use 100% as a workaround) + perhaps report to SILE

Reported to SILE = sile-typesetter/sile#1757