Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've been trying to customize the tableofcontents and sections to my own liking in the amsart class, but a lot (if not all) of the packages for either of these two functions are incompatible with amsart. At the suggestion of a few here, I've decided to switch to the article class, which easily let me change them to my heart's content. However, I'm a huge fan of amsart's font sizes and headings, and I'd like to emulate that style in the article class. I've managed to mimic the headings using fancyhdr but I'm at a loss for emulating the font sizes.

Wikibooks here shows the specific differences in the font sizes between article and amsart. For the lazy

I was wondering how I could alter each of article's font sizes (e.g. \tiny to \Huge) to match the absolute point sizes of amsart's. Perhaps some type of \renewcommand{\tiny}{\fontsize{7.33325}} macro?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

I have put the stuff for the font sizes of the class amsart in a separate package amssizes:

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{amssizes}[2012/09/11 v1.0 Font size stuff from class amsart]

\newcommand{\larger}[1][1]{%
  \count@\@currsizeindex \advance\count@#1\relax
  \ifnum\count@<\z@ \count@\z@ \else\ifnum\count@>12 \count@12 \fi\fi
  \ifcase\count@
    \Tiny\or\Tiny\or\tiny\or\SMALL\or\Small\or\small
    \or\normalsize
    \or\large\or\Large\or\LARGE\or\huge\or\Huge\else\Huge
  \fi
}
\newcommand{\smaller}[1][2]{\larger[-#1]}
\def\@adjustvertspacing{%
  \bigskipamount.7\baselineskip plus.7\baselineskip
  \medskipamount\bigskipamount \divide\medskipamount\tw@
  \smallskipamount\medskipamount \divide\smallskipamount\tw@
  \abovedisplayskip\medskipamount
  \belowdisplayskip \abovedisplayskip
  \abovedisplayshortskip\abovedisplayskip
  \advance\abovedisplayshortskip-1\abovedisplayskip
  \belowdisplayshortskip\abovedisplayshortskip
  \advance\belowdisplayshortskip 1\smallskipamount
  \jot\baselineskip \divide\jot 4 \relax
}
\renewcommand\normalsize{\@xsetfontsize\normalsize 6%
  \@adjustvertspacing \let\@listi\@listI}
\DeclareRobustCommand{\Tiny}{\@xsetfontsize\Tiny 1}
\DeclareRobustCommand{\tiny}{\@xsetfontsize\tiny 2}
\DeclareRobustCommand{\SMALL}{\@xsetfontsize\SMALL 3}
\DeclareRobustCommand{\Small}{\@xsetfontsize\Small 4%
  \@adjustvertspacing
  \def\@listi{\topsep\smallskipamount \parsep\z@skip \itemsep\z@skip
    \leftmargin=\leftmargini
    \labelwidth=\leftmargini \advance\labelwidth-\labelsep
  }%
}
\DeclareRobustCommand{\small}{\@xsetfontsize\small 5\@adjustvertspacing}
\def\footnotesize{\Small}
\def\scriptsize{\SMALL}
\DeclareRobustCommand{\large}{\@xsetfontsize\large 7\@adjustvertspacing}
\DeclareRobustCommand{\Large}{\@xsetfontsize\Large 8\@adjustvertspacing}
\DeclareRobustCommand{\LARGE}{\@xsetfontsize\LARGE 9}
\DeclareRobustCommand{\huge}{\@xsetfontsize\huge{10}}
\DeclareRobustCommand{\Huge}{\@xsetfontsize\Huge{11}}
\def\@xsetfontsize#1#2{%
  \chardef\@currsizeindex#2\relax
  \edef\@tempa{\noexpand\@setfontsize\noexpand#1%
    \expandafter\ifcase\expandafter\@currsizeindex\@typesizes
      \else{99}{99}\fi}%
  \@tempa
}
\chardef\@currsizeindex=6

\DeclareOption{10pt}{%
  \def\@mainsize{10}  
  \def\@ptsize{0}%    
  \def\@typesizes{%   
    \or{5}{6}\or{6}{7}\or{7}{8}\or{8}{10}\or{9}{11}%
    \or{10}{12}% normalsize
    \or{\@xipt}{13}\or{\@xiipt}{14}\or{\@xivpt}{17}%
    \or{\@xviipt}{20}\or{\@xxpt}{24}%
  }%
}   
\DeclareOption{11pt}{%
  \def\@mainsize{11}% 
  \def\@pt@size{1}%   
  \def\@typesizes{%   
    \or{6}{7}\or{7}{8}\or{8}{10}\or{9}{11}\or{10}{12}%
    \or{\@xipt}{13}% normalsize
    \or{\@xiipt}{14}\or{\@xivpt}{17}\or{\@xviipt}{20}%
    \or{\@xxpt}{24}\or{\@xxvpt}{30}%
  }%
}   
\DeclareOption{12pt}{%
  \def\@mainsize{12}% 
  \def\@ptsize{2}%    
  \def\@typesizes{%   
    \or{7}{8}\or{8}{10}\or{9}{11}\or{10}{12}\or{\@xipt}{13}%
    \or{\@xiipt}{14}% normalsize
    \or{\@xivpt}{17}\or{\@xviipt}{20}\or{\@xxpt}{24}%
    \or{\@xxvpt}{30}\or{\@xxvpt}{30}%
  }%
}   
\DeclareOption{8pt}{%
  \def\@mainsize{8}% 
  \def\@ptsize{8}%   
  \def\@typesizes{%  
    \or{5}{6}\or{5}{6}\or{5}{6}\or{6}{7}\or{7}{8}%
    \or{8}{10}% normalsize
    \or{9}{11}\or{10}{12}\or{\@xipt}{13}%
    \or{\@xiipt}{14}\or{\@xivpt}{17}%
  }%
}   
\DeclareOption{9pt}{%
  \def\@mainsize{9}% 
  \def\@ptsize{9}%   
  \def\@typesizes{%  
    \or{5}{6}\or{5}{6}\or{6}{7}\or{7}{8}\or{8}{10}%
    \or{9}{11}% normalsize
    \or{10}{12}\or{\@xipt}{13}\or{\@xiipt}{14}%
    \or{\@xivpt}{17}\or{\@xviipt}{20}%
  }%
}   
\ExecuteOptions{10pt}
\ProcessOptions*
\normalsize
\endinput  

The package sets the sizes for the standard size commands. Additionally:

  • Macros \larger and \smaller are available.

  • Size command \Tiny is added to the standard commands.

  • The different font sizes are:

    • \Tiny
    • \tiny
    • \SMALL (\scriptsize)
    • \small (\footnotesize)
    • \normalsize
    • \large
    • \Large
    • \LARGE
    • \huge
    • \Huge

\sriptsize and \footnotesize are defined as \SMALL and \small. That allows an easy redefinition of the size.

Example:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[variablett]{lmodern}

\usepackage[11pt]{amssizes}

\begin{document}

\makeatletter
\newcommand*{\test}[1]{%
  \texttt{\textbackslash #1} &
  \ttfamily
  \begingroup
    \csname #1\endcsname
  \expandafter\endgroup
  \f@size pt\\
}
\renewcommand*{\arraystretch}{1.2}
\begin{tabular}{@{}ll@{}}
\texttt{\textbackslash @mainsize} & \texttt{\@mainsize}pt \\
\hline
\test{Tiny}
\test{tiny}
\test{scriptsize}
\test{footnotesize}
\test{small}
\test{normalsize}
\test{large}
\test{Large}
\test{LARGE}
\test{huge}
\test{Huge}
\end{tabular}

\end{document}

Font sizes for 11pt

share|improve this answer
    
Thanks for the help! Is there a difference between using amssizes as a package and use it as a .tex file for \input? (enclosing the document with \makeatletter, etc. of course) I'd like the option of sharing my document with others without the hassle of forcing them to install a new package; a lone .tex file which is already \input'd into the preamble would be simpler. –  Riem Sep 11 '12 at 19:02
    
\usepackage supports global and local options. The size options are important here. The 11pt can also be given as global option here. Also there is no difference in installing a .tex or .sty file. They can both put in the current directory or installed in a TDS/texmf tree (below TDS:tex/latex/). –  Heiko Oberdiek Sep 11 '12 at 19:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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