1

I would like to set it to 8pt for tables globally. How would one go about doing that?

I did see this article.

The solution provided by Marco Daniel works very well if you want to set the font size to small/large, without a specific number.

Any help will be nice to have.

@Darko please find here the MWE

\documentclass[a4paper,11pt]{article}
\usepackage{booktabs}
\fontsize{8 pt}{10 pt}{\selectfont}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\noindent\begin{table}[htb!]
    \centering
          \def\arraystretch{0.8}%  1 is the default, change whatever you need
    \caption{sum.}
    \label{tab: sum}
    \begin{tabular}{@{}lllc@{}}
        \toprule
        \textbf{\#} & \textbf{Scope}  &  \textbf{Activity}   & \textbf{Month} \\
        \midrule
        1 & foo                        & bar                  & M1-M24\vspace{1mm}\\ 
        \bottomrule
    \end{tabular}
\end{table}
\end{document}
  • 1
    You can check which font command you need based on the default document font size (see, e.g., tex.stackexchange.com/questions/24599/…). So, for standard document classes, if the document font size is 11pt or 12pt then you should set the table font size to \scriptsize to get 8pt in tables, and if the document font size is 10pt then you should use \footnotesize. – Marijn Jul 10 '18 at 9:27
  • for example with \fontsize{8 pt}{10 pt}\selectfont}? – Zarko Jul 10 '18 at 9:28
  • 1
    You could try this, which relies on the etoolbox package: \AtBeginEnvironment{table}{\fontsize{8pt}{10pt}\selectfont} and probably similarly for longtable if you use it. – Bernard Jul 10 '18 at 9:30
  • Bernard and Zarko: I did not see any difference in font after using either of them – tandem Jul 10 '18 at 9:39
  • @Marijn, that's not a bad idea, but that would never be standardised.. as one would always have to look at the cls file. – tandem Jul 10 '18 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.