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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply