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

Disable the generation of smaller tables when using LaTeX/PDF? #3929

Open
Wandmalfarbe opened this issue Sep 18, 2017 · 8 comments
Open

Disable the generation of smaller tables when using LaTeX/PDF? #3929

Wandmalfarbe opened this issue Sep 18, 2017 · 8 comments

Comments

@Wandmalfarbe
Copy link
Contributor

Wandmalfarbe commented Sep 18, 2017

When I convert a table from markdown to PDF/LaTeX, the generated LaTeX code contains @-expressions to make the table a bit smaller on the left and right side.

Markdown

| One | Two | Three |
|-----|-----|-------|
| 1,1 | 1,7 | 2,2   |
| 5,4 | 3,8 | 2,1   |
| 2,7 | 1,6 | 9,4   |

LaTeX
This @{} makes the table smaller.

\begin{longtable}[]{@{}lll@{}}
\toprule
One & Two & Three\tabularnewline
\midrule
\endhead
1,1 & 1,7 & 2,2\tabularnewline
5,4 & 3,8 & 2,1\tabularnewline
2,7 & 1,6 & 9,4\tabularnewline
\bottomrule
\end{longtable}

PDF
screenshot 2017-09-18 14 02 00

Unfortunately it looks a bit strange when the rows of the table are colored because the width of the rows exceed the width of the table. Is it possible to stop the generation of these small tables via a flag or some LaTeX code that can be put in the preamble of a custom template?


pandoc 1.19.2.1
Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4
@jgm
Copy link
Owner

jgm commented Sep 23, 2017

How are you coloring the rows?

@Wandmalfarbe
Copy link
Contributor Author

Wandmalfarbe commented Sep 23, 2017

@jgm
Copy link
Owner

jgm commented May 5, 2018

Arguably this is a bug in the package you're using for coloring the rows. Shouldn't it be sensitive to the @{}?

@Wandmalfarbe
Copy link
Contributor Author

It may be a bug in xcolor, but it is currently the only way to color table rows without inserting some LaTeX in the table itself. There aren't many options either. You can use xcolor or colortbl which I think gets used by xcolor.

@Faldrian
Copy link

Faldrian commented Jul 7, 2020

I would want the table to be exactly as wide as the page content area (to match listing boxes for example). If there would be such an option, it would also workaround this issue.

Is there such an option to have my table full width in pandoc... (I am using eisvogel template as well)?

@darylz
Copy link

darylz commented Jun 13, 2023

any update with this issue?

@jdelker
Copy link

jdelker commented Oct 4, 2024

I bumped into this as well.
Any news on this?

@jgm
Copy link
Owner

jgm commented Oct 4, 2024

See also discussion in #10255.

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

No branches or pull requests

6 participants