From cd3a8f4441b6cee899bbc0b92b47c9ef8383c2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Novotn=C3=BD?= Date: Mon, 28 Feb 2022 12:00:55 +0100 Subject: [PATCH] Be lazy about what commands to use for default LaTeX table rules Progresses #90. --- markdown.dtx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/markdown.dtx b/markdown.dtx index d3454c42e..8dd99c363 100644 --- a/markdown.dtx +++ b/markdown.dtx @@ -21345,14 +21345,16 @@ end \newtoks\markdownLaTeXTable \newtoks\markdownLaTeXTableAlignment \newtoks\markdownLaTeXTableEnd -\@ifpackageloaded{booktabs}{ - \let\markdownLaTeXTopRule\toprule - \let\markdownLaTeXMidRule\midrule - \let\markdownLaTeXBottomRule\bottomrule -}{ - \let\markdownLaTeXTopRule\hline - \let\markdownLaTeXMidRule\hline - \let\markdownLaTeXBottomRule\hline +\AtBeginDocument{% + \@ifpackageloaded{booktabs}{% + \let\markdownLaTeXTopRule\toprule + \let\markdownLaTeXMidRule\midrule + \let\markdownLaTeXBottomRule\bottomrule + }{% + \let\markdownLaTeXTopRule\hline + \let\markdownLaTeXMidRule\hline + \let\markdownLaTeXBottomRule\hline + }% } \markdownSetup{rendererPrototypes={ table = {%