\documentclass[11pt]{elsarticle}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tabularx}
\usepackage{array}
\makeatletter
\newcommand{\thickhline}{%
\noalign {\ifnum 0=`}\fi \hrule height 1pt
\futurelet \reserved@a \@xhline
}
\newcolumntype{"}{@{\hskip\tabcolsep\vrule width 1pt\hskip\tabcolsep}}
\makeatother
\begin{document}
\begin{table}[ht]
\caption{Overview of notation} \label{tab:notation_TC} \centering \resizebox{5cm}{!}{%
\begin{tabular}{l l }
% {
\thickhline
\bf Notation & \bf Description \\ [0.75ex]
\hline
hey & hello\\
\thickhline
\end{tabular}}
\end{table}
\end{document}
Asked
Active
Viewed 70 times
1
2 Answers
3
You may try the new LaTeX3 package tabularray:
\documentclass{article}
\usepackage{caption}
\usepackage{tabularray}
\begin{document}
\begin{table}[ht]
\caption{Overview of notation}
\label{tab:notation_TC}
\centering
\begin{tblr}{colspec={ll},row{1}={m,1cm,font=\bfseries}}
\hline[2pt]
Notation & Description \
\hline
Hey & Hello \
\hline[2pt]
\end{tblr}
\end{table}
\end{document}
L.J.R.
- 10,932
-
Thanks @L.J.R. Just need a view which approach is better? I find using booktabs easier. – mathslove Jul 22 '21 at 08:23
-
@mathslove You can also use
booktabsrules by\UseTblrLibrary{booktabs}while usingtabularraypackage. – L.J.R. Jul 22 '21 at 08:27 -
Facing problem during compilation. It is showing tabularray.sty not found – mathslove Jul 22 '21 at 08:33
-
-
-
-
-
texstudio is just an editor. You need to update your texlive or miktex. – L.J.R. Jul 22 '21 at 09:13
-
2
\documentclass[11pt]{elsarticle}
\usepackage{booktabs}
\begin{document}
\begin{table}[ht]
\caption{Overview of notation}
\label{tab:notation_TC}
\centering
% \small % uncomment for a smaller font size in the table
\begin{tabular}{ll}
\toprule
\bfseries Notation & \bfseries Description\\
\midrule
hey & hello\\
\bottomrule
\end{tabular}
\end{table}
\end{document}
leandriis
- 62,593



booktabsbased approach, such as\documentclass[11pt]{elsarticle} \usepackage{booktabs} \begin{document} \begin{table}[ht] \caption{Overview of notation} \label{tab:notation_TC} \centering \begin{tabular}{ll} \toprule \bfseries Notation & \bfseries Description\\ \midrule hey & hello\\ \bottomrule \end{tabular} \end{table} \end{document}? – leandriis Jul 22 '21 at 07:57\resizeboxon a table. This will lead to inconsistent font sizes and line widths throughout the document. Also, do not use\bf, but\bfseriesor `\textbf{...}?. (See also: “Correct” way to bold/italicize text?) – leandriis Jul 22 '21 at 08:00\multicolumn{1}{c}{Notation}etc. – John Kormylo Jul 22 '21 at 14:06