Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

changing default font family

202 views
Skip to first unread message

Mike Ricos

unread,
Jun 18, 2000, 3:00:00 AM6/18/00
to
Greetings. I have combed through many online tex/latex manuals and can
not come up with the answer to a seemingly simple question: How does
one globally set the font definition? That is, I would like for all
text, including math, sections, footnotes, etc, to be based on
ComputerModernSansSerif, not CMRoman. (I am using MikTex which is
LaTeX2e compatible.)

The following latex source illustrates the problem. Thanks, I hope to
start answering other peoples questions before long.

Mike

% Begin sample latex file that illustrates SansSerif question
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\begin{document}

%
% Following line elects Sans Serif font,
% same as: \fontfamily{cmss}\selectfont
%%%%%%%%%%%%%%%%%%%%
\sffamily

\section{This text will NOT appear in sans serif} % Section title

This text will appear in sans serif font.

\end{document}

% End sample latex file that illustrates SansSerif question.
%%%%%%%%%%%%%%%%%%%%%%%%%%%

Ralf Stubner

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
Mike Ricos <mri...@megsinet.net> writes:

> Greetings. I have combed through many online tex/latex manuals and can
> not come up with the answer to a seemingly simple question: How does
> one globally set the font definition? That is, I would like for all
> text, including math, sections, footnotes, etc, to be based on
> ComputerModernSansSerif, not CMRoman. (I am using MikTex which is
> LaTeX2e compatible.)

[...]

You could try \renewcommand{\familydefault}{\sfdefault} but IIRC this
won't give you sans serif math. Also, IMO CMSS is not the right font to
use as standard font, so I would simply say

\usepackage{cmbright}

which uses the Computer Modern bright fonts, a sans serif font which
includes fonts needed for math and is more suitable for longer texts.

cheerio
ralf

Donald Arseneau

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
Mike Ricos <mri...@megsinet.net> writes:

> one globally set the font definition? That is, I would like for all
> text, including math, sections, footnotes, etc, to be based on

^^^^^^^^
So you really don't want the *same font* everywhere.

> ComputerModernSansSerif, not CMRoman.
> The following latex source

In LaTeX, to prevent font chnages, select your font and then

\renewcommand\selectfont{}

This *can* have unintended consequences (like preventing changes
in line spacing).

But, more reasonably, to get sans-serif as the main document font,
while still allowing roman when explicitly requested:

\renewcommand\familydefault{\sfdefault}

But to get sans-serif instead of roman, always:

\renewcommand\rmdefault{\sfdefault}

Read the fntguide that comes with LaTeX.

Math is harder because TeX uses *sets* of fonts, selecting
separate fonts for each character. It is easiest to just select
\mathsf every time:

\usepackage{oldlfont}% allow \sf syntax in math
\everymath{\sf}

Hmmm.... This sounds kinda FAQish too.

Donald Arseneau as...@triumf.ca

Mike Ricos

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
Ralf,

Thanks a lot for the response. While I like CMRoman for thesis and
technical papers, I don't care for it for books but the CMSS is not an
atractive sans serif font.

I checked out www.math.unm.edu/texdoc/fonts/cmbright/ and it answered
fundamental questions about how tex/latex deals with fonts and how
novices can install and use them.

Again, thanks, this is exactly what I was looking for.

Mike

Ralf Stubner wrote:
>
> Mike Ricos <mri...@megsinet.net> writes:
>
> > Greetings. I have combed through many online tex/latex manuals and can
> > not come up with the answer to a seemingly simple question: How does

> > one globally set the font definition? That is, I would like for all
> > text, including math, sections, footnotes, etc, to be based on

0 new messages