3

I am working on an Elsevier Paper where I have to build up a table of notations. I have tried both {tabular} and {tabu} packages. But, in Tabular, table width exceeds the text block width while in Tabu, the table width matches the text width but I could not adjust the first column to get a smaller width to allow for the the other column to get most of the space. The codes are shown as follows:

\documentclass[preprint, authoryear]{elsarticle}

\journal{Journal of Transportation Research, Part E}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage{textcomp}
\usepackage{siunitx}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\usepackage{tikz}
\usepackage{lettrine}
\allowdisplaybreaks
\usepackage[export]{adjustbox}
\usepackage{ragged2e}
\usepackage{subfig}
\usepackage{float}
\usepackage{booktabs}
\usepackage{makecell, multirow}
\usepackage{tabularx}
\usepackage{array}
\usepackage{tabu}

\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\usepackage{url}
\urlstyle{same}
\usepackage[colorlinks=true,linkcolor=black, citecolor=blue, urlcolor=blue]{hyperref}

%% `Elsevier LaTeX' style
\bibliographystyle{elsarticle-harv}
%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\section{Introduction}\label{sec: intro}
Text text Text textText textText textText textText textText text
Text textText textText textText textText text Text textText textText textText textText textText textText textText textText textText textText textText textText textText text


Text text Text textText textText textText textText textText text
Text textText textText textText textText text Text textText textText textText textText textText textText textText textText textText textText textText textText textText text

\begin{table}[H]
    \caption{Notations}
    \label{tab: DenoteTabl}
    \centering
    \begin{tabu}{|X[{l,1cm}]X[l]|}
        \hline
        \multicolumn{2}{|c|}{Sets} \\ \hline
        $N$ & Nodes within the underlying network, indexed by $i$\\
        $A$ & Arcs of train services, indexed by ${\left\langle{i,j}\right\rangle}$\\
        $G$ & Goods o, indexed by $g$  \\
        $K$ & Origin/Destination pair of orders / traffic classes, indexed by $k$  \\ 
        $R$ & Remoteness:  indexed by $r$\\
        $YT$ & CL and TR nodes, indexed by $yt$, $yt\in \{cl,tr\}$   \\ 
        $BP$ & Breaking points used in constituting intervals\\
        \hline
        \multicolumn{2}{|c|}{Sets} \\ \hline
        $N$ & Nodes within the underlying network, indexed by $i$\\
        $A$ & Arcs of train services, indexed by ${\left\langle{i,j}\right\rangle}$\\
        $G$ & Goods o, indexed by $g$  \\
        $K$ & Origin/Destination pair of orders / traffic classes, indexed by $k$vvvvvvvvvvvvvvvvvvvvvvvvvvv \\ 
        $R$ & Remoteness:  indexed by $r$\\
        $YT$ & CL and TR nodes, indexed by $yt$, $yt\in \{cl,tr\}$   \\ 
        $BP$ & Breaking points used in constituting intervals\\
        \hline
        \multicolumn{2}{|c|}{Sets} \\ \hline
        $N$ & Nodes within the underlying network, indexed by $i$\\
        $A$ & Arcs of train services, indexed by ${\left\langle{i,j}\right\rangle}$\\
        $G$ & Goods o, indexed by $g$  \\
        $K$ & Origin/Destination pair of orders / traffic classes, indexed by $k$  \\ 
        $R$ & Remoteness:  indexed by $r$\\
        $YT$ & CL and TR nodes, indexed by $yt$, $yt\in \{cl,tr\}$   \\ 
        $BP$ & Breaking points used in constituting intervals\\
        \hline
    \end{tabu}
\end{table}

Text text Text textText textText textText textText textText text
Text textText textText textText textText text Text textText textText textText textText textText textText textText textText textText textText textText textText textText text

\begin{table}[H]
    \caption{Notations}
    \label{tab: DenoteTabl}
    \centering
    \begin{tabular}{|ll|}
        \hline
        \multicolumn{2}{|c|}{Sets} \\ \hline
        $N$ & Nodes within the underlying network, indexed by $i$\\
        $A$ & Arcs of train services, indexed by ${\left\langle{i,j}\right\rangle}$\\
        $G$ & Goods o, indexed by $g$  \\
        $K$ & Origin/Destination pair of orders / traffic classes, indexed by $k$  \\ 
        $R$ & Remoteness:  indexed by $r$\\
        $YT$ & CL and TR nodes, indexed by $yt$, $yt\in \{cl,tr\}$   \\ 
        $BP$ & Breaking points used in constituting intervals\\
        \hline\multicolumn{2}{|c|}{Sets} \\ \hline
        $N$ & Nodes within the underlying network, indexed by $i$\\
        $A$ & Arcs of train services, indexed by ${\left\langle{i,j}\right\rangle}$\\
        $G$ & Goods o, indexed by $g$  \\
        $K$ & Origin/Destination pair of orders / traffic classes, indexed by $k$  vvvvvvvvvvvvvvvvvvvvvvvvvvv \\ 
        $R$ & Remoteness:  indexed by $r$\\
        $YT$ & CL and TR nodes, indexed by $yt$, $yt\in \{cl,tr\}$   \\ 
        $BP$ & Breaking points used in constituting intervals\\
        \hline\multicolumn{2}{|c|}{Sets} \\ \hline
        $N$ & Nodes within the underlying network, indexed by $i$\\
        $A$ & Arcs of train services, indexed by ${\left\langle{i,j}\right\rangle}$\\
        $G$ & Goods o, indexed by $g$  \\
        $K$ & Origin/Destination pair of orders / traffic classes, indexed by $k$  \\ 
        $R$ & Remoteness:  indexed by $r$\\
        $YT$ & CL and TR nodes, indexed by $yt$, $yt\in \{cl,tr\}$   \\ 
        $BP$ & Breaking points used in constituting intervals\\
        \hline
    \end{tabular}
\end{table}
Text text Text textText textText textText textText textText text
Text textText textText textText textText text Text textText textText textText textText textText textText textText textText textText textText textText textText textText text

Text text Text textText textText textText textText textText text
Text textText textText textText textText text Text textText textText textText textText textText textText textText textText textText textText textText textText textText text
\end{document}

Moreover, it may the table become larger than a page, and I may have to have a caption like Table 1 for the table on the first page, and for the one on the other page should have a title like Table 1 Cont'd.

I would really appreciate if you could help me out with the above-mentioned issues (table width matching the text block in {Tabular}, column width adjustment in {Tabu}, and long tables with one same name / label (Table 1, Table 1 cont/d) to be cross-referenced to as table 1.

regards

1 Answer 1

2

for use of the package tabu instead of

\centering
\begin{tabu}{|X[{l,1cm}]X[l]|}
    \hline

use:

\tabulinesep = 3pt
\begin{tabu}to \linewidth {|r X[l]|}

enter image description here

instead of tabular i recommend to use tabularx

\setlength\extrarowheight{2pt}
\begin{tabularx}{\linewidth}{|r X|}
    \hline

(other code lines are the same)

enter image description here enter image description here

0

You must log in to answer this question.

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