0

I would like to add extra rows, because this is a long table. But the second column of the table becomes narrower when I add extra rows.

Here is the code, the last several rows are in %comment mode, because when I decomment them, the table column 2 becomes very narrow:

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx} % Required for inserting images
\usepackage{setspace}% for\doublespacing

\usepackage{indentfirst}% for indent the first line \usepackage{longtable} \usepackage{textalpha}

\usepackage{ragged2e} \usepackage[T1]{fontenc} % <-- new \usepackage{xltabular} \usepackage{amsmath} \usepackage{caption} \DeclareUnicodeCharacter{2212}{-}%new

\begin{document}

\section{DUSP genes expression in non-brain tissues in animal and human}

\newcolumntype{L}{>{\RaggedRight}X} % suspend full justification % special new column type for header row: \newcolumntype{C}{>{\centering\arraybackslash}% p{\dimexpr\textwidth-2\tabcolsep-2\arrayrulewidth\relax}}

\begin{xltabular}{\textwidth}{ | l | L | c | l | l | } % <-- new

%% headers and footers \caption{DUSP genes expression in non-brain tissues in animal and human\label{long5}}\ \hline \multicolumn{5}{ | C | }{DUSP genes expression in non-brain tissues in animal and human}\ \hline Protein & Tissue/ Cell line & Species & Protein/ mRNA & Ref. \ \hline \endfirsthead

\hline \multicolumn{5}{|c|}{Continuation of Table \ref{long5}}\ \hline Protein & Tissue/ Cell line & Species & Protein/ mRNA & Ref. \ \hline \endhead

\hline \endfoot

\hline \multicolumn{5}{| c |}{End of Table}\ \hline\hline \endlastfoot

SSH1 & PC-3 Cell & Human & Protein & \cite{Ottman2016TheCancer} \ & Aortas& Mice & Protein & \cite{Yamashiro2015AbnormalMice} \ & Keratinocytes& Human&Protein& \cite{Kligys2007TheKeratinocytes} \ SSH2 & Carcinoma cell lines& Human& Protein/mRNA& \cite{Lu2014KnockdownFLCN}\ & Vascular smooth muscle cell& Rat& mRNA& \cite{Torres2011SlingshotFormation}\ & PC12 Cell& Human& Protein & \cite{Xu2015GPCR-mediatedChemotaxis}\ & CD4+ T cells &Human &Protein& \cite{Kanai2014IdentificationCells}\ & Keratinocytes & Human &Protein& \cite{Kligys2007TheKeratinocytes}\ SSH3& Colorectal cancer& Human& Protein/mRNA& \cite{Hu2019SSH3LIMK1/Rac1}\ & Prostate cancer& Human& Protein & \cite{Muller2018ProteomicMetastases} \ & Blood& Human& mRNA& \cite{Wang2020IdentificationDisease}\

PRL1 & Liver, Intestine & Mice & Protein/mRNA & \cite{Diamond1996ExpressionIntestine}\ & Mid guts& Drosophila &mRNA& \cite{Lin2013ExpressionZebrafish}\

&amp; Testis&amp;   Mice&amp;   Protein&amp; \cite{Bai2016RoleSpermatogenesis}\\

&amp;  Prostate&amp;    Human&amp;  mRNA&amp; \cite{Shinmei2014IdentificationMethod} \\

 &amp; Ovarian cancer&amp;  Human&amp;  Protein/mRNA&amp;   \cite{Reich2011ExpressionCarcinoma}\\

PRL2 & Lung cancer& Human &Protein/mRNA& \cite{Wang2012Metastasis-associatedInvasion}\

&amp;    Ovarian cancer&amp;    Human   &amp;Protein/mRNA&amp;  \cite{Reich2011ExpressionCarcinoma}\\

&amp;    Testis &amp; Mice&amp; Protein &amp;  \cite{Bai2016RoleSpermatogenesis}\\

 &amp;  Thymocyte &amp;     Mice&amp;   mRNA    &amp;  \cite{Kobayashi2017ProteinProgenitors} \\

&amp;    Skeletal muscle &amp;  Mice&amp;   Protein/mRNA&amp;\cite{Dong2012PhosphataseProtein,Zeng1998MousePRL-1}\\ 

PRL3 &amp;   Colon cancer&amp;   Mice/Human&amp;    Protein/mRNA&amp;\cite{Li2005GenerationMetastases,Zimmerman2013TargetedCancer} \\

     &amp;    Prostate cancer &amp;  Human&amp;  Protein/mRNA   &amp;  \cite{Vandsemb2016PhosphataseMigration}\\

     &amp;  Ocular melanoma cells&amp;      Human&amp;      Protein&amp;  \cite{Foy2017PRL-3/PTP4A3Cells}\\

     &amp;  Breast cancer&amp;      Human&amp;      Protein/mRNA&amp;  \cite{Patel2015RoleCarcinoma}\\

     &amp;  Skeletal muscle, heart&amp;     Human&amp;      mRNA&amp;  \cite{Matter2001RoleSignaling}\\

     &amp;  Skeletal muscle, heart&amp;     Mice&amp;   mRNA&amp;  \cite{Zeng1998MousePRL-1}\\

