I am trying to place two vscautolongtable side by side in latex:

    d & K & h & score \\
    \csvautolongtable[head to column names]{quadratic_20.csv}
    d & K & h & score \\
    \csvautolongtable[head to column names]{quadratic_100.csv}

but I cannot get it to work. The csvsimple and the longtable packages are both imported. The csv files contain many elements, so the tables will span multiple pages, and my hope is to get it to wrap to the next page in a nice manner. What have I done wrong?

  • I have no idea what csvautolongtable is (and you give no hint, please always make your examples complete) but assuming that it is a variant of the standard longtable for multi-page tables, it can not do anything useful inside a tabular or minipage (and you have it in both) neither minipage nor tabular ever span more than one page. – David Carlisle Oct 31 '20 at 10:31
  • csvautolongtable comes from the csvsimple-package and automatically wraps a table imported from a csv file across pages. I am trying to get three multi-page tables side by side, that are all imported from three different csv -files. Called quadratic_20.csv, quadratic_100.csv and quadratic_200.csv , respectively. But these csv files do not contain the column headings. – AfterMath Oct 31 '20 at 10:41
  • no one can test a fragment, but the main (only) function of a minipage is to prevent page breaking so all the code within the minipage will be on the same page. you can not have longtables side by side, make them a single table with the data in appropriate columns. – David Carlisle Oct 31 '20 at 10:45
  • Do you mean something like this: \begin{longtable}{|l|l|l|l|l|l|l|l|l|l|l|l|} \hline d & k & h & score & d & k & h & score & d & k & h & score \\ \hline \csvreader[tabular=|l|l|l|l|]{quadratic_20.csv}{}{} \csvreader[tabular=|l|l|l|l|]{quadratic_100.csv}{}{} \csvreader[tabular=|l|l|l|l|]{quadratic_200.csv}{}{} \end{longtable} – AfterMath Oct 31 '20 at 10:56
  • 1
    I have no idea about the csv code and you have not provided a test document. I know something about longtable as I wrote it, but I would guess no, that would just make three unbreakable tabular environments wouldn't it? Do something equivalent to first concatenating the csv files to make a single wider table then make a single longtable from that. – David Carlisle Oct 31 '20 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.