TransWikia.com

Tabularx in twocolumn documents

TeX - LaTeX Asked on December 29, 2021

I am trying to create a tabular that should

  1. stretch to the full width of a single column of a twocolumn document using X column specifications and
  2. be broken over the columns and pages of a twocolumn document.

I have tried the following packages so far, but none could meet both of my requirements:

  • vanilla tabular environment: none of the requirements are supported
  • tabularx: supports 1. only
  • longtable: cannot be used in twocolumn mode
  • supertabular: supports 2. only
  • xtab: despite the name supports 2. only
  • ltablex: depends on longtable for 2. so it cannot be used in twocolumn mode for achieving 2.
  • xltabular: same shortcoming as ltablex
  • tabu: supports 1., but longtabu depends on longtable, so it cannot be used in twocolumn mode for achieving 2.

Is there any package or other solution that could support both 1. and 2.?

One Answer

Maybe tabularray package is what you want:

documentclass[twocolumn]{article}

usepackage{tabularray}

begin{document}

Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text

begin{longtblr}[
  caption = {Long Long Long Tabular},
  entry = {Short Caption},
  label = {tblr:test},
]{
  colspec = {lXX}, hlines,
  rowhead = 2, rowfoot = 1,
}
 Head    & Head  & Head    \
 Head    & Head  & Head    \
 Alpha   & Beta  & Gamma   \
 Epsilon & Zeta  & Eta     \
 Iota    & Kappa & Lambda  \
 Nu      & Xi    & Omicron \
 Rho     & Sigma & Tau     \
 Phi     & Chi   & Psi     \
 Alpha   & Beta  & Gamma   \
 Epsilon & Zeta  & Eta     \
 Iota    & Kapp  & Lambda  \
 Nu      & Xi    & Omicron \
 Rho     & Sigma & Tau     \
 Phi     & Chi   & Psi     \
 Alpha   & Beta  & Gamma   \
 Epsilon & Zeta  & Eta     \
 Iota    & Kappa & Lambda  \
 Nu      & Xi    & Omicron \
 Rho     & Sigma & Tau     \
 Phi     & Chi   & Psi     \
 Alpha   & Beta  & Gamma   \
 Epsilon & Zeta  & Eta     \
 Iota    & Kappa & Lambda  \
 Nu      & Xi    & Omicron \
 Rho     & Sigma & Tau     \
 Phi     & Chi   & Psi     \
 Alpha   & Beta  & Gamma   \
 Epsilon & Zeta  & Eta     \
 Iota    & Kappa & Lambda  \
 Nu      & Xi    & Omicron \
 Rho     & Sigma & Tau     \
 Phi     & Chi   & Psi     \
 Alpha   & Beta  & Gamma   \
 Epsilon & Zeta  & Eta     \
 Iota    & Kappa & Lambda  \
 Nu      & Xi    & Omicron \
 Rho     & Sigma & Tau     \
 Phi     & Chi   & Psi     \
 Alpha   & Beta  & Gamma   \
 Epsilon & Zeta  & Eta     \
 Iota    & Kappa & Lambda  \
 Nu      & Xi    & Omicron \
 Rho     & Sigma & Tau     \
 Phi     & Chi   & Psi     \
 Foot    & Foot  & Foot    \
end{longtblr}

Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text

end{document} 

enter image description here

Answered by L.J.R. on December 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP