5

I really like the tufte-book document class, but I really don't like how tiny the fonts are on screen.

I would like to redefine the font sizes to be a bit larger. I thought that editing the following in tufte-common.def (lines 341 - 380) would do the trick, but when I rerun pdflatex... no dice.

%%
% Set the font sizes and baselines to match Tufte's books
\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xpt{14}%
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\normalbaselineskip=14pt
\normalsize
\renewcommand\small{%
   \@setfontsize\small\@ixpt{12}%
   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus2\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 4\p@ \@plus2\p@ \@minus2\p@
               \parsep 2\p@ \@plus\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}
\renewcommand\footnotesize{%
   \@setfontsize\footnotesize\@viiipt{10}%
   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus\p@
   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 3\p@ \@plus\p@ \@minus\p@
               \parsep 2\p@ \@plus\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}
\renewcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
\renewcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
\renewcommand\large{\@setfontsize\large\@xipt{15}}
\renewcommand\Large{\@setfontsize\Large\@xiipt{16}}
\renewcommand\LARGE{\@setfontsize\LARGE\@xivpt{18}}
\renewcommand\huge{\@setfontsize\huge\@xxpt{30}}
\renewcommand\Huge{\@setfontsize\Huge{24}{36}}

I tried changing @xpt{14} to 16, and so on. Is there a way to add +2 to all font sizes in the class with a few lines in a tex document? That would be preferable to editing the source of the package.

7
  • 1
    How about trying \makeatletter\setlength{\p@}{1.2pt}\makeatother. That would change (increase) the font size by 20%. You have to do this before loading the document class though. However, this won't change the \baselineskip, which seems to be hard-coded.
    – Werner
    Commented Mar 2, 2012 at 17:26
  • 1
    @Werner don't even think about doing this! This is close to suggesting \let\def\undefined because somebody doesn't like a definition :-). \p@is a kernel constant of LaTeX and used in about 50 places in the kernel alone and should not be touched Commented Mar 2, 2012 at 18:20
  • 1
    @FrankMittelbach: But it's that a good thing? That way the modifications are carried through wherever it's used. By the way, the \baselineskip should be modifiable using \renewcommand{\baselinestretch}{1.2}. See \baselineskip and \baselinestretch.
    – Werner
    Commented Mar 2, 2012 at 18:29
  • 1
    One might try \input{size14.clo}; the file is part of the extsizes bundle. However such a big size is only good for children's books, IMO. Visually impaired people could benefit from this, though.
    – egreg
    Commented Mar 2, 2012 at 18:49
  • 1
    @Werner font sizes aren't linear so multiplying everything by a fixed factor is not giving you good results. So no I don't believe that even if it would technically possible it would be the right approach. But it isn't and there is not guarantee that the constant is used everywhere either. Commented Mar 2, 2012 at 18:51

3 Answers 3

13

If the class doesn't support different font size settings then the best solution is indeed to write yourself a small package in which you place all necessary settings and overwrite what is in the class.

Historically LaTeX has a good number of abbreviations to save space (and processing time in certain cases). While they aren't really necessary any longer they are still around and used in may places. But it is aboslutely essential to tread them as constants and not try to adjust something by modifying \p@ or \@xpt -- this is likely to break horribly.

Instead replace the definitions and settings with "normal" values, e.g.,

\renewcommand\normalsize{%
   \@setfontsize\normalsize{10}{14}%
   \abovedisplayskip 10pt \@plus 2pt \@minus 5pt
   ...
}
\renewcommand\small{%
   \@setfontsize\small{10.95}{12}%
   ...
}
\renewcommand\scriptsize{\@setfontsize\scriptsize{7}{8}}
\renewcommand\tiny{\@setfontsize\tiny{5}{6}}
\renewcommand\large{\@setfontsize\large{10.95}{15}}
\renewcommand\Large{\@setfontsize\Large{12}{16}}
\renewcommand\LARGE{\@setfontsize\LARGE{14.4}{18}}
\renewcommand\huge{\@setfontsize\huge{20.74}{30}}
\renewcommand\Huge{\@setfontsize\Huge{24}{36}}

Now important to realize here is that in the above definitions the first number is the font size and the second is the used baselineskip. So you probably have to adjust both to fit (and it the fonts you use). Thus no surprise is you only changed the second but left \@xpt that the font didn't change.

Also those constants like \@xipt are not necessarily whole numbers, their definition in the LaTeX is:

 \def\@vpt{5}
 \def\@vipt{6}
 \def\@viipt{7}
 \def\@viiipt{8}
 \def\@ixpt{9}
 \def\@xpt{10}
 \def\@xipt{10.95}
 \def\@xiipt{12}
 \def\@xivpt{14.4}
 \def\@xviipt{17.28}
 \def\@xxpt{20.74}
 \def\@xxvpt{24.88}

to fit the sizes offered by Computer Modern fonts. If you use other fonts that are in continuous sizes then you can use other numbers, such as 11 or 13.

Finally, other dimensions like those that are set up as part of \normalsizeor \small may visually depend on the font sizes you use, so it does make sense to consider them all in relation to each other.

3
  • Just so I truly understand this. The constants defined in LaTeX that are used to do all the font calculations have been chosen because they look nice using Computer Modern fonts. So the reason why \HUGE is 24.88pt is simply because 24.88 looks nicer compared to 25.00, when using Computer Modern. Does this mean, that these values may be completely inadequate for different fonts? I was hoping to find some computation formula that would yield these numbers for a single font I give it as input.
    – Bananguin
    Commented Jun 7, 2016 at 14:46
  • 1
    @user1129682 the constants are there just to save space (which was necessary back then: \@xxvpt is 1 token while 24.88 are 5. However the fact that \Huge in CM fonts calls for 24.88pt font is not because it looks better but because the CM fonts where designed for different sizes and (somewhat related to the root of 2) so the display font happened to be available only in 24.88pt not in 25pt. Now with the type1 versions you can scale them up or down to other sizes, but \Huge simply selects a font at the size it was designed no more no less. Commented Jun 7, 2016 at 21:07
  • 1
    @user1129682 Now if different font families are used then the font sizes selected by \Huge etc could well be others (though roughly the default values are not too bad in most cases) but there is no way to get a single formula that given a single font computes the "right" values --- or say no more right than using the default that happen to be chosen for CM. By the end of the day the right values depend on taste and on the fonts being used and no single formula will get this right. The main point I was making is that changing the values is straight foreward, but not by changing the constants. Commented Jun 7, 2016 at 21:13
4
 \@setfontsize\normalsize\@xpt{14}%

means set the font to 10pt on a 14pt baseline (the \@xpt abbreviation just saves a bit of space and time, I think you changed that to

 \@setfontsize\normalsize\@xpt{16}%

which is 10pt font on 16pt baseline, you want

 \@setfontsize\normalsize{12}{16}%

or some such.

Beware if you use math, you need to set that up to match.

2

I used:

\makeatletter
\renewcommand\scriptsize{\@setfontsize\scriptsize{7}{8}}
\renewcommand\tiny{\@setfontsize\tiny{5}{6}}
\renewcommand\small{\@setfontsize\small{12}{14}}
\renewcommand\normalsize{\@setfontsize\normalsize{14}{18}}
\renewcommand\large{\@setfontsize\large{10.95}{15}}
\renewcommand\Large{\@setfontsize\Large{12}{16}}
\renewcommand\LARGE{\@setfontsize\LARGE{14.4}{18}}
\renewcommand\huge{\@setfontsize\huge{20.74}{30}}
\renewcommand\Huge{\@setfontsize\Huge{24}{36}}
\makeatother

for example.

1
  • 1
    Welcome to the site. To get your code to display as code and not text, it needs to be indented by four spaces. You can do that manually, or highlight the text while editing, and click the {} button. Commented Sep 3, 2013 at 2:06

You must log in to answer this question.

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