3.4 Fonts: families, sizes and weights

In non-technical terms, there are three font families: serif, sans-serif and monospace (typewriter). The serif typeface has a small stroke/flourish to mark the end points of a larger stroke. The Times New Roman font is an easily identifiable serif font. The sans-serif font family has a clean endpoint (no extra flourishes). Both serif and non-serif fonts are scalable, they can be stretched infinitesimally to enable justification of the word/line. A monospace font, as in a typewriter, is a fixed size font. Please observe in the Figure 3.4 below that the scalable serif and sans serif fonts produce fully justified text, the monospaced font cannot stretch the inter-letter spaces and therefore produces ragged right edges. Here is the code which produces the visual card in Figure 3.4.

1. \documentclass[12pt]{article}
2. \usepackage[margin=1in]{geometry}
3. \usepackage{lipsum}
4. \pagestyle{empty}
5. \begin{document}
6. \rmfamily % normal/roman font selected
7. \section{This section in serif/normal roman font}
8. \lipsum[1]\\[3pt]
9. \sffamily %sans serif font ffamily selected
10. \section{This section in sans serif font}
11. \lipsum[1]\\[3pt]
12. \ttfamily % Monospace (fixed width) font family selected
13. \section{This section in mono-space/typewriter roman font}
14. \lipsum[1]
15. \end{document}

Figure 3.4: Main font families

A comprehensive listing of Serif fonts can be found here, of Sans serif fonts here and monospace fonts here.

3.41 Bold, italic and mixed font text
A word/part of a sentence or part of the document can be emphasized, so as to make it stand out from the rest by changing the font style and weight for that text segment. Text segments can be marked in bold, italics, underlined, bold-italics, or any combination for empahsis.

The specific commands are compiled here in Figure 3.41

1. \documentclass[12pt]{article}
2. \usepackage{soul, listings}
3. \pagestyle{empty}
4. \usepackage[margin=1in]{geometry}
5. \begin{document}
6. \begin{table}[h]
7. \begin{tabular}{p{1.5in} p{1.7in} p{3.5in}}
8. \textbf{To get this effect} & \textbf{Use command} & \textbf{Output} \\[10pt]
9. \hline\\
10. Normal/roman& \lstinline +\textrm{}+ & The James Webb Space Telescope may have detected one of the first stars to have ever existed in the universe. \\
11. Bold& \lstinline +\textbf{}+ & \textbf{NASA’s James Webb Space Telescope has followed up on observations by the Hubble Space Telescope of the farthest star ever detected in the very distant universe, within the first billion years after the big bang.} \\
12. Italics& \lstinline +\textit{}+ & \textit{A new image of the galaxy cluster known as “El Gordo” is revealing distant and dusty objects never seen before, and providing a bounty of fresh science. } \\
13. Bold-italic& \lstinline +\textbf{\textit{}}+ & \textbf{\textit{NASA’s James Webb Space Telescope has captured the “antics” of a pair of actively forming young stars, known as Herbig-Haro 46/47, in high-resolution near-infrared light.}}\\
14. Underline& \lstinline +\underline{}+ & \ul{New measurements by NASA’s James Webb Space Telescope’s MIRI (Mid-Infrared Instrument) have detected water vapor in the system’s inner disk, atdistances of less than 100 million miles (160 million kilometers) from the star } \\
15. Bold-underline& \lstinline +\underline{\textbf{}}+ & \textbf{\ul{Astronomers using NASA’s James Webb Space Telescope have discovered a thread-like arrangement of 10 galaxies that existed just 830 million years after the big bang. The 3 million light-year-long structure is anchored by a luminous quasar}} \\
16. Italics-underline& \lstinline +\underline{\textit{}}+ & \textit{\ul{Researchers using NASA’s James Webb Space Telescope have made major strides in confirming the source of dust in early galaxies.}} \\
18. \end{tabular}
19. \end{table}
20. \end{document}
Source: NASA James Webb Telescope News Archives. Used for non-commercial purposes. For detailed Copyright statement, see Chapter 5

Figure 3.41: Font styles and weights