% Anecdote Class % % Maintained by: % Gambhiro Bhikkhu % % LPPL LaTeX Pubic Project Licence % % ============== % Identification % ============== \NeedsTeXFormat{LaTeX2e} \ProvidesClass{anecdote}[2013/08/19 v0.5 A document class with a contemporary style.] % ======================== % Preliminary Declarations % ======================== % ======= % Options % ======= \RequirePackage{pgfopts} \RequirePackage{calc} \pgfkeys{ /ARU/.cd, pagePreset/.default=largepage,% "largepage": 6x9in, "smallpage": 5.25x8in pagePreset/.store in=\ARU@pagePreset, babelLanguage/.default=british, babelLanguage/.store in=\ARU@babelLanguage, } % Pass all unknown options to memoir \DeclareOption*{% \PassOptionsToClass{\CurrentOption}{memoir} } \ProcessPgfOptions{/ARU} \ProcessOptions\relax % ====================== % All Other Declarations % ====================== \LoadClass[11pt,twoside]{memoir} \RequirePackage{book-core-first} % === Page geometry and layout === % Symbols used: % P = page proportion (h/w) % T = textblock proportion (d/m) % w = paper width % h = paper height % m = text width % d = text height \ifthenelse{\equal{\ARU@pagePreset}{largepage}}{ % Large page size % % 6in x 9in page % P = 1.5 (fifth) % T = 1.732 (sqrt(3)), Hexagon % For 11pt / 16pt font size, Gentium font, 5pt parskip, no parindent. % TODO: elaborate on reasonale % === normalsize === \renewcommand{\normalsize}{% \@setfontsize\normalsize{11}{16} \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ \abovedisplayshortskip \z@ \@plus3\p@ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ \belowdisplayskip \abovedisplayskip \color{textbody} \let\@listi\@listI} \normalsize % === indentations === \setlength{\vgap}{1.5em} \setlength{\vindent}{\vgap} \setlength{\vleftmargin}{2em} \setlength{\parskip}{5pt} \setlength{\parindent}{0pt} % === setup page layout === \setstocksize{9in}{6in} \settrimmedsize{\stockheight}{\stockwidth}{*} \settrims{0pt}{0pt} % It won't be exactly 33 lines because of the parskip, % but close enough for our purpose. \settypeblocksize{32\baselineskip + \topskip}{*}{0.577}% 1/1.732 (sqrt(3)), Hexagon \setlrmargins{*}{*}{1.125}% 1/0.889 major 2nd, 25.6mm | 22.77mm \setulmargins{*}{*}{1.701}% Tall Pentagon, 17.9mm | 30.52mm \setlength{\footskip}{3\baselineskip} \checkandfixthelayout }{ \ifthenelse{\equal{\ANEC@pagePreset}{smallpage}}{ % Small page size % % 5.25in x 8in page % P = 1.523 (~Pentagon (1.539), b/w fifth (1.5) and minor 6th (1.6)) % T = 1.618 (Golden Section, ~minor 6th (1.6)) % For 11pt / 16pt font size, 27 lines, Gentium font, no parskip, 17pt parindent. % Small book binding swallows more space in the center, hence the 0.889 L-R margin ratio, instead of the 1.125 of the larger page size. % === normalsize === \renewcommand{\normalsize}{% \@setfontsize\normalsize{11}{16} \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ \abovedisplayshortskip \z@ \@plus3\p@ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ \belowdisplayskip \abovedisplayskip \color{textbody} \let\@listi\@listI} \normalsize % === indentations === \setlength{\vgap}{1.5em} \setlength{\vindent}{\vgap} \setlength{\vleftmargin}{2em} % === setup page layout === \setlength{\parskip}{0pt} \setlength{\parindent}{17pt} \setstocksize{8in}{5.25in} \settrimmedsize{\stockheight}{\stockwidth}{*} \settrims{0pt}{0pt} \settypeblocksize{27\baselineskip + \topskip}{*}{0.618}% 1/1.618 Golden section %\setlrmargins{*}{*}{0.889}% major 2nd 15:16, gives: 19.24mm | 17.1mm % FIXED: inner margin too close to the spine. Increased it a bit. \setlrmargins{*}{*}{0.63}% gives: 22.30mm | 14.04mm \setulmargins{*}{*}{1.701}% Tall Pentagon \setlength{\footskip}{3\baselineskip} \checkandfixthelayout }{ % other page sizes? }} % alias the pagestyles into semantic names, "where it is used" \aliaspagestyle{normalpage}{bottomcorner} \RequirePackage{book-core-last}