Skip to content
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

Converting from latex to rst doesn't parse booktabs tables correctly #2307

Closed
camillescott opened this issue Jul 17, 2015 · 0 comments
Closed

Comments

@camillescott
Copy link

When converting from latex to rst (or markdown, html, etc), some table syntax doesn't convert correctly. For example, the following latex:

\documentclass{article}
\usepackage{booktabs}

\begin{document}
\begin{table}
\caption {Proportion of Annotations Covered}
\begin{center}

\begin{tabular}{lrr}
\toprule
{} &    lamp00 &    lamp10 \\
\midrule
CDS         &  0.919196 &  0.789203 \\
UTR         &  0.957400 &  0.838308 \\
exon        &  0.896246 &  0.780100 \\
gene        &  0.051323 &  0.128880 \\
start\_codon &  0.960101 &  0.857505 \\
stop\_codon  &  0.636520 &  0.903922 \\
transcript  &  0.048511 &  0.120501 \\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\end{document}

Gives the following rst:

| lrr & lamp00 & lamp10
| CDS & 0.919196 & 0.789203
| UTR & 0.957400 & 0.838308
| exon & 0.896246 & 0.780100
| gene & 0.051323 & 0.128880
| start\_codon & 0.960101 & 0.857505
| stop\_codon & 0.636520 & 0.903922
| transcript & 0.048511 & 0.120501

Removing the \*rule commands produces proper rst tables. I searched extensively, but couldn't find a similar issue; can this be fixed with a custom template, or is it a bug? The use-case here is keeping around an rst version of the file for easy viewing on github, while doing the primary writing in latex.

@jgm jgm closed this as completed in f6ad9e2 Jul 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant