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

Ugly, break csv-table in latexpdf output #3361

Closed
daiger14 opened this issue Jan 20, 2017 · 8 comments
Closed

Ugly, break csv-table in latexpdf output #3361

daiger14 opened this issue Jan 20, 2017 · 8 comments

Comments

@daiger14
Copy link

Subject:

Problem

Break, ugly csv-table In pdf file generated with latexpdf from sphinx. Latexpdf doesn't take size, style from rst file. Html version is good.

Procedure to reproduce the problem

- make html  - to see html is ok
- make latexpdf

Error logs / results

Reproducible project / your project

Environment info

  • Python version: 2.7
  • Sphinx version: 1.4.8
  • texlive full
@tk0miya
Copy link
Member

tk0miya commented Jan 21, 2017

At this moment, sphinx fails to separate tables even if it is larger than the page height.
So please give :class: longtable option to csv-table directive as a hint.
It will allow you to separate the table.

@tk0miya
Copy link
Member

tk0miya commented Jan 21, 2017

Note: refs #2620.

@daiger14
Copy link
Author

Hello! Thank you :class: longtable works. But how i can customize table? Cell size? Text orientation? Why sphinx/latex doesn't take html style?

@tk0miya
Copy link
Member

tk0miya commented Jan 29, 2017

About cell size (cell width), you can use :widths: option to specify the widths manually.
But no way to modify text orientation.

AFAIK, there are no way for HTML builder too.
What did you mean "html style"? If you mean CSS, you can use TeX macros to do that (I'm not good at it...)

@daiger14
Copy link
Author

I used :widths: in table but in latex output like you see doesn't have effect. You can check my example of project.

@tk0miya
Copy link
Member

tk0miya commented Jan 30, 2017

Ah, sorry. It's my mistake.
Please use tabularcolumns directive instead.

.. tabularcolumns:: |p{1.5cm}|p{2.0cm}|p{5.0cm}|

http://www.sphinx-doc.org/en/1.5.1/markup/misc.html

@daiger14 daiger14 reopened this Jan 31, 2017
@daiger14
Copy link
Author

Thank you for your help Takeshi!

@jfbu
Copy link
Contributor

jfbu commented Feb 2, 2017

Sphinx 1.6 will obey :widths: option to table directives, for LaTeX output (ref #3379, #3381), thus sparing use of tabularcolumns in simple cases. With current code such tables will always occupy full line width, though, but perhaps some way will be found so that it becomes useful option also for tables which are naturally narrower than linewidth. But currently tables (when they are equipped with a caption and have less than 30 rows hence do not use automatically longtable) are not even centered in the page.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants