%% lato.tex %% Copyright 2017 Mohamed El Morabity % % This work may be distributed and/or modified under the conditions of the LaTeX % Project Public License, either version 1.3 of this license or (at your option) % any later version. The latest version of this license is in % http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all % distributions of LaTeX version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Mohamed El Morabity % % This work consists of all files listed in manifest.txt. \documentclass{ltxdoc} \usepackage[american]{babel} \usepackage{booktabs} \usepackage[T1]{fontenc} \usepackage{hologo} \usepackage[scale=1.12808,mono]{inconsolata} \usepackage[default,type1]{lato} \usepackage{microtype} \usepackage{path} \usepackage{varioref} \usepackage[colorlinks]{hyperref} \hypersetup{% pdftitle={LaTeX support for Lato},% pdfauthor={Mohamed El Morabity}% }% \newcommand{\version}{3.0} \newcommand{\acronym}[1]{\mbox{\liningfigures{#1}}} \newcommand{\code}{\texttt} \newcommand{\command}{\texttt} \newcommand{\option}{\texttt} \newcommand{\email}[1]{\href{mailto:#1}{\nolinkurl{#1}}} \newcommand{\name}{} \newcommand{\pkg}{\texttt} \newcommand{\parameter}[1]{\textnormal{\textit{#1}}} \newcommand{\program}{} \newcommand{\figuresampleone}{+142\,521\,458.11~\texteuro} \newcommand{\figuresampletwo}{\textminus 21\,173.91~\$} \title{\LaTeX{} support for Lato\\Version~\version} \author{Mohamed \name{El~Morabity}\\\email{melmorabity@fedoraproject.org}} \begin{document} \maketitle \tableofcontents \section{Introduction} Lato is a sans-serif typeface family designed in the Summer~2010 by Warsaw-based designer \L ukasz \name{Dziedzic}~\cite{dziedzic} for the tyPoland foundry. Lato consists of nine weights (plus corresponding italics) and supports more than 100~Latin-based languages, more than 50~Cyrillic-based languages as well as Greek and IPA phonetics. The font is available at its web site~\cite{lato} as \acronym{TTF}-flavored OpenType files licensed under the \acronym{OFL} version~1.1~\cite{ofl}. This package provides support for this font in \LaTeX, including \hologo{XeLaTeX} and \hologo{LuaLaTeX}. It includes the original OpenType fonts, as well as Type~1 versions, converted for this package using \program{FontForge}~\cite{fontforge} and \program{cfftot1}~\cite{cfftot1} for full support with \LaTeX{} and \program{Dvips}. \section{Installation} These directions assume that your \TeX{} distribution is \acronym{TDS}-compliant. Once the \path|lato.zip| archive extracted: \begin{enumerate} \item Copy \path|doc/|, \path|fonts/|, and \path|tex/| directories to your \path|texmf/| directory (either your local or global \path|texmf/| directory). \item Run \command{mktexlsr} to refresh the file name database and make \TeX{} aware of the new files. \item Run \command{updmap --enable Map lato.map}\footnote{Starting with \TeX Live~2017, use \command{updmap-user} for a local installation, or \command{updmap-sys} for a global one.} to make \program{Dvips}, \program{dvipdf} and \program{\TeX} aware of the new fonts. \end{enumerate} Note that this package requires the following packages to work: \begin{itemize} \item \pkg{fontaxes} \item \pkg{fontspec} (for \hologo{XeLaTeX}/\hologo{LuaLaTeX} support) \item \pkg{ifluatex} \item \pkg{ifxetex} \item \pkg{xkeyval} \end{itemize} \section{Usage} \subsection{Calling Lato} You can use the Lato font in a \LaTeX{} document by adding the command \begin{verbatim} \usepackage{lato} \end{verbatim} to the preamble. The package supplies the \cmd{\lato} command to switch the current font to Lato. \subsection{Options} \subsubsection{Lato as default (sans-serif) font} You can set \LaTeX{} to use Lato as standard font throughout the whole document by passing the \option{default} option to the package: \begin{verbatim} \usepackage[default]{lato} \end{verbatim} To set Lato as default sans-serif only, use the \option{defaultsans} option: \begin{verbatim} \usepackage[defaultsans]{lato} \end{verbatim} \subsubsection{OpenType vs. Type~1} Depending on the \LaTeX{} rendering engine used, the package will automatically use: \begin{itemize} \item OpenType fonts with \program{\hologo{XeLaTeX}} and \program{\hologo{LuaLaTeX}} (the \pkg{fontspec} package will be therefore loaded) \item Type~1 fonts with all other \LaTeX{} rendering engines (especially \program{\hologo{pdfLaTeX}}) \end{itemize} The package was written to provide same functionalities whatever the \TeX{} rendering engine used. Notice that OpenType fonts supply more typographic features like additional ligatures or stylistic alternatives. The table~\vref{tab:features} describes all OpenType features supported by the Lato font family. Please refer to the \pkg{fontspec} package documentation~\cite{fontspecdoc} to enable such features in your documents with \hologo{XeLaTeX} or \hologo{LuaLaTeX}. \begin{table} \centering \begin{tabular}{ccc} \toprule Feature & Description & \pkg{fontspec} option\\ \midrule \code{calt} & Contextual Alternates & \code{Contextuals=Alternate}\\ \code{case} & Case-Sensitive Forms & \code{Letters=Uppercase}\\ \code{dlig} & Discretionary Ligatures & \code{Ligatures=Rare}\\ \code{dnom} & Denominators & \code{VerticalPosition=Denominator}\\ \code{frac} & Fractions & \code{Fractions=On}\\ \code{kern} & Kerning & \code{Kerning=On}\\ \code{liga} & Standard Ligatures & \code{Ligatures=Common}\\ \code{lnum} & Lining Figures & \code{Numbers=Uppercase}\\ \code{mark} & Mark Positioning & \code{Diacritics=MarkToBase}\\ \code{numr} & Numerators & \code{VerticalPosition=Numerator}\\ \code{onum} & Oldstyle Figures & \code{Numbers=Lowercase}\\ \code{ordn} & Ordinals & \code{VerticalPosition=Ordinal}\\ \code{pnum} & Proportional Figures & \code{Numbers=Proportional}\\ \code{salt} & Stylistic Alternates & \code{Style=Alternate}\\ \code{sinf} & Scientific Inferiors & \code{VerticalPosition=ScientificInferior}\\ \code{ss01} & Stylistic Set 1 & \code{Alternate=1}\\ \code{ss02} & Stylistic Set 2 & \code{Alternate=2}\\ \code{ss03} & Stylistic Set 3 & \code{Alternate=3}\\ \code{ss04} & Stylistic Set 4 & \code{Alternate=4}\\ \code{subs} & Subscript & \code{VerticalPosition=Inferior}\\ \code{sups} & Superscript & \code{VerticalPosition=Superior}\\ \code{tnum} & Tabular Figures & \code{Numbers=Monospaced}\\ \bottomrule \end{tabular} \caption{OpenType font features supported by Lato fonts} \label{tab:features} \end{table} To force Type~1 fonts with \program{\hologo{XeLaTeX}} or \program{\hologo{LuaLaTeX}}, use the \option{type1} option. This may be useful to avoid loading the \pkg{fontspec} package. \subsubsection{Font scaling} The font can be up- and downscale by any factor. This can be used to make Lato more friendly when used in company with other type faces, e.g., to adapt the x-height. The package option \option{scale=\parameter{ratio}} will scale the font according to \parameter{ratio} (1.0 by default), for example: \begin{verbatim} \usepackage[scale=0.95]{lato} \end{verbatim} \subsubsection{Figure versions} Lato provides two figure styles (see table~\vref{tab:figures}): \begin{itemize} \item \emph{Lining figures}, designed to match the uppercase letters in size and color \item \emph{Old style figures} (also known as text figures), designed to match lowercase letters \end{itemize} The \pkg{lato} package uses lining figures by default (\option{lining} option). To select old style figures, use the \option{oldstyle} option. Two figure widths are also available: \begin{itemize} \item \emph{Tabular figures}, which each have the same width \item \emph{Proportional figures}, which vary in width according to their shape \end{itemize} The \pkg{lato} package uses tabular figures by default (\option{tabular} option). To select proportional figures, use the \option{proportional} option. \begin{table} \centering \begin{tabular}{crr} \toprule & \multicolumn{1}{c}{Lining figures} & \multicolumn{1}{c}{Old style figures}\\ \midrule Tabular figures& \lato\tabularfigures{\liningfigures{\figuresampleone}} & \lato\tabularfigures{\textfigures{\figuresampleone}}\\ & \lato\tabularfigures{\liningfigures{\figuresampletwo}} & \lato\tabularfigures{\textfigures{\figuresampletwo}}\\ \midrule Proportional figures& \lato\proportionalfigures{\liningfigures{\figuresampleone}} & \lato\proportionalfigures{\textfigures{\figuresampleone}}\\ & \lato\proportionalfigures{\liningfigures{\figuresampletwo}} & \lato\proportionalfigures{\textfigures{\figuresampletwo}}\\ \bottomrule \end{tabular} \caption{Figure styles} \label{tab:figures} \end{table} Notice that some characters, like math operators in text mode and currency units, will adapt to the select figure width and style combination. The package also supports and loads the \pkg{fontaxes}~\cite{fontaxes} package. This package supplies macros to individually select figure style and width locally~\cite{fontaxesdoc}. \subsubsection{Encodings} The following \LaTeX{} encodings are supported: \begin{description} \item[Latin] \acronym{OT1}, \acronym{T1}, \acronym{TS1} (partial) \item[Cyrillic] \acronym{T2A}, \acronym{T2B}, \acronym{T2C}, \acronym{X2} \item[Greek] \acronym{LGR} (monotonic and polytonic) \end{description} To use one or another encoding, give the \LaTeX{} name to the \pkg{fontenc} package as usual, as in \begin{verbatim} \usepackage[T1]{fontenc} \usepackage{lato} \end{verbatim} As usual with \acronym{OT1} encoded fonts, kerning with accented characters is treated poorly, if at all. Note difference in kerning between these two encoding in table~\vref{tab:kerning}. It is therefore advised to always use the Lato font family in any encoding than \acronym{OT1} when typing diacritics. \begin{table} \centering \begin{tabular}{ll} \toprule OT1-encoded & {\lato\fontencoding{OT1}\selectfont To Ta T\'e}\\ \midrule T1-encoded & {\lato\fontencoding{T1}\selectfont To Ta T\'e}\\ \bottomrule \end{tabular} \caption{Kerning with OT1 and T1 encodings} \label{tab:kerning} \end{table} \subsection{Available weights, shapes and variants} Table~\vref{tab:fonts} lists the available font series and shapes with their \acronym{NFSS} classification. Parenthesized combinations are provided via substitutions. \begin{table} \centering \begin{tabular}{cccc} \toprule Font & Series & Shape & OpenType font file\\ \midrule {\lato\fontseries{ul}\selectfont Lato Hairline} & \code{ul} & \code{n} & \path|Lato-Hairline.ttf|\\ {\lato\fontseries{ul}\selectfont\itshape Lato Hairline Italic} & \code{ul} & \code{it} (\code{sl}) & \path|Lato-HairlineItalic.ttf|\\ {\lato\fontseries{el}\selectfont Lato Thin} & \code{el} & \code{n} & \path|Lato-Thin.ttf|\\ {\lato\fontseries{el}\selectfont\itshape Lato Light Thin} & \code{el} & \code{it} (\code{sl}) & \path|Lato-ThinItalic.ttf|\\ {\lato\fontseries{l}\selectfont Lato Light} & \code{l} & \code{n} & \path|Lato-Light.ttf|\\ {\lato\fontseries{l}\selectfont\itshape Lato Light Italic} & \code{l} & \code{it} (\code{sl}) & \path|Lato-LightItalic.ttf|\\ {\lato\mdseries Lato Regular} & \code{m} & \code{n} & \path|Lato-Regular.ttf|\\ {\lato\mdseries\itshape Lato Italic} & \code{m} & \code{it} (\code{sl}) & \path|Lato-Italic.ttf|\\ {\lato\fontseries{mb}\selectfont Lato Medium} & \code{mb} & \code{n} & \path|Lato-Medium.ttf|\\ {\lato\fontseries{mb}\selectfont\itshape Lato Medium Italic} & \code{mb} & \code{it} (\code{sl}) & \path|Lato-MediumItalic.ttf|\\ {\lato\fontseries{sb}\selectfont Lato Semibold} & \code{sb} & \code{n} & \path|Lato-Semibold.ttf|\\ {\lato\fontseries{sb}\selectfont\itshape Lato Semibold Italic} & \code{sb} & \code{it} (\code{sl}) & \path|Lato-SemiboldItalic.ttf|\\ {\lato\bfseries Lato Bold} & \code{b} (\code{bx}) & \code{n} & \path|Lato-Bold.ttf|\\ {\lato\bfseries\itshape Lato Bold Italic} & \code{b} (\code{bx}) & \code{it} (\code{sl}) & \path|Lato-BoldItalic.ttf|\\ {\lato\fontseries{eb}\selectfont Lato Heavy} & \code{eb} & \code{n} & \path|Lato-Heavy.ttf|\\ {\lato\fontseries{eb}\selectfont\itshape Lato Heavy Italic} & \code{eb} & \code{it} (\code{sl}) & \path|Lato-HeavyItalic.ttf|\\ {\lato\fontseries{ub}\selectfont Lato Black} & \code{ub} & \code{n} & \path|Lato-Black.ttf|\\ {\lato\fontseries{ub}\selectfont\itshape Lato Black Italic} & \code{ub} & \code{it} (\code{sl}) & \path|Lato-BlackItalic.ttf|\\ \bottomrule \end{tabular} \caption{Available font styles} \label{tab:fonts} \end{table} In addition, each font variant combination (figure width/figure style) corresponds to a \acronym{NFSS} family (see table~\vref{tab:families}). \begin{table} \centering \begin{tabular}{ccc} \toprule & Lining figures & Old style figures\\ \midrule Tabular figures & \code{lato-TLF} & \code{lato-TOsF}\\ \midrule Proportional figures & \code{lato-LF} & \code{lato-OsF}\\ \bottomrule \end{tabular} \caption{Available \acronym{NFSS} families} \label{tab:families} \end{table} Samples of the font are available in the \href{run:lato-samples.pdf}{\path|lato-samples.pdf|} file. \subsection{Math support} The \pkg{lato} package doesn't provide math support. However the \pkg{mdsymbol} package~\cite{mdsymbol} provides mathematical symbol fonts which fit very well with Lato. In addition, the \pkg{mathspec}~\cite{mathspec} package (for \hologo{XeLaTeX} or \hologo{LuaLaTeX} engines) or the \pkg{mathastext}~\cite{mathastext}\footnote{In particular with the \code{LGR} option to get Greek letters from the Lato fonts} package (for other \LaTeX{} engines) can be called to use Lato as math font. \section{Known bugs and improvements} Please send bug reports and suggestions about the Lato \LaTeX{} support to \href{mailto:melmorabity@fedoraproject.org}{Mohamed \name{El~Morabity}}. \subsection{Compatibility with previous versions} \subsubsection{Legacy \code{fla} family} Previous versions of the package used to provide \code{fla} as default \acronym{NFSS} family for Lato, and the corresponding \cmd{\flafamily} switch command. Such family and macro are still available in newer package versions. In particular, the \code{fla} family is now an alias for the \code{lato-TLF} one. \subsubsection{Smallcaps} Since the Lato font family doesn't provide yet ``real'' smallcaps, faked ones were supplied by previous versions of the \pkg{lato} package (by scaling down uppercase letters), with a very poor result. Furthermore, there's no convenient way to generate fake smallcaps with \hologo{XeTeX} or \hologo{LuaTeX} engines and native OpenType fonts. For these reasons, faked small caps are no longer provided, starting with version~3.0 of the \pkg{lato} package. Anyway \LaTeX{} should automatically substitute missing smallcap shapes by normal ones. \section{License} This package is released under the \LaTeX{} project public license, either version~1.3c or above~\cite{lppl}. Anyway both OpenType and Type~1 files are delivered under the Open Font License version~1.1~\cite{ofl}. \begin{thebibliography}{9} \bibitem{dziedzic} \url{http://www.lukaszdziedzic.eu/} \bibitem{lato} \url{http://www.latofonts.com/} \bibitem{ofl} \url{http://scripts.sil.org/OFL_web} \bibitem{fontforge} \url{https://fontforge.github.io/} \bibitem{cfftot1} \url{https://www.lcdf.org/type/cfftot1.1.html} \bibitem{fontspecdoc} \url{https://mirrors.ctan.org/macros/xetex/latex/fontspec/fontspec.pdf} \bibitem{fontaxes} \url{https://www.ctan.org/pkg/fontaxes} \bibitem{fontaxesdoc} \url{http://mirrors.ctan.org/macros/latex/contrib/fontaxes/fontaxes.pdf} \bibitem{mdsymbol} \url{https://www.ctan.org/pkg/mdsymbol} \bibitem{mathspec} \url{https://www.ctan.org/pkg/mathspec} \bibitem{mathastext} \url{https://www.ctan.org/pkg/mathastext} \bibitem{lppl} \url{http://www.latex-project.org/lppl/lppl-1-3c.html} \end{thebibliography} \end{document}