## LaTeX forum ⇒ Text Formatting ⇒ Problems with a text format command

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

### Problems with a text format command

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/25249/how-do-i-use-a-particular-font-for-a-small-section-of-text-in-my-document

The solution of my problem is the creation of a macro with this line of code:
`\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.

Tags: