I don't really know much about hacking together a class file, but as I have mentioned elsewhere on the forum, I am trying to do one for SAE. My current class file only supports a 10pt font size as the \normalsize. Using the various fontsize commands (from \tiny to \Huge), I can hit 5, 7, 8, 9, 10, 12, 14.4, 17.28, 20.74, and 24.88.
Ideally, I would like my \normalsize font to be 9pt (this is the body fontsize for SAE papers), but I need 7, 8, 9, 10, 11, 12, and 15pt fonts.
My question is, how do I achieve this? I have looked at many pages on the forums about custom font scaling and I'm a little confused.
The LaTeX manual doesn't say much on this: http://svn.gna.org/viewcvs/checkout/latexrefman/trunk/latex2e.html#Font-sizes
I was thinking about following basically the amsart.sty template, but I'm not sure how much I have to include. Do I define specific point sizes in the following way for each size:?
\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{\@nx\@setfontsize\@nx#1%
\@xp\ifcase\@xp\@currsizeindex\@typesizes
\else{99}{99}\fi}%
\@tempa
}
\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}}%
\normalsize \linespacing=\baselineskip
}
Before I start delving too deep into an area I know nothing about, I was hoping to get some guidance from somebody with a little more experience in this area... I really want to be able to have the class default to the following sizes:
- footnotesize = 7pt
- small = 8pt
- normalsize = 9pt
- large = 10pt
- Large = 11pt
- LARGE = 12pt
- huge = 15pt
If you look closely at my class file, it is based on the article class and has the following in it:
\LoadClass[twocolumn]{article}
\ExecuteOptions{times,letter,10pt}
\ProcessOptions
However, changing the 10pt in \ExecuteOptions does nothing in my document...
Here is an MWE that prints out my current font sizes with my current (somewhat crappy) class file (class file is downloadable below):
\documentclass[letterpaper]{saeRyan}
\makeatletter
\newcommand\thefontsize[1]{{#1 The current font size is: \f@size pt\par}}
\makeatother
\begin{document}
\thefontsize\tiny
\thefontsize\scriptsize
\thefontsize\footnotesize
\thefontsize\small
\thefontsize\normalsize
\thefontsize\large
\thefontsize\Large
\thefontsize\LARGE
\thefontsize\huge
\thefontsize\Huge
\end{document}
The class file in its current state can be found here: https://drive.google.com/file/d/0B6FxKnpluKC4NjU1TzNuZTFEWEE/view?usp=sharing