I'd like to write a package that performs the following tasks (it's essentially reformatting the document to make it suitable for being printed 2-pages-side-by-side on a printer): - adjust the margins to make them smaller - adjust the global fontsize of the document
I know how to do the first (adjusting margins), but am stumped on how to adjust the second. What I'd like is to have the same effect as specifying
\documentclass[12pt]{article}
at the beginning of the document. But I'd like to achieve this effect by calling a package.
I've looked at the question How to change font size mid-document?, but could not make it work, by trying
\input{size12.clo}
either in the pre-amble or in the main body of the document).
I'd like accomplish all of this without wrapping my document in any extra environments, etc.
I've also tried using the \fontsize command, to no effect (you can see my attempt in the bare bones package below).
Here are the MWE. First, the main document
\documentclass{article}
\usepackage{lipsum} % For filler text
\usepackage{double-duplex} % This is the package I'd like to use to alter the size---the target of my question here.
\begin{document}
\lipsum[1-3]
\end{document}
And then the package, which I've called double-duplex.sty
\ProvidesPackage{double-duplex}
\fontsize{12pt}{12pt}\selectfont
\fontsize{sizea}{sizeb}\selectfontas quick and dirty solution – Feb 19 '14 at 16:11styfile, by loading it, the command will be applied. Another rather unsatisfactory way would be to redefine\normalsize– Feb 19 '14 at 16:33\newif\ifprinttwoside \printtwosidetrue \ifprinttwoside \documentclass{article} \else \documentclass[12pt]{article} \fi(note: default is\printtwosidefalse). If you like, you can pass the\newif\ifprinttwoside \printtwosidetrueas part of the call tolatex. – jon Feb 19 '14 at 18:19duplexwhich you can switch as required. Your class can then loadarticlewith the relevant options depending on the options you pass. – cfr Feb 20 '14 at 03:49