2

I am using the acmsmall to do an essay; I have a custom cls and I've re-defined all of {title, author, etc}font to be more appropriate. However, I am having trouble getting the normal font to be anything but 10pt. If I set \fontsize{26}{30}\selectfont in my document it works, but how do I get it in the cls?

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{essay}[2015/04/01 Essay]

\LoadClass{acmsmall}

% these don't appear to do anything
\renewcommand\@ptsize{2}
\renewcommand\normalfont{\fontsize{16}{18}}
\renewcommand\normalsize{16}
\renewcommand{\normalsize}{\@setfontsize\normalsize\@xpt{26\p@}}
\renewcommand{\small}{\@setfontsize\small\@ixpt{26\p@}}
\@setfontsize\normalsize\@xpt{26\p@}

% title works
\renewcommand\titlefont{\fontfamily{\sfdefault}\fontsize{16}{18}\selectfont\bfseries}
\renewcommand\paragraphfont{\fontsize{16}{18}\selectfont\itshape}

% debug
\newcommand\FontSize{{font size: \f@size~pt}}

\endinput

tex,

\documentclass{essay}
\title{Title~\FontSize}
\begin{document}
\maketitle

Normal~\FontSize.

\end{document}

gives,

Title font size: 16 pt
Normal font size: 10 pt.
4
  • Welcome! Please always post a minimal working example (MWE) to help others to help you effectively. Try \AtBeginDocument{...}. However, this is a hack and you should not really do it like this. Since I don't know where the class is to be found, it is hard to give a good answer. But do you really want 26pt for the default font size for an essay?
    – cfr
    Apr 4, 2015 at 3:06
  • \AtBeginDocument hack works for me; thanks. You don't do all your documents in 26pt? :] (I wanted to differentiate between 10pt.)
    – Neil
    Apr 4, 2015 at 23:38
  • Why are you using this class for an essay? That is, if you are not writing a paper for that journal, why are you using their class? There are more constructive exercises in frustration to be had than fighting a class which is designed to disallow just the kind of changes you want to make.
    – cfr
    Apr 4, 2015 at 23:42
  • It's just so pretty.
    – Neil
    Apr 4, 2015 at 23:44

1 Answer 1

3

This is not a bug but a feature.

Publishers' styles, unlike generic article etc , usually do not allow the users to change body fonts. All papers in the given journal must have matching look. I usually add to my classes commissioned by publishers some warnings when the class sees an attempt to invoke options like 12pt: "please do not do this".

Full disclosure: I did not write acmsmall, but I patched it for ACM.

For a derived class you need to redefine \normalsize, \small etc. Look how it is done in base class and change accordingly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .