RST: improve simple tables (#19859)

* RST: improve simple tables

* nim 1.0 gotchas

* Still allow legacy boundaries like `----`
This commit is contained in:
Andrey Makarov 2022-06-04 08:03:03 +03:00 • committed by GitHub
commit 4341b06f65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 487 additions and 120 deletions

View file

@ -63,7 +63,7 @@
\usepackage{scrextend} % for the `addmargin` environment
\usepackage{xcolor}
\usepackage[table]{xcolor}
\usepackage[urlbordercolor=blue,linkbordercolor=cyan,
pdfborderstyle={/S/U/W 1}]{hyperref}
\usepackage{enumitem} % for option list, enumList, and rstfootnote
@ -84,6 +84,11 @@
\definecolor{rstframecolor}{rgb}{0.85, 0.8, 0.6}
\usepackage{booktabs}
\belowrulesep=0ex
\aboverulesep=0ex
\renewcommand{\arraystretch}{1.1}
\newtcolorbox{rstprebox}[1][]{blanker, breakable,
left=3mm, right=3mm, top=1mm, bottom=1mm,
borderline ={0.1em}{0pt}{rstframecolor},
@ -127,6 +132,7 @@
\newenvironment{rstoptlist}{%
\begin{description}[font=\sffamily\bfseries,style=nextline,leftmargin=\rstoptleftmargin,labelwidth=\rstoptlabelwidth]}{\end{description}}
\usepackage{multirow}
\usepackage{tabulary} % tables with adjustable cell width and no overflow
% make tabulary prevent overflows (https://tex.stackexchange.com/a/195088)
\tymin=60pt