New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

booktabs.sty.ltxml produces extra lines #888

Closed
giovanni111 opened this Issue Nov 20, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@giovanni111

giovanni111 commented Nov 20, 2017

With

\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{ll}
  a & b \\\cmidrule(r){1-1}
  c & d \\
\end{tabular}
\end{document}

latexml outputs an unexpected border in the second column. I suggest the following:

diff --git a/lib/LaTeXML/Package/booktabs.sty.ltxml b/lib/LaTeXML/Package/booktabs.sty.ltxml
index 8447827..b5312b7 100644
--- a/lib/LaTeXML/Package/booktabs.sty.ltxml
+++ b/lib/LaTeXML/Package/booktabs.sty.ltxml
@@ -32,7 +32,7 @@ DefMacro('\cmidrule[]',
   '\@ifnextchar({\ifx.#1.\expandafter\ltx@@cmidrule\else\@afterfi\ltx@@cmidrule[#1]\fi}'
     . '{\ifx.#1.\expandafter\ltx@cmidrule\else\@afterfi\ltx@cmidrule[#1]\fi}');

-DefMacro('\ltx@@cmidrule[Dimension] Match:( Until:){}', '\cline{#3}');
+DefMacro('\ltx@@cmidrule[Dimension] Match:( Until:){}', '\cline{#4}');
 DefMacro('\ltx@cmidrule[Dimension]{}',                  '\cline{#2}');

 # add vspace
@brucemiller

This comment has been minimized.

Owner

brucemiller commented Nov 28, 2017

That'd work. But upon reflection, what I was thinking was SkipMatch:( (which doesn't contribute to the argument list). Thanks; fixed!

@brucemiller

This comment has been minimized.

Owner

brucemiller commented Nov 29, 2017

That'd work. But upon reflection, what I was thinking was SkipMatch:( (which doesn't contribute to the argument list). Thanks; fixed!

@dginev dginev added this to the LaTeXML-0.8.3 milestone Jan 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment