How do I use different fonts in Latex documents with Miktex?

  • Thread starter gnome
  • Start date
In summary, the conversation discusses the difficulties of using different fonts in Latex documents and provides various commands and examples for loading and using different fonts. The conversation also mentions the availability of a nice selection of fonts in the standard distribution and points to resources for further information.
  • #1
gnome
1,041
1
I've been trying, unsuccessfully, to figure out how to use different fonts in Latex documents.

It seems that the standard distribution comes with a nice selection of fonts
(see "ftp://tug.ctan.org/pub/tex-archive/info/fontsampler/sampler.pdf"[/URL] ) but apparently only 10 people in the world know how to use them. Hopefully, at least one of the initiated is a PF-er.

I see that there are commands like \fontfamily{} and \selectfont. And I see in my Miktex\fonts\source directory various subdirectories with names like \ams, \tfm, \type1, \vf, and in sub-subdirectories under those there are numerous files with extensions .mf, .tfm, .pfb, .vf, which I imagine must be the fonts.

I've looked in various tutorials, like http://www.ctan.org/tex-archive/info/beginlatex/beginlatex.pdf"
and
[PLAIN]http://www.physics.umn.edu/support/doc/latex/lshort.pdf"
but I can't figure out exactly what to put into those commands, how to connect a fontname with the corresponding filename, or how the Latex concepts of fontfamily and fontshape relate to specific font designs.

In particular, I'd like to use a few characters from the Calligraphic font in the "Other Scripts Collection" near the bottom of page 2 of the ctan.org "sampler.pdf" in the first link above. How?
 
Last edited by a moderator:
Computer science news on Phys.org
  • #2
Well, this is probably not the best way to do it, but I found a command to load a font, & (amazing luck) on the first try I found the font I was looking for.

Here are commands for several fonts that were in the "small miktex" package. If you use miktex you might want to paste them into a document & see what they do.

Code:
\documentclass[12 pt]{article}

\begin{document}

rsfs10 (apparently this one has caps only):

\font\testA = rsfs10
\testA ABCDEabcde

\normalfont bigger:

\font\testb = rsfs10  scaled \magstep 1
\testb  ABCDEabcde

\normalfont still bigger:

\font\testc = rsfs10  scaled \magstep 2
\testc ABCDEFGHIJKLMNOPQRSTUVWXYZ

\normalfont cmr10:

\font\testl = cmr10 scaled \magstep 1
\testl ABCDEFGHIJKL abcdefghijkl

\normalfont cmmi10:

\font\testd = cmmi10 scaled \magstep 1
\testd ABCDEFGHIJKL abcdefghijkl

\normalfont
cmbx10:

\font\testn = cmbx10 scaled \magstep 1
\testn testing one two

\normalfont xbmc10 (this one is interesting):

\font\teste = xbmc10   scaled \magstep 1
\teste ZYXWVUTSRQPONMLKJ

\testn testing one two \teste owt eno gnitset

\normalfont

back to normalfont

\font\testf = pcrr7tn % scaled \magstep 2
\testf pcrr7tn PCRR7TN

\font\testg = pcrr8tn % scaled \magstep 2
\testg pcrr8tn PCRR8TN

\font\testh = zplmr7t % scaled \magstep 2
\testh zplmr7t

\font\testi = aett10 % scaled \magstep 2
\testi aett10 AETT10

\font\testj = aessi10 % scaled \magstep 2
\testj aessi10 AESSI10

% \font\testk = bchr8t % scaled \magstep 2 
 bchr8t BCHR8T wanted to install public domain adobe fonts

%\font\testk = putrc8t % scaled \magstep 2
putrc8t wanted to install miktex/tm/packages

\font\testk = putr8c % scaled \magstep 2
\testk putr8c

\normalfont
above was printed by "putr8c"\font\testz = cmbsy7  scaled \magstep 1
\testz cmbsy7 TLSR

\normalfont
above was printed by "cmbsy7"

\font\testm = aesl10 % scaled \magstep 1
\testm aesl10

\end{document}
 
Last edited:
  • #3



To use different fonts in Latex documents with Miktex, you will first need to make sure that the fonts you want to use are installed in your Miktex distribution. This can usually be done by opening the Miktex Console and searching for the font packages you want to use. Once they are installed, you can use the font commands in your document to change the font.

For example, to use the Calligraphic font from the "Other Scripts Collection", you can use the command \usepackage{calrsfs} in your preamble. Then, to use the font, you can use the command \mathcal{ABC} in math mode, or \mathscr{ABC} for a more cursive version. You can also use the command \mathfrak{ABC} for a Fraktur version.

If you want to use a font for your entire document, you can use the command \fontfamily{fontname}\selectfont in your preamble, where "fontname" is the name of the font you want to use. You can find the names of the fonts in your Miktex distribution by browsing through the fonts directory.

It's important to note that not all fonts are available in Latex. If you can't find a specific font you want to use, you may need to use a package like fontspec or unicode-math to access system fonts or use a different font format like TrueType or OpenType.

I hope this helps you in using different fonts in your Latex documents with Miktex. If you need more help, I would recommend consulting the Miktex documentation or asking for assistance on a Latex forum or community.
 

FAQ: How do I use different fonts in Latex documents with Miktex?

What is Miktex?

Miktex is a typesetting system used for creating documents, particularly in the fields of mathematics, science, and engineering. It is a popular alternative to other typesetting systems such as LaTeX or TeX.

How do I change the font in Miktex?

To change the font in Miktex, you can use the \fontfamily command followed by the desired font name. For example, to change the font to Arial, you would type \fontfamily{arial} in your document. You can also use the \usepackage command to load a specific font package.

What are the available fonts in Miktex?

Miktex has a wide range of fonts available for use, including popular options such as Times New Roman, Arial, and Helvetica. You can also find specialized fonts for specific purposes, such as mathematical symbols or languages other than English.

Can I customize the font size in Miktex?

Yes, you can customize the font size in Miktex by using the \fontsize and \selectfont commands. The first command allows you to specify the desired font size, while the second command applies the selected font size to the rest of the document.

How do I change the font style in Miktex?

To change the font style in Miktex, you can use the \textbf, \textit, and \underline commands to make the text bold, italic, or underlined, respectively. There are also other commands available for changing the font style, such as \textsc for small caps and \texttt for typewriter font.

Similar threads

Replies
1
Views
3K
Replies
3
Views
451
Replies
4
Views
3K
Replies
5
Views
9K
Replies
3
Views
875
Replies
4
Views
4K
Replies
1
Views
2K
Replies
15
Views
25K
Back
Top