1

thank you for your help. When I have the following code the table created goes out of the page. How can I keep the table in the page using tabu? Also I would like the first column to not exceed a defined width and the text to be wrapped here.

Thanks

    \renewcommand{\arraystretch}{1.5}
    \centering
    \begin{tabu}{*{7}{x[c]}}
        \toprule
         Name & Company & Lot & Purchased & Concentration & Date created & Location \\
         \midrule
         XE991 \geq 98\% & Sigma & 026M4737V & 4.8.2020 & Solid & - & Room 2.38 \\
         XE991 $>$ 95\% & alomone & X100SMO150 & 8.2020 & Solid & - & Room 2.38 \\
         Paracetamol & MCE & 16369 & 7.2020 & Solid & - & Room 2.38 \\
         Retigabine dihydrochloride & Acros Organics & A0412371 & 6.2020 & Solid & - & Room 2.38 \\
         \bottomrule
    \end{tabu}
    \label{tab:Standards 4 Degrees}
\end{table}

enter image description here

3
  • 1
    Welcome to TSE. Please post a Minimal Working Example, instead of a code snippet. Aug 25, 2021 at 10:08
  • 3
    the tabu package is broken and unmaintained. Don't use it. Aug 25, 2021 at 10:16
  • Thanks! Will do-
    – vienna2021
    Aug 26, 2021 at 11:30

1 Answer 1

2

enter image description here

(red lines shows text borders)

Instead tabu rather use new table package tabularray:

\documentclass{article}
\usepackage{geometry}
\usepackage{tabularray}
\UseTblrLibrary{siunitx}

\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}


\begin{document}
    \begin{table}
    \centering
\begin{tblr}{hline{1,Z}={1pt}, hline{2}=0.6pt,
             colspec={X[1.3,l,m] X[0.9,l,m] X[1.2,l,m] *{4}{X[0.9,l,m]}},
             colsep=3pt, rowsep=3pt
             }     
Name                        
    & Company           & Lot           & Purchased & Concen\-tration 
                                                            & Date created 
                                                                & Location  \\
XE991 $\geq \qty{98}{\%}$            
    & Sigma             & 026M4737V     & 4.8.2020  & Solid & - & Room 2.38 \\
XE991 $> \qty{95}{\%}$
    & alomone           & X100SMO150    & 8.2020    & Solid & - & Room 2.38 \\
Paracetamol
    & MCE               & 16369         & 7.2020    & Solid & - & Room 2.38 \\
Retigabine dihydrochloride
    & Acros Organics    & A0412371      & 6.2020    & Solid & - & Room 2.38 \\
\end{tblr}
    \label{tab:Standards 4 Degrees}
    \end{table}
\end{document}
1
  • Ok. Thanks you!
    – vienna2021
    Aug 26, 2021 at 11:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .