0

This question already has an answer here:

\begin{center}
\small
\setlength\extrarowheight{0.01pt}
\captionof{table}{Nomenclature}
\renewcommand{\arraystretch}{1.3}
\setlength\doublerulesep{.1pt}
\begin{tabular}{ |p{2cm}|p{5cm}|}
\hline
 \hline
 \textbf{\small Symbol}    & \textbf{\small Description} \\
 \hline
 $E_{c , TL}$&  Total energy consumption in a day \\
 $R_{a}$ & ----------------\\
 $S_{a}$ & S--------------- \\
 $E_{a}$ & -----------\\
\end{tabular}
\end{center}

And I want to make the font size small whatever written in the table, however, I have used \small but it doesn't work in a tabular environment. Kindly help me out.

marked as duplicate by CarLaTeX, user36296, Zarko tables Jun 13 '17 at 13:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Welcome to TeX.SX! Please help us (and also you) and add a minimal working example (MWE), that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass and ending with \end{document}. – Bobyandbob Jun 13 '17 at 13:18
6

Yes, it does. The difference between \small and \normalfont is just not very large, so you maybe just didn't notice it.

There are in general two ways to go (and your example contains both):

  • set a fontsize (\small, \tiny, etc.) before the \begin{tabular}, then all cells will have this fontsize
  • use the fontsize only within a cell, then only this cell will have this fontsize

Note also: If you apply \small for the whole tabular, and you want a specific cell to be even smaller, then you need to use an even smaller fontsize in a specific cell (like \footnotesize).

See here an example of how the different fontsizes look like in a table:

\documentclass{article}
\begin{document}

\normalsize
\begin{tabular}{|p{2cm}|p{6cm}|}
 \hline
 \textbf{Symbol} & \textbf{Description} \\
 \hline
 $E_{c , TL}$&  Total energy consumption in a day \\
 \hline
\end{tabular}

\small
\begin{tabular}{|p{2cm}|p{6cm}|}
 \hline
 \textbf{Symbol} & \textbf{Description} \\
 \hline
 $E_{c , TL}$&  Total energy consumption in a day \\
 \hline
\end{tabular}

\footnotesize
\begin{tabular}{|p{2cm}|p{6cm}|}
 \hline
 \textbf{Symbol} & \textbf{Description} \\
 \hline
 $E_{c , TL}$&  Total energy consumption in a day \\
 \hline
\end{tabular}

\scriptsize
\begin{tabular}{|p{2cm}|p{6cm}|}
 \hline
 \textbf{Symbol} & \textbf{Description} \\
 \hline
 $E_{c , TL}$&  Total energy consumption in a day \\
 \hline
\end{tabular}

\tiny
\begin{tabular}{|p{2cm}|p{6cm}|}
 \hline
 \textbf{Symbol} & \textbf{Description} \\
 \hline
 $E_{c , TL}$&  Total energy consumption in a day \\
 \hline
\end{tabular}

\end{document}

enter image description here

0

Try to put the \small out of the table environment.

    \begin{document}

\small
       \begin{center}
        \setlength\extrarowheight{0.01pt}
        \captionof{table}{Nomenclature}
        \renewcommand{\arraystretch}{1.3}
        \setlength\doublerulesep{.1pt}
        \begin{tabular}{ |p{2cm}|p{5cm}|}
            \hline
            \hline
            \textbf{ Symbol}    & \textbf{ Description} \\
            \hline
            $E_{c , TL}$&  Total energy consumption in a day \\
            $R_{a}$ & ----------------\\
            $S_{a}$ & S--------------- \\
            $E_{a}$ & -----------\\
        \end{tabular}
       \end{center}

   \end{document}
  • This doesn't change the output. – Tiuri Jun 13 '17 at 13:30
  • \small should be in table environment: \begin{table}\small \begin{tabular}...\end{tabular}\end{table} or in your case \begin{center}\small\begin{tabular}...\end{tabular}\end{center} .... As you propose, all after `\small is in small fonts. – Zarko Jun 13 '17 at 13:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.