Fonts & Character Setsthe courier font

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
allevo
Posts: 49
Joined: Sat Apr 11, 2009 12:09 pm

the courier font

Post by allevo »

hi!!!
i wrote this:

Code: Select all

\documentclass{book}
\usepackage{courier}

\begin{document}
\fontfamily{courier}\selectfont ciao!!S

\end{document}
but the text isn't in Courier. where am i wrog?!?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

the courier font

Post by localghost »

It's caused by the wrong handling.

Code: Select all

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{courier}

\begin{document}
\texttt{ciao!!S}

\ttfamily
ciao!!S
\normalfont

\end{document}
The switches are for longer text passages.

Since the courier font is looking really ugly to me, I recommend to use the luximono font for this type face.


Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
allevo
Posts: 49
Joined: Sat Apr 11, 2009 12:09 pm

the courier font

Post by allevo »

and how can i use this font?!?! http://www.tug.dk/FontCatalogue/seriffonts.html
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Re: the courier font

Post by localghost »

You should tell us exactly which one from this long list you want to use.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
allevo
Posts: 49
Joined: Sat Apr 11, 2009 12:09 pm

the courier font

Post by allevo »

for example: Bera Sans ?!?!
are there an universal commander that i can use to wrote in a font?!?
for example

Code: Select all

\usefont{Bera Sans}text in bera sans
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

the courier font

Post by frabjous »

Try this:

Code: Select all

\usepackage[T1]{fontenc}
\usepackage[scaled]{berasans}
\renewcommand*\familydefault{\sfdefault}  
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

the courier font

Post by localghost »

Using bera gives you access to all families, series and shapes of that font. Use the well known font commands to get what you want.

Code: Select all

\textsf{Text in Bera sans}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
allevo
Posts: 49
Joined: Sat Apr 11, 2009 12:09 pm

the courier font

Post by allevo »

ops.. thank!!
but is there a universal command to use all fonts?!?! for example:

Code: Select all

\usefont{fontname} text in fontname
?!?!
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Re: the courier font

Post by localghost »

I can't see the problem. Just include this font package and you will have your text in Bera.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: the courier font

Post by frabjous »

I think allevo wants to be able to switch fonts mid-document, or only make selected text appear in that font.
Post Reply