Debian Codegraph @

texmf-dist/doc/fonts/montserrat/montserrat-doc.tex

raw
1 % !TEX TS-program = pdflatexmk
2 % Template file for TeXShop by Michael Sharpe, LPPL
3 \documentclass[11pt]{article}
4 \usepackage[margin=1in]{geometry}
5 \usepackage[parfill]{parskip}% Begin paragraphs with an empty line rather than an indent
6 \usepackage{graphicx}
7 %\usepackage{amssymb}% don't use with newtxmath
8 \pdfmapfile{=montserrat.map}
9 %SetFonts
10 % libertine+newtxmath
11 %\usepackage{newtxtext} % use sb in place of bold
12 \usepackage[T1]{fontenc}
13 \usepackage{textcomp}
14 \usepackage[scaled=.9,t,defaultfam]{montserrat}
15 \usepackage{nimbusmononarrow}% narrow
16 \usepackage{amsmath,amsthm}
17 \usepackage[libertine,vvarbb]{newtxmath}
18 % option vvarbb gives you stix blackboard bold
19 %\useosf % use oldstyle figures except in math
20 \usepackage[cal=boondoxo]{mathalfa}% less slanted than STIX cal
21 %SetFonts
22 \usepackage{booktabs}
23 \title{The Montserrat Font Package}
24 \author{Michael Sharpe}
25 \date{\today} % Activate to display a given date or no date
26 \def\TeXShop{\TeX Shop}
27 \usepackage{fonttable}
28 %\renewcommand*{\familydefault}{\sfdefault}
29 \usepackage{trace}
30 \begin{document}
31 \maketitle
32 %\expandafter\show\csname lfstyle \endcsname
33 %{\montserratalt fi fl ff ffi ffl}
34
35
36 Montserrat is a geometric sans-serif typeface designed by Julieta Ulanovsky, inspired by posters and signage from her historic Buenos Aires neighborhood of the same name. It is rather close in spirit to Gotham and Proxima Nova, but has its own individual appearance---more informal, less extended and more idiosyncratic. It is provided in a total of nine different weights, with upright and italic shapes, and every one of them has \textsc{Small Caps} and \textit{\textsc{Small Caps}}. There are two quite different versions that don't fit into the usual \LaTeX\ classifications. The version having the appellation Alternates has letter shapes that are much more rounded than the default version, reflecting the signage in the neighborhood of Montserrat. For example, here are the same four letters displayed in both the default and Alternates styles: ATWl, {\montserratalt ATWl}.
37
38 As it currently set up, a preamble entry of the form
39 \begin{verbatim}
40 \usepackage{montserrat}
41 \end{verbatim}
42 which should be made \textbf{after} loading the text font and \textbf{before} loading the math font, will set \verb|\sfdefault| to \verb|Montserrat|, so that \verb|\textsf{some Montserrat}| will render in that font.
43
44 There are some options that can can change the default behaviors.
45 \begin{itemize}
46 \item {\tt scale} (or {\tt scaled}) will cause Montserrat to render magnified by the specified scale factor.
47 \item
48 {\tt defaultfam} will cause \verb|\familydefault| to be set to \verb|\sfdefault|, so that Montserrat becomes the default text font for the document.
49 \item {\tt alternates} will result in \verb|\sfdefault| being set to MontserratAlternates, with the rounder shapes.
50 \item One of the options {\tt thin}, {\tt extralight}, {\tt light}, {\tt regular}, {\tt medium} may be specified to select the weight that should be used to render \LaTeX's {\tt regular}. (The default is {\tt regular}.)
51 \item One of the options {\tt semibold}, {\tt bold}, {\tt extrabold}, {\tt black} may be specified to select the weight that should be used to render \LaTeX's {\tt bold}. (The default is {\tt bold}.)
52 \item One of the options {\tt lining}, {\tt oldstyle} (or {\tt osf}) may be specified to select the figure style. (The default is {\tt lining}.)
53 \item One of the options {\tt proportional} (or {\tt p}), {\tt tabular} (or {\tt t}) may be specified to select the figure alignment. (The default is {\tt proportional}.)
54 \end{itemize}
55 No matter which style you choose, you may specify the other using the construction \verb|{\montserratalt ...}|. (For example, this was used at the end of the first paragraph of this document to show the alternate version of ATWl.)
56
57 %The abbreviations for the weights in the {\tt fd} files are as follows.
58 %
59 %
60 % \begin{tabular}{@{} ll @{}}
61 % \toprule
62 % Weight & abbrev \\
63 % \midrule
64 % thin & t \\
65 % extralight & el \\
66 % light & l \\
67 % regular & m \\
68 % medium & mb \\
69 % semibold & sb \\
70 % bold & b \\
71 % extrabold & eb \\
72 % black & k \\
73 % \bottomrule
74 % \end{tabular}
75
76 As of version 1.02, it is easier to remember how to obtain weights other than LaTeX's {\tt regular} and {\tt bold}, however they may be have been selected. The available weights are named as follows:\par
77 {\fontseries{thin}\selectfont thin}\\
78 {\fontseries{extralight}\selectfont extralight}\\
79 {\fontseries{light}\selectfont light}\\
80 {\fontseries{regular}\selectfont regular}\\
81 {\fontseries{medium}\selectfont medium}\\
82 {\fontseries{semibold}\selectfont semibold}\\
83 {\fontseries{bold}\selectfont bold}\\
84 {\fontseries{extrabold}\selectfont extrabold}\\
85 {\fontseries{black}\selectfont black}\\
86
87
88 These names be used to render text any of these weights. For example, while in a block of sans serif text,
89 \begin{verbatim}
90 {\fontseries{thin}\selectfont x}
91 \end{verbatim}
92 will render as {\fontseries{thin}\selectfont x} in thin weight.
93
94 Montserrat has four basic figure options, plus another four at smaller size. Other than the default figure style and alignment set in the package options, access to all other possible figure options is a little complicated, and you should devise macros for any you might use regularly.
95
96 \begin{tabular}{@{} llll @{}}
97 \toprule
98 Figure spec & abbrev & example &call with \\
99 \midrule
100 Tabular lining & TLF & {\fontfamily{Montserrat-TLF}\selectfont 1} & \verb|{\fontfamily{Montserrat-TLF}\selectfont 1}| \\
101 Proportional lining & LF & {\fontfamily{Montserrat-LF}\selectfont 1} & \verb|{\fontfamily{Montserrat-LF}\selectfont 1}| \\
102 Tabular Oldstyle & TOsF & {\fontfamily{Montserrat-TOsF}\selectfont 1} & \verb|{\fontfamily{Montserrat-TOsF}\selectfont 1}| \\
103 Oldstyle & OsF & {\fontfamily{Montserrat-OsF}\selectfont 1} & \verb|{\fontfamily{Montserrat-OsF}\selectfont 1}| \\
104 Superiors & Sup & {\sufigures 1} & \verb|{\sufigures 1}| or \verb|\textsu{1}|\\
105 Inferiors & Inf & {\infigures 1} & \verb|{\infigures 1}| or \verb|\textin{1}|\\
106 Numerators & Numr & {\nufigures 1} & \verb|{\nufigures 1}| or \verb|\textnu{1}|\\
107 Denominators & Dnom & {\defigures 1} & \verb|{\defigures 1}| or \verb|\textde{1}|\\
108 \bottomrule
109 \end{tabular}
110
111 \textsc{Examples showing vertical position:}\\
112 \verb|\textde{1} \textin{1}| produces \textde{1} \textin{1}.
113
114 \verb|\textnu{1} \textsu{1}| produces \textnu{1} \textsu{1}.
115
116
117
118 \textsc{Example macro definition:}\\
119 Suppose you have set your default figure style in sans serif to proportional lining. (This is the default---you need not set any options to get this.) If you wish to have the option of proportional oldstyle figures in sans serif made easier, you could modify the definitions in the {\tt.sty} file, as follows. Place the following in your preamble after loading Montserrat.
120 \begin{verbatim}
121 \makeatletter
122 \DeclareRobustCommand{\sfosfstyle}{%
123 \not@math@alphabet\sfosfstyle\relax
124 \fontfamily{Montserrat-OsF}\selectfont %
125 }
126 \DeclareRobustCommand{\textsfosf}[1]{%
127 {\sfosfstyle #1}%
128 \makeatother
129 \end{verbatim}
130
131 \section*{Usage with fontspec}
132 Because the package supplies a file named {\tt montserrat.fontspec} whose contents list the {\tt otf} files that correspond to each of nine styles you may load {\tt montserrat} as the main text font with just
133 \begin{verbatim}
134 \usepackage{fontspec}
135 \setmainfont{montserrat}
136 \end{verbatim}
137 This will use regular and bold weights for \LaTeX's regular and bold. If you wish other choices, you will have to suitably modify {\tt montserrat.fontspec}.
138 \end{document}