Document ClassesCannot change font size in table

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
vrgf
Posts: 3
Joined: Thu Jun 12, 2008 1:20 am

Cannot change font size in table

Post by vrgf »

Previously, I can easily change the font size of the table content by using

\begin{table}
\small
\begin{tabular}....
\end{tabular}
\end{table}

After I load a template file, I find that "\small" does not work any more,
the font size of the table content is always the normal size.

Can anyone help to find that which
part of the template could cause the problem?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Cannot change font size in table

Post by gmedina »

Without the template itself it is very difficult to provide effective help. Can you please attach it or post it?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
vrgf
Posts: 3
Joined: Thu Jun 12, 2008 1:20 am

Re: Cannot change font size in table

Post by vrgf »

Here is the template, I appreciate any help.
Attachments
paper.cls
(46.68 KiB) Downloaded 751 times
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Cannot change font size in table

Post by gmedina »

In the introduction to paper.cls you will find this:
paper.cls wrote: %%% Version 2.4 sets \evensidemargin correctly
%%% for two-sided style. It also adds new
%%% environments (\smalltabular and
%%% \scriptsizetabular) which produce tables
%%% with smaller fonts. The obvious methods
%%% of producing small-font tables don't work
%%% in ucthesis style.
So you can use those new environments, as the following example suggests:

Code: Select all

\documentclass{paper}

\begin{document}

\begin{table}
  \centering
  \begin{tabular}{c|c}
    \hline
    test text & test text\\ \hline
  \end{tabular}
\end{table}

%\small will have no effect
\begin{table}
  \small
  \centering
  \begin{tabular}{c|c}
    \hline
    test text & test text\\ \hline
  \end{tabular}
\end{table}

%one of the new environments implemented by paper.cls
%to produce tables with smaller fonts
\begin{table}
  \centering
  \begin{smalltabular}{c|c}
    \hline
    test text & test text\\ \hline
  \end{smalltabular}
\end{table}

%the other new environment implemented by paper.cls
%to produce tables with smaller fonts
\begin{table}
  \centering
  \begin{scriptsizetabular}{c|c}
  \hline
    test text & test text\\ \hline
  \end{scriptsizetabular}
\end{table}

\end{document}
There are also some new commands \smallssp and \scriptsizessp that can be used instead of the standard \small and \scriptsize switches:

Code: Select all

\documentclass{paper}

\begin{document}

%the two new commands implemented by paper.cls
%to produce tables with smaller fonts
\begin{table}
  \centering
  \begin{tabular}{c|c}
  \hline
    test text & test text\\ \hline
    {\smallssp test text} & test text\\ \hline
    {\scriptsizessp test text} & test text\\ \hline
  \end{tabular}
\end{table}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
vrgf
Posts: 3
Joined: Thu Jun 12, 2008 1:20 am

Cannot change font size in table

Post by vrgf »

Oh, Yes, Here is the problem.

Thank you very much for pointing out this.


gmedina wrote:In the introduction to paper.cls you will find this:
paper.cls wrote: %%% Version 2.4 sets \evensidemargin correctly
%%% for two-sided style. It also adds new
%%% environments (\smalltabular and
%%% \scriptsizetabular) which produce tables
%%% with smaller fonts. The obvious methods
%%% of producing small-font tables don't work
%%% in ucthesis style.
So you can use those new environments, as the following example suggests:

Code: Select all

\documentclass{paper}

\begin{document}

\begin{table}
  \centering
  \begin{tabular}{c|c}
    \hline
    test text & test text\\ \hline
  \end{tabular}
\end{table}

%\small will have no effect
\begin{table}
  \small
  \centering
  \begin{tabular}{c|c}
    \hline
    test text & test text\\ \hline
  \end{tabular}
\end{table}

%one of the new environments implemented by paper.cls
%to produce tables with smaller fonts
\begin{table}
  \centering
  \begin{smalltabular}{c|c}
    \hline
    test text & test text\\ \hline
  \end{smalltabular}
\end{table}

%the other new environment implemented by paper.cls
%to produce tables with smaller fonts
\begin{table}
  \centering
  \begin{scriptsizetabular}{c|c}
  \hline
    test text & test text\\ \hline
  \end{scriptsizetabular}
\end{table}

\end{document}
There are also some new commands \smallssp and \scriptsizessp that can be used instead of the standard \small and \scriptsize switches:

Code: Select all

\documentclass{paper}

\begin{document}

%the two new commands implemented by paper.cls
%to produce tables with smaller fonts
\begin{table}
  \centering
  \begin{tabular}{c|c}
  \hline
    test text & test text\\ \hline
    {\smallssp test text} & test text\\ \hline
    {\scriptsizessp test text} & test text\\ \hline
  \end{tabular}
\end{table}

\end{document}
Post Reply