brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
961 stars 101 forks source link

Alignment inaccuracies for \input in {tabular} #2329

Open dginev opened 9 months ago

dginev commented 9 months ago

Encountered while debugging the arXiv report at: https://github.com/arXiv/html_feedback/issues/418

The caption issue reported there is resolved, but a separate bug is using \input inside a complex tabular. As a first minimal example from that article, I extracted:

\documentclass{article}
\usepackage{booktabs}
\begin{document}

\begin{tabular}{llccc}
\toprule
  & & \multicolumn{3}{c}{Comparison} \\
  \cmidrule{3-5}
  Study & Method & $B$ vs. $A$ & $C$ vs. $A$ & $C$ vs. $B$ \\
\midrule
  \input ./datafile
\bottomrule
\end{tabular}

\end{document}

in an adjacent file datafile:

 AB & Truth & $-1.62$ & $-0.92$ & $0.70$ \\
   [0.5ex] & ML-NMR & $-1.53$ & $-0.62$ & $0.90$ \\