- Changing Fonts
-
If you use any packages that change the font, those packages will change the default of the same type. For instance, using the Bookman font (which is done by using this command in the preamble: \usepackage{bookman})makes the default Roman font Bookman, but leaves the sans-serif and monospace fonts alone. Similarly, using the Helvetica font (done with this command in the preamble: \usepackage{helvet}) changes the default sas-serif font to Helvetica, but leaves the Roman and Monospace fonts alone. When changing fonts, you can do so like this, using the command and calling the particular font, or you can change all of the default fonts at once with the following commands.
Command Changes the defaults to times Times, Helvetica, Courier pslatex same as Times, but uses a specially narrowed Courier. This is preferred over Times because of the way it handles Courier. newcent New Century Schoolbook, Avant Garde, Courier palatino Palatino, Helevetica, Courier palatcm changes the Roman to Palatino only, but uses CM mathematics For more on the fonts available with a typical LaTeX installation, please see the documentation in the IMAGE Lab (page 75 in A Beginner's Guide to Typsetting with LaTeX). Also, please note that there are many more fonts available for download.
- Changing Fonts Temporarily
-
To change the font temporarily, first group the text where you want the font changed in curly braces. Then, use the commands \fontencoding, \fontfamily, and \selectfont. These commands should be used immediately inside the opening curly braces, like:
{\fontfamily{phv}\selectfont Helvetica looks like this}
and {\fontencoding{OT1}\fontfamily{ppl} Palatino looks like this}.
}The above commands would make a sentence where "Helvetica looks like this" would be in the Helvetica font (phv is the code for Helvetica) and "and" would be in the default font and "Palatino looks like this" would be in the Palatino font (denoted with the Palatino code, which is ppl). This example would be very rare, but it shows how the fonts can be changed in the most extreme circumstances.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น