Text FormattingProblems with a text format command

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
AMpeLIos88
Posts: 5
Joined: Sun Nov 27, 2016 2:59 pm

Problems with a text format command

Post by AMpeLIos88 »

I am nex to LaTeX and I am feeling my way through the code. I came across the problem of changing the font in certain areas of my document. I found the solution online:
http://tex.stackexchange.com/questions/ ... y-document

The solution of my problem is the creation of a macro with this line of code:

Code: Select all

\newcommand*{\myfont}{\fontfamily{<familyname>}\selectfont}
The problem I have is how to write the code exactly.

Suppose I want to use the fontfamily: Serif Fonts and the font: Garamond Expert with Math Design, then how is the code supposed to look like?

I would appreciate it if you could help me out.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply