TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
    
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 Mar 2 '12 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 – Frank Mittelbach Mar 2 '12 at 18:20
    
@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 Mar 2 '12 at 18:29
    
@Werner some of those modifications might be unfortunate though:-) \def\CalculateSin#1{{% \expandafter\ifx\csname sin(\number#1)\endcsname\relax \dimen@=#1\p@\TG@@sin rotations will all be off for example... – David Carlisle Mar 2 '12 at 18:46
    
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 Mar 2 '12 at 18:49
up vote 8 down vote accepted

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.

share|improve this answer
    
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. – user1129682 Jun 7 at 14:46
    
@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. – Frank Mittelbach Jun 7 at 21:07
    
@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. – Frank Mittelbach Jun 7 at 21:13
 \@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.

share|improve this answer

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.

share|improve this answer
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. – Steven B. Segletes Sep 3 '13 at 2:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.