CDC14A &amp; Brain vascular endothelial cell&amp;   Human &amp; Protein &amp;\cite{Su2015HCdc14AHypoxia}\\

&amp;Oocytes &amp;  Mice&amp;   Protein&amp;    \cite{Schindler2009TheMouse}\\

&amp;Gastric tissue &amp;   Human&amp;  mRNA    &amp; \cite{Song2010MutationalInstability}\\

&amp;HeLa cells&amp;    Human&amp;  Protein &amp; \cite{Mailand2002DeregulatedSegregation}\\

&amp;Lymph nodes, liver, colon, kidneys, testis &amp; Human&amp;Protein&amp; \*\cite{Uhlen2015Proteomics.Proteome}\\

CDC14B & HeLa cells& Human& Protein & \cite{Wu2008Cdc14BDuplication} \

&amp; Bone Osteosarcoma Epithelial Cells (U2OS Line) &amp;  Human&amp;  Protein &amp; \cite{Cho2005TheMicrotubules}\\

&amp; Lymph nodes, liver, colon, kidneys, testis &amp;  Human&amp;  Protein&amp;   \cite{Uhlen2015Proteomics.Proteome} *\ \\

&amp; Oocytes&amp;      Mice&amp;   Protein/mRNA &amp; \cite{Schindler2009TheMouse} \\

CDC14C & Vulva precursors & C. elegans & Protein & \cite{Roy2011ControlElegans}\

 &amp; Mononuclear cells &amp;  Human &amp;     mRNA     &amp; \cite{Szmit2010GeneFailure}\\

PTENs & Endometrial cancer& Human& Protein& \cite{Mutter2000AlteredPrecancers} \

&amp;  Pancreas&amp;    Human&amp;      Protein/mRNA&amp;   \cite{Ebert2000OverexpressionCancer}\\

&amp;   Colorectal cancer&amp;      Human&amp;      Protein&amp;  \cite{Frattini2007PTENPatients}   \\

&amp;  Cochlear lateral wall&amp;   Mice&amp;   Protein&amp;  \cite{Dong2014TheWall}\\

&amp;  Uterus&amp;      Mice&amp;   Protein&amp;    \cite{Lague2010DecidualMouse}\\

&amp;  Ovary cells&amp;     Chinese hamster&amp;    Protein &amp;  \cite{Kerr2006PTENGSK-3}\\

% Myotubularins& Lungs, muscles& Mice& Protein& \cite{Uhlen2015Proteomics.Proteome} * \ % &endocrine tissue & & & \ % & bone marrow& & & \ % & liver& & & \ % & immune system& & & \ % &gallbladder& & & \ % &pancreas& & & \

% &Skin& Human& mRNA& \cite{Raess2017WANTEDFamily}\ % &lungs& & & \ % &vagina& & & \

% &Lungs& Human& Protein& \cite{Uhlen2015Proteomics.Proteome} * \ % &muscles& & & \ % & endocrine tissue& & & \ % & bone marrow& & & \ % & immune system& & & \ % & liver & & & \ % & pancreas& & & \ % & gallbladder& & & \

\end{xltabular}

% This is footnote \begin{minipage}{10cm} \small Note:* (www.proteinatlas.org)\ BNST:The bed nucleus of the stria terminalis \end{minipage}

\end{document}

Normal width of the column2:

enter image description here

Narrowed column 2:

enter image description here

Annie
  • 93
  • 1
    The second column is X-column based. So it get the width of the table width minus the width of all other columns. So to make the second column wider, either increase the width of the whole table (but it is already \textwidth, so you would have to increase the width of the text area) or make the other columns smaller. To make the other columns smaller, you could use p-columns with a dedicated width to allow line breaks in the other columns. – cabohah Aug 04 '23 at 15:45
  • Thank you for the comments. How can I modify the p column then? – Annie Aug 04 '23 at 15:49
  • p-columns have an argument specifying the width of the column. Please have a look into a LaTeX introduction or https://en.wikibooks.org/wiki/LaTeX/Tables – cabohah Aug 04 '23 at 15:56
  • for example you have column 3 and 4 as cl make them p{1cm}p{1cm} for whatever width works best – David Carlisle Aug 04 '23 at 16:03
  • Thank you, I solved this problem. – Annie Aug 04 '23 at 16:09

0 Answers0