0

My goal is to have a table,

  • which can be customized with tabularX (width == textwidth),
  • can break over multiple pages
  • and is able to have zebra stripes (xcolor).

I tried many packages, even the (long)tabu environment, which does not work with xcolor.

What I try now is the xltabular environment. In Org-mode

  #+latex: \rowcolors{2}{lightgray}{white}
  #+ATTR_LATEX: :environment xltabular :width \textwidth :align |l|X|l|
  #+name: tbl:primersequencing
  #+caption: Table of forward (fwd) and reverse (rev) primers for sequencing. For more information see xxx.
  |---+----------------+---------------------------------+-----------------|
  |   | Name           | Sequence (5' \to 3')            | Origin          |
  | / | <>             | <>                              | <>              |
  |---+----------------+---------------------------------+-----------------|
  |   | LacOp- (fwd)   | CGG ATA ACA ATT TCA CAC AG      | standard primer |
  |   | TP 222 (rev)   | CAG ACC GCT TCT GCG TTC TG      | constructed by  |
  |   | malE 222 (fwd) | GGT CGT CAG ACT GTC GAT GAA GCC | standard primer |
  |   | M13F222 (rev)  | AGG GTT TTC CCA GTC ACG ACG TT  | standard primer |
  |---+----------------+---------------------------------+-----------------|
....
....
  |---+----------------+---------------------------------+-----------------|
  |   | LacOp- (fwd)   | CGG ATA ACA ATT TCA CAC AG      | standard primer |
  |   | TP 222 (rev)   | CAG ACC GCT TCT GCG TTC TG      | constructed by  |
  |   | malE 222 (fwd) | GGT CGT CAG ACT GTC GAT GAA GCC | standard primer |
  |   | M13F222 (rev)  | AGG GTT TTC CCA GTC ACG ACG TT  | standard primer |
  |---+----------------+---------------------------------+-----------------|

I am able to color it and to have its width equal to the textwidth. But I'm not able to break at the end of a page and continue on the next, because the org mode wraps it into an standard table environment (which can't split over multiple pages. This is also the problem with other environments (ltablex, lxtable...)

\begin{table}[htbp]
\caption{\label{tab:org6696853}Table of forward (fwd) and reverse (rev) primers for sequencing PERK-TMR constructs used in this work. For more information see \ref{sec:orgee2a843}.}
\centering
\begin{xltabular}{\textwidth}{|l|X|l|}
\hline
Name & Sequence (5' \(\to\) 3') & Origin\\
\hline
LacOp- (fwd) & CGG ATA ACA ATT TCA CAC AG & standard primer\\
TP 222 (rev) & CAG ACC GCT TCT GCG TTC TG & constructed by\\
malE 222 (fwd) & GGT CGT CAG ACT GTC GAT GAA GCC & standard primer\\
M13F222 (rev) & AGG GTT TTC CCA GTC ACG ACG TT & standard primer\\
\hline

....
....

\end{xltabular}
\end{table}

I'm not familiar with Elisp and advanced export modi. I tried to get a regex/ replace to work, but failed.

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.