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

LaTeX pdf tables extending beyond width of page #2920

Closed
elisawyer opened this issue Aug 29, 2016 · 8 comments
Closed

LaTeX pdf tables extending beyond width of page #2920

elisawyer opened this issue Aug 29, 2016 · 8 comments

Comments

@elisawyer
Copy link

elisawyer commented Aug 29, 2016

The content renders OK in HTML and in epub, but not LaTeX pdf. Am hoping to find a way to get verbose content within cells to wrap automatically. I've tried using tabularcolumns without success.

My tables are markdown style.

I thought that I might have some success by experimenting with tablualrcolumns, however when I build using syntax I copied directly from ReadTheDocs (.. tabularcolumns:: |1|c|p{5 cm}|) I get an error:

_! Package array Error: Illegal pream-token (1): `c' used.

See the array package documentation for explanation.
Type H for immediate help.
...

l.563 \begin{longtable}{|1|c|p{5 cm}|}_

Hoping to find a good solution that supports efficient handling of tables moving forward.

@tk0miya
Copy link
Member

tk0miya commented Aug 30, 2016

It's wrong. Please use l (left) instead of 1 (one) to the first argument of tabularcolumns.

@elisawyer
Copy link
Author

Thanks for this. In the meantime I hand-edited some of the tables. It appears, from how the tables are building, that there is a maximum allowable width in the restructured text source files. The reason I am thinking that this is true is that once I reduced the width of some of the tables, they began building as expected and wrapping text within the cells rather than bleeding the tables off the pages, without my using tabularcolumns. If there is a max width, please document the value.

@tk0miya
Copy link
Member

tk0miya commented Aug 31, 2016

The answer is yes and no. Actually, there is a maximum width. It is determined by papersize. As default setting, Sphinx uses A4 paper. So it will be smaller than 21cm (sorry, I don't know default margin size just now).
On the other hand, we can user other size of papers. For example, A3, B4 and also custom paper size. In other words, there is no maximum width. There is only width limitation for paper size.

@elisawyer
Copy link
Author

Hello, I've tried your suggestion and others. I've changed to using csv
tables and the problem with larger tables with content spilling off the
page persists. I came across the following discussion:
#1681 in which the use of the
tabu package was discussed as a way of fixing the problems with tables.

I have not yet tried to do any patches of the latex writer.

Just wondering, since adding tabu has been under consideration for quite
some time, if it is likely to happen soon?

Thanks!

On Tue, Aug 30, 2016 at 6:32 PM, Takeshi KOMIYA [email protected]
wrote:

The answer is yes and no. Actually, there is a maximum width. It is
determined by papersize. As default setting, Sphinx uses A4 paper. So it
will be smaller than 21cm (sorry, I don't know default margin size just
now).
On the other hand, we can user other size of papers. For example, A3, B4
and also custom paper size. In other words, there is no maximum width.
There is only width limitation for paper size.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2920 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGCoM-sfG1MLwzLYapPt5-BiILLnFhNxks5qlNmxgaJpZM4Jv72B
.

Elisa Rood Sawyer

Technical and Creative Writer
"Apparently there is nothing that cannot happen today." Mark Twain

@tk0miya
Copy link
Member

tk0miya commented Sep 15, 2016

Not yet. We don't have enough time to improve tables.
We always need helps to improve sphinx :-)

@liminkai520520
Copy link

use this .. tabularcolumns:: directive

@elisawyer
Copy link
Author

Thanks, I am using the .. tabular columns:: directive. It appears to me
that it works fine for cell content up to specific widths and that text
wrapping breaks in two types of cases, one for long strings of
non-hyphenated text and one for long blocks of text. If you prefer, I can
take a screen capture and send it to you within a couple of days.

On Sat, Oct 1, 2016 at 12:22 AM, liminkai520520 [email protected]
wrote:

use this .. tabularcolumns:: directive


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2920 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGCoM4d_FcymEQMXHbXNvlR0TTomsMd3ks5qvgoqgaJpZM4Jv72B
.

Elisa Rood Sawyer

Technical and Creative Writer
"Apparently there is nothing that cannot happen today." Mark Twain

@tk0miya
Copy link
Member

tk0miya commented Oct 18, 2016

I feel this is already resolved. So I close this now.
Please reopen if you feel as not resolved.

Thanks,

@tk0miya tk0miya closed this as completed Oct 18, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 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