1# -*- mode: Perl -*- 2# /=====================================================================\ # 3# | booktabs | # 4# | Implementation for LaTeXML | # 5# |=====================================================================| # 6# | Part of LaTeXML: | # 7# | Public domain software, produced as part of work done by the | # 8# | United States Government & not subject to copyright in the US. | # 9# |---------------------------------------------------------------------| # 10# | Bruce Miller <bruce.miller@nist.gov> #_# | # 11# | http://dlmf.nist.gov/LaTeXML/ (o o) | # 12# \=========================================================ooo==U==ooo=/ # 13package LaTeXML::Package::Pool; 14use strict; 15use warnings; 16use LaTeXML::Package; 17 18# Adjust thickness of rules? 19# Except for the encodings of hline as t (normal) or T (thin) 20# there's currently no support for variable thickness. 21 22# \toprule[thickness] doubled 23DefMacro('\toprule[Dimension]', '\hline\hline'); 24# \midrule[thickness] 25DefMacro('\midrule[Dimension]', '\hline'); 26# \bottomrule[thickness] doubled 27DefMacro('\bottomrule[Dimension]', '\hline\hline'); 28 29# \cmidrule[thickness](trim){col-col} 30DefMacro('\@afterfi Until:\fi', '\fi#1'); 31DefMacro('\cmidrule[]', 32 '\@ifnextchar({\ifx.#1.\expandafter\ltx@@cmidrule\else\@afterfi\ltx@@cmidrule[#1]\fi}' 33 . '{\ifx.#1.\expandafter\ltx@cmidrule\else\@afterfi\ltx@cmidrule[#1]\fi}'); 34 35DefMacro('\ltx@@cmidrule[Dimension] SkipMatch:( Until:){}', '\cline{#3}'); 36DefMacro('\ltx@cmidrule[Dimension]{}', '\cline{#2}'); 37 38# add vspace 39DefMacro('\addlinespace[Dimension]', ''); 40 41# adjust spacing to make double line 42DefMacro('\morecmidrules', ''); 43 44# \specialrule{thickness}{above}{below} 45DefMacro('\specialrule{Dimension}{Dimension}{Dimension}', '\hline'); 46 47RawTeX(<<'EoTeX'); 48\newdimen\heavyrulewidth 49\newdimen\lightrulewidth 50\newdimen\cmidrulewidth 51\newdimen\belowrulesep 52\newdimen\belowbottomsep 53\newdimen\aboverulesep 54\newdimen\abovetopsep 55\newdimen\cmidrulesep 56\newdimen\cmidrulekern 57\newdimen\defaultaddspace 58\heavyrulewidth=.08em 59\lightrulewidth=.05em 60\cmidrulewidth=.03em 61\belowrulesep=.65ex 62\belowbottomsep=0pt 63\aboverulesep=.4ex 64\abovetopsep=0pt 65\cmidrulesep=\doublerulesep 66\cmidrulekern=.5em 67\defaultaddspace=.5em 68\newcount\@cmidla 69\newcount\@cmidlb 70\newdimen\@aboverulesep 71\newdimen\@belowrulesep 72\newcount\@thisruleclass 73\newcount\@lastruleclass 74EoTeX 75#====================================================================== 761; 77