

We can activate this form using \textsc command. Another option we can create is the small capitals form, which uses small forms of capital letters instead of lowercase letters. Basically, it is a non-cursive slanted font, and we can use \textsl command to create it. We also have a slanted option, which has the similar slant to the right as an italic font, but it keeps the same lettering as the normal font family. We can create this font shape using \textit command. The most used shape option is italic, which is a cursive font that is normally slanted slightly to the right. There are four different shape options we can use in LaTeX.

Monospaced Font Family Changing Font Shape The same result can be achieved with switches by using the next piece of code. Instead of commands, we can also use text switches: \rmfamily, \sffamily and \ttfamily for serif, sans serif and monospaced font families, respectively. In the following piece of code, we demonstrated the effects of the commands. In a similar fashion to the default font family commands, \textrm is for serif font family, \textsf is for sans serif font family, and \texttt is for monospaced for family. If we need to use a certain font family only for a part of our document, we can write it in a text command. For instance, we can change the default font family for the whole document by using the command below with \rmdefault for serif font family, \sfdefault for sans serif font family and \ttdefault for monospaced font family. In LaTeX, serif font families are shortened as rm (for roman font), sans serif font families are shortened as sf, and monospaced font families are shortened as tt (for teletype font family).

Courier and Consolas are examples of monospaced fonts.
#Latex marginnote set font code
They are mostly used for source code listings, or well-aligned contents. Lastly, a monospaced font use the same fixed-width for each of their characters. Famous examples of sans serif fonts are Helvetica, Futura, etc. A sans serif font doesn’t have any serif in its characters. A serif is a small line or taper regularly added to the end of a character’s stem, like we see in fonts such as Times New Roman, Garamond, etc. This font comes with three different font families: serif, which is the default setting, sans serif, and monospaced. In this article, we will walk through the commands that changes the style of fonts in LaTeX. We can change the look of this font by changing its font family, font weight or font shape. The standard font we are seeing on LaTeX documents is called Computer Modern.
