{"id":106,"date":"2020-11-11T03:18:55","date_gmt":"2020-11-11T03:18:55","guid":{"rendered":"https:\/\/nitens.org\/w\/?page_id=106"},"modified":"2021-04-03T22:48:20","modified_gmt":"2021-04-03T22:48:20","slug":"latex","status":"publish","type":"page","link":"https:\/\/nitens.org\/w\/latex\/","title":{"rendered":"The Beauty of\u00a0LaTeX"},"content":{"rendered":"<h2>The Beauty of&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span><\/h2>\n<div class=\"floatl\">\n<h5>Latest update<\/h5>\n<p><span class=\"notes\">February 2015:<\/span>&nbsp;Featured in&nbsp;<a class=\"ext\" href=\"https:\/\/web.archive.org\/web\/20200128180550\/http:\/\/hackermonthly.com\/issue-57.html\">Hacker Monthly<\/a>.<\/p>\n<\/div>\n<p>There are several reasons why one should prefer <span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;to a&nbsp;<acronym title=\"What You See Is What You Get\">WYSIWYG<\/acronym>&nbsp;word processor like Microsoft Word:&nbsp;<em>portability, lightness, security<\/em>&nbsp;are just a few of them (not to mention that&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;is&nbsp;<em>free<\/em>). There is still a further reason that definitely convinced me to&nbsp;<a class=\"\" href=\"https:\/\/nitens.org\/w\/tools\/\">abandon MS Word<\/a>&nbsp;when I wrote my dissertation: you will never be able to produce&nbsp;<em>professionally typeset<\/em>&nbsp;and&nbsp;<em>well-structured<\/em>&nbsp;documents using most&nbsp;<acronym title=\"What You See Is What You Get\">WYSIWYG<\/acronym>&nbsp;word processors.&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;is a free typesetting system that allows you to focus on&nbsp;<em>content<\/em>&nbsp;without bothering about the layout: the software takes care of the actual typesetting, structuring and page formatting, producing documents of astonishing elegance. The&nbsp;<a class=\"\" href=\"https:\/\/nitens.org\/w\/tools\/\">software<\/a>&nbsp;I use to write in&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;on a Mac compiles documents in&nbsp;PDF&nbsp;format (but exporting to other formats such as&nbsp;RTF&nbsp;or&nbsp;HTML&nbsp;is also possible). It supports&nbsp;<a class=\"ext\" href=\"http:\/\/en.wikipedia.org\/wiki\/Unicode\">unicode<\/a>&nbsp;and all the&nbsp;<a class=\"\" href=\"https:\/\/nitens.org\/w\/texopentype\/\">advanced typographic features<\/a>&nbsp;of&nbsp;<a class=\"ext\" href=\"http:\/\/en.wikipedia.org\/wiki\/OpenType\">OpenType<\/a>&nbsp;and&nbsp;<a class=\"ext\" href=\"http:\/\/en.wikipedia.org\/wiki\/Apple_Advanced_Typography\">AAT<\/a>&nbsp;fonts, like&nbsp;<em>Adobe Garamond Pro<\/em>&nbsp;and&nbsp;<em>Hoefler Text<\/em>. It allows fine-tuned control on a number of typesetting options, although just using the default configuration results in documents with high typographic quality. In what follows I review some examples, comparing how fonts are rendered in MS Word and in&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>.<\/p>\n<div class=\"floatr\">\n<h5>See also<\/h5>\n<\/div>\n<div>\n<p><a class=\"\" href=\"http:\/\/nitens.org\/w\/cvtex\"><img loading=\"lazy\" decoding=\"async\" class=\"left_border alignleft\" title=\"Typesetting an academic CV in LaTeX\" src=\"http:\/\/nitens.org\/img\/mini\/cvtex.jpg\" alt=\"[latex]\" width=\"58\" height=\"58\"><\/a><a class=\"\" href=\"https:\/\/nitens.org\/w\/cvtex\/\">Typesetting an academic CV in <span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span><\/a><br \/>\nTemplates to compile an academic curriculum vitae or resume using&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;and expert fonts.<\/p>\n<p><a class=\"\" href=\"http:\/\/nitens.org\/w\/TeXOpenType\"><img loading=\"lazy\" decoding=\"async\" class=\"left_border alignleft\" title=\"Accessing OpenType font features in LaTeX\" src=\"http:\/\/nitens.org\/img\/mini\/opentype.jpg\" alt=\"[latex]\" width=\"58\" height=\"58\"><\/a><a class=\"\" href=\"https:\/\/nitens.org\/w\/texopentype\/\">Accessing OpenType font features in <span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span><\/a><br \/>\nHow to access advanced OpenType font features in&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;via the&nbsp;<tt>fontspec<\/tt>&nbsp;package.<\/p>\n<p><a class=\"\" href=\"http:\/\/nitens.org\/w\/tools\"><img loading=\"lazy\" decoding=\"async\" class=\"left_border alignleft\" title=\"LaTeX on Mac OS\" src=\"http:\/\/nitens.org\/img\/mini\/tools.jpg\" alt=\"[latex tools]\" width=\"57\" height=\"57\"><\/a><a class=\"\" href=\"https:\/\/nitens.org\/w\/tools\/\"><span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X <\/span>on Mac OS<\/a><br \/>\nA review of open source software, tools and fonts to use&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;and&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;on Mac OS.<\/p>\n<p><a class=\"\" href=\"http:\/\/nitens.org\/w\/texlogo\"><img loading=\"lazy\" decoding=\"async\" class=\"left_border alignleft\" title=\"Pure CSS TeX logo\" src=\"http:\/\/nitens.org\/img\/mini\/tools.jpg\" alt=\"[latex css logos]\" width=\"58\" height=\"58\"><\/a><a class=\"\" href=\"..\/texlogo\">Pure CSS <span class=\"latex\">T<sub>E<\/sub>X <\/span>logos<\/a><br \/>\nA simple hack to generate&nbsp;<span class=\"latex\">T<sub>E<\/sub>X<\/span>,&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;and&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;logos in plain C<\/p>\n<\/div>\n<h5>Contents<\/h5>\n<ol type=\"1\">\n<li><a class=\"\" href=\"#kerning\">Kerning<\/a><\/li>\n<li><a class=\"\" href=\"#smallcaps\">Real Small Caps &amp; Titling Caps<\/a><\/li>\n<li><a class=\"\" href=\"#ligatures\">Common ligatures<\/a><\/li>\n<li><a class=\"\" href=\"#rare\">Rare and ancient ligatures<\/a><\/li>\n<li><a class=\"\" href=\"#glyph\">Glyph variants<\/a><\/li>\n<li><a class=\"\" href=\"#alpha\">Transparency<\/a><\/li>\n<li><a class=\"\" href=\"#justification\">Line breaks, justification and hyphenation<\/a><\/li>\n<li><a class=\"\" href=\"#fonts\">Getting expert fonts<\/a><\/li>\n<li><a class=\"\" href=\"#links\">Links<\/a><\/li>\n<li><a class=\"\" href=\"#thanks\">Acknowledgments<\/a><\/li>\n<li><a class=\"\" href=\"#notes\">Technical notes<\/a><\/li>\n<\/ol>\n<h4>1. Kerning<\/h4>\n<p>Kerning is the process of selectively adjusting the spacing between letters pairs to improve the overall appearance of text. Examples of letter pairs that need kerning treatment are AV, AY, PA, and AT. These letter pairs often look awkward together, and need to either be moved closer together, or further apart manually. Professional typesetting systems and fonts allow fine-grained adjustments for such letter pairs. Popular word processors either lack support for kerning tables or&nbsp;<em>disable<\/em>&nbsp;kerning by default (this is the case with both Microsoft Word for Mac OS v.X and 2008)&nbsp;<span class=\"notes\">[Thanks to Mark Dancer and Nicholas Shera for pointing this out]<\/span>.<\/p>\n<h5>MS Word (wrong default kerning for the &#8220;Ta&#8221; letter pair):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Kerning error in MS Word\" src=\"http:\/\/nitens.org\/img\/latex\/kerning_word.jpg\" alt=\"[example of inappropriate kerning in MS Word]\" width=\"122\" height=\"53\"><br \/>\n<span class=\"notes\">[Adobe Garamond Pro, 48pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_kern_w.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_kern_w.doc\">doc<\/a><\/kbd><\/p>\n<h5><span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;(correct kerning for the &#8220;Ta&#8221; letter pair):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Correct kerning in LaTeX\" src=\"http:\/\/nitens.org\/img\/latex\/kerning_latex.jpg\" alt=\"[example of correct kerning in LaTeX]\" width=\"123\" height=\"54\"><br \/>\n<span class=\"notes\">[Adobe Garamond Pro, 48pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_kern.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_kern.tex\">tex<\/a><\/kbd><\/p>\n<hr>\n<p><a name=\"smallcaps\"><\/a><\/p>\n<h4>2. Real small caps and titling caps<\/h4>\n<p>Most word processors create&nbsp;<em>fake<\/em>&nbsp;small capitals by adjusting the size of capitals. Professional fonts contain different sets of glyphs for small capitals and full-size capitals that any serious typesetting system should be able to use in the appropriate context. In particular,&nbsp;<em>real small capitals<\/em>&nbsp;are more than resized versions of uppercase capitals: they have a relatively heavier stroke and are designed to be visually compatible with lowercase characters of the same typeface. Some OpenType fonts have special \u201ctitling\u201d alternates that are designed for all-uppercase type set at large sizes and have a lighter stroke.<\/p>\n<h5>MS Word (fake small caps):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Fake small caps in MS Word\" src=\"http:\/\/nitens.org\/img\/latex\/sc_word.jpg\" alt=\"[example of fake small caps in MS Word]\" width=\"292\" height=\"45\"><br \/>\n<span class=\"notes\">[Adobe Garamond Pro, 48pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_sc_w.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_sc_w.doc\">doc<\/a><\/kbd><\/p>\n<h5><span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;(real small caps):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Correct use of real small caps in LaTeX\" src=\"http:\/\/nitens.org\/img\/latex\/sc_latex.jpg\" alt=\"[example of correct use of real small caps in LaTeX]\" width=\"286\" height=\"43\"><br \/>\n<span class=\"notes\">[Adobe Garamond Pro, 48pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_sc.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_sc.tex\">tex<\/a><\/kbd><\/p>\n<h5><span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;(regular vs titling caps):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Regular vs. titling caps in LaTeX\" src=\"http:\/\/nitens.org\/img\/latex\/titling_latex.png\" alt=\"[example of titling alternates in LaTeX]\" width=\"268\" height=\"170\"><br \/>\n<span class=\"notes\">[Adobe Garamond Pro, 120pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_titling.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_titling.tex\">tex<\/a><\/kbd><\/p>\n<hr>\n<p><a name=\"ligatures\"><\/a><\/p>\n<h4>3. Common ligatures<\/h4>\n<p>A good typesetting programme should always use contextual intelligence and substitution tables to determine whether&nbsp;<a class=\"interwiki\" href=\"http:\/\/en.wikipedia.org\/wiki\/Typographical_ligature\">ligatures<\/a>&nbsp;are needed. Common ligatures are essential to professionally typeset text.<\/p>\n<h5>MS Word (common ligature errors):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Common ligature errors in MS Word\" src=\"http:\/\/nitens.org\/img\/latex\/ligatures_word.jpg\" alt=\"[example of common ligatures in MS Word]\" width=\"350\" height=\"70\"><\/p>\n<div class=\"indent\"><span class=\"notes\">[Hoefler Text, 48pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ligatures_w.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ligatures_w.doc\">doc<\/a><\/kbd><\/div>\n<h5><span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;(correct use of ligatures):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Correct ligatures in LaTeX\" src=\"http:\/\/nitens.org\/img\/latex\/ligatures_latex.jpg\" alt=\"[example of common ligatures in LaTeX]\" width=\"350\" height=\"70\"><\/p>\n<div class=\"indent\"><span class=\"notes\">[Hoefler Text, 48pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ligatures.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ligatures.tex\">tex<\/a><\/kbd><\/div>\n<hr>\n<p><a name=\"rare\"><\/a><\/p>\n<h4>4. Rare and ancient ligatures<\/h4>\n<p><span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;in conjunction with professional fonts gives the possibility to exploit the whole set of rare ligatures and decorations, that are automatically added to the text.<\/p>\n<h5>MS Word (text with no ligature):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Text without ancient ligatures in MS Word\" src=\"http:\/\/nitens.org\/img\/latex\/contextual_stupidity_word.jpg\" alt=\"[text without rare ligatures in MS Word]\" width=\"385\" height=\"81\"><\/p>\n<div class=\"indent\"><span class=\"notes\">[Adobe Minion Pro, 24pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ancient2_w.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ancient2_w.doc\">doc<\/a><\/kbd><\/div>\n<h5><span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;(text with rare and old-style ligatures):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Text with rare ligatures in LaTeX\" src=\"http:\/\/nitens.org\/img\/latex\/contextual_intelligence_latex.jpg\" alt=\"[example of rare ligatures in LaTeX]\" width=\"361\" height=\"69\"><\/p>\n<div class=\"indent\"><span class=\"notes\">[Adobe Minion Pro, 24pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ancient1.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ancient1.tex\">tex<\/a><\/kbd><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Text with rare ligatures in LaTeX\" src=\"http:\/\/nitens.org\/img\/latex\/rare_ligatures.jpg\" alt=\"[example of rare ligatures in LaTeX]\" width=\"329\" height=\"151\"><\/p>\n<div class=\"indent\"><span class=\"notes\">[Hoefler Text, 24pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ancient2.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_ancient2.tex\">tex<\/a><\/kbd><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Text with rare ligatures in LaTeX\" src=\"http:\/\/nitens.org\/img\/latex\/skia.png\" alt=\"[example of rare ligatures in LaTeX]\" width=\"250\" height=\"90\"><\/p>\n<div class=\"indent\"><span class=\"notes\">[Skia, 24pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_skia.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_skia.tex\">tex<\/a><\/kbd><\/div>\n<hr>\n<p><a name=\"glyph\"><\/a><\/p>\n<h4>5. Glyph variants<\/h4>\n<p>Expert fonts often include variants or alternate shapes for alphabetic characters and numbers.&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;with the&nbsp;<a class=\"\" href=\"..\/tools\">fontspec package<\/a>&nbsp;offers the possibility to access and select variants on single characters or for a whole text block.<\/p>\n<h5><span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;(example of font variants):<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Example of font variants in LaTeX\" src=\"http:\/\/nitens.org\/img\/latex\/variants_latex.jpg\" alt=\"[example of font variants in LaTeX]\" width=\"334\" height=\"240\"><\/p>\n<div class=\"indent\"><span class=\"notes\">[Zapfino, 25pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_variants.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_variants.tex\">tex<\/a><\/kbd><\/div>\n<hr>\n<p><a name=\"alpha\"><\/a><\/p>\n<h4>6. Transparency<\/h4>\n<p>The&nbsp;<a class=\"\" href=\"..\/tools\">fonstpec package<\/a>&nbsp;allows you to set font transparency in your&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;source.<\/p>\n<h5><span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;(alpha transparency)<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Example of text rendered with alpha transparency\" src=\"http:\/\/nitens.org\/img\/latex\/alpha.jpg\" alt=\"[example of alpha transparency in LaTeX]\" width=\"300\" height=\"246\"><\/p>\n<div class=\"indent\"><span class=\"notes\">[Hoefler Text Italic, 48+pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_alpha.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_alpha.tex\">tex<\/a><\/kbd><\/div>\n<hr>\n<p><a name=\"justification\"><\/a><\/p>\n<h4>7. Line breaks, justification and hyphenation<\/h4>\n<p>Readability results not only from a good selection of typefaces, but also from a correct distribution of characters and whitespace per line. To attain this goal, most&nbsp;<acronym title=\"What You See Is What You Get\">WYSIWYG<\/acronym>&nbsp;word processors use relatively dumb justification\/hyphenation procedures (i.e. algorithms that establish the position for line breaks by processing text&nbsp;<em>line by line<\/em>).&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;uses an advanced algorithm, based on&nbsp;<a class=\"ext\" href=\"http:\/\/www3.interscience.wiley.com\/journal\/113445055\/\">seminal work<\/a>&nbsp;by Donald Knuth and Michael F. Plass and enhanced by Frank Liang in 1983 for his PhD dissertation, which considers paragraphs as `wholes\u00b4 in order to decide where to add line breaks. The algorithm uses language-specific patterns in order to decide the preferred position for hyphenation. The engine then selects line breaks so as to make paragraphs look&nbsp;<em>as good as possible<\/em>. Information that is taken into account for calculating optimal line breaks includes the number of consecutive lines ending with hyphens, word tightness on each line, the change of tightness between consecutive lines. Further development has enabled the&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;engine to allow certain characters to stick into the margin, thus generating an&nbsp;<em>optically<\/em>&nbsp;straight margin &#8211; i.e., a margin that&nbsp;<em>looks<\/em>&nbsp;straight without being geometrically so.&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&#8216;s hyphenation settings can be fine-tuned by expert users.<\/p>\n<h5>Advanced hyphenation\/justification in&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>:<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"border\" title=\"Advanced hyphenation\/justification in LaTeX\" src=\"http:\/\/nitens.org\/img\/latex\/hyphenation.jpg\" alt=\"[example of advanced hyphenation\/justification in LaTeX]\" width=\"305\" height=\"200\"><\/p>\n<div class=\"indent\"><span class=\"notes\">[Hoefler Text, 10pt]<\/span>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_hyph.pdf\">pdf<\/a><\/kbd>&nbsp;<kbd class=\"keys\"><a class=\"\" href=\"http:\/\/nitens.org\/img\/latex\/docs\/beauty_of_latex_hyph.tex\">tex<\/a><\/kbd><\/div>\n<ul>\n<li>For visual examples of the differences between paragraph and line-by-line based justification algorithms, see this&nbsp;<a class=\"ext\" href=\"http:\/\/web.archive.org\/web\/20070203140340\/http:\/\/www.nat.vu.nl\/~sneep\/ars\/type\/\">analysis<\/a>&nbsp;by&nbsp;<strong>Maarten Sneep<\/strong>.<\/li>\n<li>For a browser-based implementation of the Knuth-Plass hyphenation algorithm check out this&nbsp;<a class=\"ext\" href=\"http:\/\/www.bramstein.com\/projects\/typeset\/\">JavaScript library<\/a>&nbsp;by&nbsp;<strong>Bram Stein<\/strong>.<\/li>\n<\/ul>\n<hr>\n<p><a name=\"fonts\"><\/a><\/p>\n<h4>8. Getting expert fonts<\/h4>\n<p><span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;gives the&nbsp;best results&nbsp;with expert fonts such as those based on&nbsp;<a class=\"ext\" href=\"http:\/\/en.wikipedia.org\/wiki\/OpenType\">OpenType technology<\/a>&nbsp;but works with standard&nbsp;<a class=\"ext\" href=\"http:\/\/en.wikipedia.org\/wiki\/TrueType\">TrueType fonts<\/a>&nbsp;as well. Zillions of expert fonts can be purchased online from digital foundries, but Mac OS comes bundled with a number of excellent fonts with expert features (e.g.&nbsp;<span class=\"sans\">Hoefler Text, Optima, Skia, Apple Chancery, Zapfino<\/span>). More free OpenType fonts are available on the net. Check out for example the&nbsp;<a class=\"ext\" href=\"http:\/\/scripts.sil.org\/cms\/scripts\/page.php?site_id=nrsi&amp;item_id=Gentium\">Gentium<\/a>,&nbsp;<a class=\"ext\" href=\"http:\/\/scripts.sil.org\/CharisSILfont\">Charis SIL<\/a>&nbsp;and&nbsp;<a class=\"ext\" href=\"http:\/\/scripts.sil.org\/cms\/scripts\/page.php?site_id=nrsi&amp;item_id=DoulosSILfont\">Doulos SIL<\/a>&nbsp;fonts from&nbsp;<a class=\"ext\" href=\"http:\/\/scripts.sil.org\/cms\/scripts\/page.php?site_id=nrsi&amp;cat_id=FontDownloads\">SIL<\/a>,&nbsp;<a class=\"ext\" href=\"http:\/\/scholarsfonts.net\/cardofnt.html\">Cardo<\/a>&nbsp;by David J. Perry, the free fonts designed by&nbsp;<a class=\"ext\" href=\"http:\/\/www.josbuivenga.demon.nl\/\">Jos Buivenga<\/a>&nbsp;(the creator of&nbsp;<span class=\"sans\">Fontin<\/span>), this&nbsp;<a class=\"ext\" href=\"http:\/\/www.alvit.de\/blog\/article\/20-best-license-free-official-fonts\">collection<\/a>&nbsp;of professional quality fonts selected by Vitaly Friedman or the amazing&nbsp;<a class=\"ext\" href=\"http:\/\/www.fontsquirrel.com\/\">Font Squirrel<\/a>.<\/p>\n<div class=\"clear\"><\/div>\n<hr>\n<p><a name=\"links\"><\/a><\/p>\n<h4>9. Typesetting with&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>: selected links<\/h4>\n<ul>\n<li>SIL International, the&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;typesetting system&nbsp;<a class=\"ext\" href=\"http:\/\/scripts.sil.org\/cms\/scripts\/page.php?site_id=nrsi&amp;id=xetex\">\u203a\u203a<\/a><\/li>\n<li>Luc Devroye,&nbsp;<a class=\"ext\" href=\"http:\/\/cg.scs.carleton.ca\/~luc\/tex.html\">Fonts with TeX<\/a>&nbsp;&#8211; possibly the most comprehensive selection of resources on fonts in&nbsp;<span class=\"latex\">T<sub>E<\/sub>X<\/span>\/<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>.<\/li>\n<li>Andrew Roberts,&nbsp;<a class=\"ext\" href=\"http:\/\/www.andy-roberts.net\/misc\/latex\/latexvsword.html\">LaTeX vs. MS Word<\/a>.<\/li>\n<li>Allin Cottrell,&nbsp;<a class=\"ext\" href=\"http:\/\/ricardo.ecn.wfu.edu\/~cottrell\/wp.html\">Word Processors: Stupid and Inefficient<\/a>.<\/li>\n<li>Kevin O&#8217;Malley,&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>: It&#8217;s Not Just for Academia &#8211;&nbsp;<a class=\"ext\" href=\"http:\/\/www.macdevcenter.com\/lpt\/a\/4589\">part 1<\/a>&nbsp;::&nbsp;<a class=\"ext\" href=\"http:\/\/www.macdevcenter.com\/lpt\/a\/4670\">part2<\/a>.<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.tug.org\/texshowcase\/\">TeX showcase<\/a>&nbsp;&#8211; edited by Gerben Wierda, it features examples of what you can do with&nbsp;<span class=\"latex\">T<sub>E<\/sub>X<\/span>.<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.tsengbooks.com\/\">Humanities books typeset with TeX<\/a>&nbsp;&#8211; examples of professional&nbsp;<span class=\"latex\">T<sub>E<\/sub>X<\/span>&nbsp;typesetting of books in the humanities, selected by the Association of American University Presses.<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.tug.org\/fonts\/special-s.pdf\">TeX font sampler<\/a>&nbsp;&#8211; booklet illustrating and comparing how different typefaces look like in&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>.<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.tug.org\/tex-archive\/info\/fontsampler\/sampler.pdf\">LaTeX typefaces<\/a>&nbsp;&#8211; comparison of fonts available with the standard&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;distribution.<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.latex-project.org\/\">LaTeX &#8211; A document preparation system<\/a>&nbsp;&#8211; official site of the&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;project.<\/li>\n<li><a class=\"ext\" href=\"http:\/\/www.tug.org\/\">TUG.org<\/a>&nbsp;&#8211; The&nbsp;<span class=\"latex\">T<sub>E<\/sub>X<\/span>&nbsp;Users Group (TUG) was founded in 1980 for educational and scientific purposes, to provide an organization for those who have an interest in typography and font design, and are users of the&nbsp;<span class=\"latex\">T<sub>E<\/sub>X<\/span>&nbsp;typesetting system invented by&nbsp;<a class=\"ext\" href=\"http:\/\/www-cs-faculty.stanford.edu\/~knuth\/\">Donald Knuth<\/a>.<\/li>\n<\/ul>\n<hr>\n<p><a name=\"thanks\"><\/a><\/p>\n<h4>10. Acknowledgments<\/h4>\n<p>Many of the examples in this article are based on the&nbsp;<a class=\"ext\" href=\"http:\/\/www.ctan.org\/get\/macros\/xetex\/latex\/fontspec\/fontspec.pdf\">documentation<\/a>&nbsp;of the&nbsp;<tt>fontspec<\/tt>&nbsp;package by&nbsp;<em>Will Robertson<\/em>, who deserves most of the credits for making expert font features in&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;so easy to use. Thanks to all those who helped improve this article with valuable feedback:&nbsp;<em>Bastien Guerry<\/em>,&nbsp;<em>Nicholas Shera<\/em>,&nbsp;<em>Mark Dancer<\/em>,&nbsp;<em>Olaf &#8216;Rhialto&#8217; Seibert<\/em>,&nbsp;<em>David Crossland<\/em>,&nbsp;<em>Tiago Tresoldi<\/em>,&nbsp;<em>Ehud Kaplan<\/em>,&nbsp;<em>Henri Langenhoven<\/em>.<br \/>\n<a name=\"notes\"><\/a><\/p>\n<hr>\n<h4>11. Technical notes<\/h4>\n<p>These examples were created on a Mac, partly on Mac OS 10.3.9, Microsoft Word v.X and TeXShop 1.35, partly on Mac OS 10.5.3 with Word:Mac 2008 and TeXShop 2.x, the&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;engine with the&nbsp;<tt>fontspec<\/tt>&nbsp;package, and using the following fonts:&nbsp;<span class=\"sans\">Adobe Garamond Pro, Adobe Minion Pro<\/span>&nbsp;(commercial fonts),&nbsp;<span class=\"sans\">Hoefler Text, Skia, Zapfino<\/span>&nbsp;(fonts bundled with Mac OS X). This article, the PDF samples and&nbsp;<span class=\"latex\">T<sub>E<\/sub>X<\/span>&nbsp;sources are licensed under a&nbsp;<a class=\"notes\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/3.0\/\" rel=\"license\">Creative Commons Attribution-Share Alike 3.0 Unported License<\/a>. A backlink is sufficient for attribution. All materials used in this article can be obtained via&nbsp;<a class=\"ext\" href=\"http:\/\/github.com\/dartar\/The-Beauty-of-LaTeX\">GitHub<\/a>. The&nbsp;<span class=\"latex\">T<sub>E<\/sub>X<\/span>,&nbsp;<span class=\"latex\">L<sup>A<\/sup>T<sub>E<\/sub>X<\/span>&nbsp;and&nbsp;<span class=\"latex\">X<sub>\u018e<\/sub>T<sub>E<\/sub>X<\/span>&nbsp;logos on this page are rendered via a&nbsp;<a class=\"\" href=\"http:\/\/nitens.org\/taraborelli\/texlogo\">nifty XHTML and CSS hack<\/a>&nbsp;by&nbsp;<a class=\"ext\" href=\"http:\/\/edward.oconnor.cx\/2007\/08\/tex-poshlet\">Edward O&#8217;Connor<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Beauty of&nbsp;LATEX Latest update February 2015:&nbsp;Featured in&nbsp;Hacker Monthly. There are several reasons why one should prefer LATEX&nbsp;to a&nbsp;WYSIWYG&nbsp;word processor like Microsoft Word:&nbsp;portability, lightness, security&nbsp;are just a few of them (not to mention that&nbsp;LATEX&nbsp;is&nbsp;free). There is still a further reason that definitely convinced me to&nbsp;abandon MS Word&nbsp;when I wrote my dissertation: you will never be &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/nitens.org\/w\/latex\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The Beauty of\u00a0LaTeX&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nf_dc_page":"","_vp_format_video_url":"","_vp_image_focal_point":[],"footnotes":""},"class_list":["post-106","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nitens.org\/w\/wp-json\/wp\/v2\/pages\/106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nitens.org\/w\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nitens.org\/w\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nitens.org\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nitens.org\/w\/wp-json\/wp\/v2\/comments?post=106"}],"version-history":[{"count":11,"href":"https:\/\/nitens.org\/w\/wp-json\/wp\/v2\/pages\/106\/revisions"}],"predecessor-version":[{"id":237,"href":"https:\/\/nitens.org\/w\/wp-json\/wp\/v2\/pages\/106\/revisions\/237"}],"wp:attachment":[{"href":"https:\/\/nitens.org\/w\/wp-json\/wp\/v2\/media?parent=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}