0

For my thesis I am trying to adjust the font size of my tables in LaTeX. However, I struggle to have a scriptize font size for my caption and for the entries in my table.

Here's my code. I hope anyone can help!

%begin table
\begin{scriptsize}
\begin{table}[h]
    \centering
    \captionsetup{skip=0.5\baselineskip,size=footnotesize}
     \caption{Test table}
    \label{table:7}
    \begin{tabular}{ l | l }
 \textbf{Entry 1} & \textbf{Entry 2} \\ \cline{1-2}
 Entry 3 & Entry 4 \\ 
\end{tabular}
\end{table}
\end{scriptsize}
4
  • 3
    I'd probably just add a font size command such as \scriptsize inside the table environment. The redefinition will be local and so only the table will be \scriptsize.
    – moewe
    Commented Mar 8, 2019 at 13:00
  • 1
    scriptsize is not an environment. correct use is to add \scriptsize after \begin{document}.
    – Zarko
    Commented Mar 8, 2019 at 13:04
  • @moewe Arg, I did forget about the group around it. Thanks a lot for your comment! Commented Mar 8, 2019 at 13:15
  • Technically \begin{scriptsize} foo \end{scriptsize} usually works fine for text because of the way environments are implemented in LaTeX, but I would usually suggest to go with {\scriptsize foo} instead. See also tex.stackexchange.com/q/7312/35864.
    – moewe
    Commented Mar 8, 2019 at 13:16

1 Answer 1

0

This code works:

\documentclass{article}
\usepackage{caption, array}

\begin{document}

\begin{table}[!htb]
    \centering
    \scriptsize
\setlength{\extrarowheight}{2pt}
    \captionsetup{skip=0.5\baselineskip,size=scriptsize}
     \caption{Test table}
    \label{table:7}
    \begin{tabular}{ l | l }
 \textbf{Entry 1} & \textbf{Entry 2} \\ \cline{1-2}
 Entry 3 & Entry 4 \\
\end{tabular}
\end{table}

\end{document} 

enter image description here

1
  • Great this codes works indeed, thanks a lot!
    – Christiaan
    Commented Mar 8, 2019 at 13:11

You must log in to answer this question.

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