LaTeX – Fonts with Ligatures

Spent some time yesterday playing with LaTeX again, and to be more specific – with fonts in LaTeX. I created a resume template by applying XeLaTeX type setting. The latter allows me easily to load system fonts (both OTF and TTF) in .TEX files.

It is very similiar to CSS – XeLaTeX allows you to load system fonts simply by calling font’s name in your commands. Have a look at the following example: I declared a new command HoeflerFont which uses one of my system fonts by its name: Hoefler Text


\newcommand{\HoeflerFont}[1]{\fontspec[Alternate=1,Ligatures={TeX,Common,NoCommon, Rare}]{Hoefler Text}\selectfont #1}

I used several different fonts for my resume with ligatures enabled. Ligatures are curly little letter tails that make text style look somewhat medieval. From Wikipedia:

In writing and typography, a ligature occurs where two or more graphemes are joined as a single glyph. Ligatures usually replace consecutive characters sharing common components and are part of a more general class of glyphs called “contextual forms”, where the specific shape of a letter depends on context such as surrounding letters or proximity to the end of a line.

In order to enable ligatures, the font needs to support them. In other words, not all fonts have ligatures enabled. The following image is a screenshot of my resume using fonts supporting ligatures.

LateX – Style Section Title With a Color Filled Box

I was playing with LaTeX in order to create a resume template for my self. I was looking for a way to style title generated by the \section command. My goal was to generate color filled box with some text inside and some padding.

This is what I have came up with:

\\definecolor{gray}{RGB}{186,186,186}
\\section{\\fcolorbox{black}{gray}{\\color{black}%
{\\parbox{6.5in}{\\vspace{.03in}\\hspace{.03in}\\LaTe X{ is really cool}\\vspace{.03in}}}}}

Which produced the following result:

LaTex - Style section title with a colored filled box