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

big tables - whats the deal ? #22

Open
pellekrogholt opened this issue Nov 19, 2013 · 9 comments
Open

big tables - whats the deal ? #22

pellekrogholt opened this issue Nov 19, 2013 · 9 comments
Labels

Comments

@pellekrogholt
Copy link

Hi,

First off all thx for sphinxtr its really useful - I have come across a challenge when using big tables. then its hard to tame them. perhaps because my latex skills are low and / or I don't fully understand the :spec: within the figtable directive.

I have tried with to version a one thats goes many columns horizontal and another one doing it vertical (because I read that long tables over multiple pages seems to be supported https://github.com/jterrace/sphinxtr/blob/master/tex/preamble._tex)

i have done it in a branch "Big tables":

https://github.com/pellekrogholt/sphinxtr/blob/big_tables/ch-figs/index.rst

thx

//

pelle

@jterrace
Copy link
Owner

I'm confused - what's the question? Is the table not coming out correctly in latex?

@pellekrogholt
Copy link
Author

fair enough - sorry - should have added some screen shoots from thesis.pdf right away ->

fig-big-table - p. 20:

image

fig-big-table-vertical p. 21 - one page only doesn't span over multiple pages:

image

@jterrace
Copy link
Owner

It looks like you have to use \begin{longtable} instead of \begin{table} to get long tables to work.

Just like we added a :nofig: option, how about adding a :longtable: option that would switch to using the longtable name?

It should be pretty easy to add: search for nofig in extensions/figtable.py

pellekrogholt added a commit to pellekrogholt/sphinxtr that referenced this issue Nov 19, 2013
@pellekrogholt
Copy link
Author

hi jterrace

thx for your feedbacks and patience !

i gave it a shoot 1 to 1 per your nice instructions: pellekrogholt@79a9d9b

when building i get

./thesis.tex:1253: LaTeX Error: Something's wrong--perhaps a missing \item.
./thesis.tex:1835: Misplaced \noalign.\caption ->\noalign 
        \bgroup \@ifnextchar [{\egroup \LT@c@ption \@firstofone ...
l.1835 \caption
       [A big table vertical]{A big table vertical}\phantomsection\l...
I expect to see \noalign only after the \cr of
an alignment. Proceed, and I'll ignore this case.
./thesis.tex:1835: Misplaced \noalign.\caption@LT@make #1->\noalign 
              {\caption@LT@config }\expandafter \LT@mcol \ex...
l.1835 ...ig table vertical]{A big table vertical}
                          \phantomsection\label{ch-f...
I expect to see \noalign only after the \cr of
an alignment. Proceed, and I'll ignore this case.
./thesis.tex:1835: Misplaced \omit.\multispan ->\omit 
           \@multispan 
l.1835 ...ig table vertical]{A big table vertical}
                          \phantomsection\label{ch-f...
I expect to see \omit only after tab marks or the \cr of
an alignment. Proceed, and I'll ignore this case.
./thesis.tex:1836: LaTeX Error: Something's wrong--perhaps a missing \item.
./thesis.tex:1836: LaTeX Error: Something's wrong--perhaps a missing \item.
./thesis.tex:1836: LaTeX Error: Something's wrong--perhaps a missing \item.
make[1]: *** [thesis.pdf] Error 1
make: *** [latexpdf] Error 2

when i look into line 1835 its not crystal clear to me why - but again probably related to my limited latex knowledge - thesis.tex looks like this in full: http://pastebin.com/w9Cuvhng

and the specific line 1835:

\caption[A big table vertical]{A big table vertical}\phantomsection\label{ch-figs/index:fig-big-table-vertical}

@jterrace
Copy link
Owner

Could you paste that thesis.tex as a gist or pastebin instead? Can't see line numbers on here

@pellekrogholt
Copy link
Author

sure done ^^ i naively thought github kong fu did some numbering...

@jterrace
Copy link
Owner

It looks like you need to change actually \begin{tabular} to \begin{longtable} and then remove the old \begin{table}. See http://tex.stackexchange.com/a/23299

@pellekrogholt
Copy link
Author

ok i was actually looking at that post earlier but not sure how to deal with in within sphinxtr

thx for your additional instructions - i'm not sure i fully understand a raw one here - i will of course clean it up and remove :longtable: ...

pellekrogholt@8f1490b

on build raises:

Makefile:2556: thesis.d: No such file or directory
= thesis.tex --> thesis.d thesis.pdf.1st.make (0-1) =
= refs.bib thesis.aux --> thesis.bbl =
./thesis.tex:824: Package caption Error: \caption outside float.
./thesis.tex:1233: Package caption Error: \caption outside float.
./thesis.tex:1814: Package caption Error: \caption outside float.
make[1]: *** [thesis.pdf] Error 1
make: *** [latexpdf] Error 2

thesis.tex: http://pastebin.com/uW6ytpnc

@pellekrogholt
Copy link
Author

hi terrace,

sorry for the noise ^^ and thanks for your hints....

i'll get back to at some time... and then be back with a clear solution proposal or disposal if I can't get it to work...

//

pelle

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

No branches or pull requests

3 participants
@pellekrogholt @jterrace and others