Generalfonts

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
fouad
Posts: 2
Joined: Sat Aug 30, 2008 8:34 pm

fonts

Post by fouad »

hi all.
i need to know how can we change fonts in a same winshell document.
for example write the first paragraph with a " times new roman" font, the second with "arial", the third with " courier new".
plz reply as soon as possible.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

fonts

Post by Stefan Kottwitz »

Hi fouad,

welcome to the board!
fouad wrote: for example write the first paragraph with a " times new roman" font, the second with "arial", the third with " courier new"
those are truetype fonts. I guess you've quoted them because you've meant a serif font, a sans-serif font and a monospaced font. The standard font used by LaTeX is Computer Modern, some commands to change the font typeface are
  • \rmfamily - switch to Roman (serif)
  • \sffamily - switch to Sans Serif
  • \ttfamily - switch to Typeweriter (monospaced)
Stefan
LaTeX.org admin
fouad
Posts: 2
Joined: Sat Aug 30, 2008 8:34 pm

Re: fonts

Post by fouad »

10x for answering.
i know that.
can u give me plz an example of a code.
Can i write like this in the winshell window:
/rmfamily
hi all
/ttfamily
hi everyone
/rmfamiy
hi everybody
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

fonts

Post by Stefan Kottwitz »

Hi fouad,

you could just try.
Or compile this document:

Code: Select all

\documentclass[a4paper,10pt]{article}
\begin{document}
hi all

\ttfamily
hi everyone

\sffamily
hi everybody

\rmfamily
good bye
\end{document}
Use the backslash \ instead of / at the the beginning of commands.

Stefan
LaTeX.org admin
Post Reply