summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/nexus-otf/doc/nexus-otf-doc.tex
blob: abaef311d805ea3946a448ad6bf03dc87d41647a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
\listfiles
\documentclass[paper=a4,parskip=half-,DIV=12]{scrartcl}
\usepackage{nexus-otf}
\usepackage{listings,xcolor,url}
\lstset{basicstyle=\small\ttfamily}
\usepackage{dtk-extern}
\usepackage{fancyvrb}

\begin{document} 
\title{The Nexus font -- Corporate Design Font of Freie Universität Berlin}
\author{Herbert Voß -- \url{Herbert.Voss@fu-berlin.de}}
\maketitle

\tableofcontents




\section{Package options}

\subsection{\texttt{pro} option}
Instead of using the default TrueType Version it uses the OpenType Pro version of Nexus Sans:


\begin{externalDocument}[
%  grfOptions={width=0.9\linewidth},
  frame,compiler=lualatex,
  crop,
  force=true,
  runs=1,code,docType=latex,
  showFilename,
%  align=\centering,
  lstOptions={columns=fixed}]{Nexus}
\documentclass{article}
\pagestyle{empty}
%StartVisiblePreamble
\usepackage[pro]{nexus-otf}
%StopVisiblePreamble
\setmonofont{DejaVuSans Mono}[Scale=MatchLowercase,FakeStretch=0.9]
\begin{document}
0000111122223333444455556666777788889999 abcdefghijklmn\par
\sffamily
0000111122223333444455556666777788889999 abcdefghijklmn
\end{document}
\end{externalDocument}

\typeout{Running: pdffonts}%

\ShellEscape{/usr/bin/pdffonts Nexus-1.pdf> Nexus-1.fonts}

\footnotesize
\VerbatimInput{Nexus-1.fonts}

\normalsize


The Sans-Pro version has by default lining figures. To get the same behaviour use the 
optional argument \texttt{osf}:

\begin{externalDocument}[
%  grfOptions={width=0.9\linewidth},
  frame,compiler=lualatex,
  crop,
  force=true,
  runs=1,code,docType=latex,
  showFilename,
%  align=\centering,
  lstOptions={columns=fixed}]{Nexus}
\documentclass{article}
\pagestyle{empty}
%StartVisiblePreamble
\usepackage[pro,osf]{nexus-otf}
%StopVisiblePreamble
\setmonofont{DejaVuSans Mono}[Scale=MatchLowercase,FakeStretch=0.9]
\begin{document}
0000111122223333444455556666777788889999 abcdefghijklmn\par
\sffamily
0000111122223333444455556666777788889999 abcdefghijklmn
\end{document}
\end{externalDocument}


\subsection{\texttt{math} option}
Instead of using the default Latin Modern Math it uses Pagella Math:


\begin{externalDocument}[
%  grfOptions={width=0.9\linewidth},
  frame,compiler=lualatex,
  crop,
  force=true,
  runs=1,code,docType=latex,
  showFilename,
%  align=\centering,
  lstOptions={columns=fixed}]{Nexus}
\documentclass{article}
\pagestyle{empty}
%StartVisiblePreamble
\usepackage[math]{nexus-otf}
%StopVisiblePreamble
\setmonofont{DejaVuSans Mono}[Scale=MatchLowercase,FakeStretch=0.9]
\begin{document}
\[ \int\limits_1^{\infty}\frac{1}{x^2} \symup dx=1 \]
\end{document}
\end{externalDocument}


\subsection{\texttt{lining} or \texttt{lf} option (linig figures)}
Oldstyle numbers (option \texttt{osf} or \texttt{oldstyle}) are the default.
With \texttt{lining} or \texttt{lf} one get normal figures, but only for the Sans Serif version of
the Pro font.

\begin{externalDocument}[
%  grfOptions={width=0.9\linewidth},
  frame,compiler=lualatex,
  crop,
  force=true,
  runs=1,code,docType=latex,
  showFilename,
%  align=\centering,
  lstOptions={columns=fixed}]{Nexus}
\documentclass{article}
\pagestyle{empty}
%StartVisiblePreamble
\usepackage[pro,lining]{nexus-otf}
%StopVisiblePreamble
\setmonofont{DejaVuSans Mono}[Scale=MatchLowercase,FakeStretch=0.9]
\begin{document}
01234567890 \textsf{0123456789}
\end{document}
\end{externalDocument}


\subsection{Scaling with \texttt{scaleRM} and \texttt{scaleSF}}


\begin{externalDocument}[
%  grfOptions={width=0.9\linewidth},
  frame,compiler=lualatex,
  crop,
  force=true,
  runs=1,code,docType=latex,
  showFilename,
%  align=\centering,
  lstOptions={columns=fixed}]{Nexus}
\documentclass{article}
\pagestyle{empty}
%StartVisiblePreamble
\usepackage[ScaleRM=1.1,ScaleSF=1.5]{nexus-otf}
%StopVisiblePreamble
\setmonofont{DejaVuSans Mono}[Scale=MatchLowercase,FakeStretch=0.9]
\begin{document}
011111234567890 \textsf{011111123456789}\par
\sffamily
011111234567890 \textsf{011111123456789}
\end{document}
\end{externalDocument}






\section{The Serif-Series}

A test with the Nexus font 0123456789 -- --- fl ffl fi ffi\\% ok
\textit{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}\\
\textbf{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}\\
\textsc{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}\\% ok
\textbf{\textit{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}}\\
\textbf{\textsc{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}}\\
%{\fontseries{bc}\selectfont\textit{\textsc{Ein Test mit der Nexus-Schrift 0123456789 fi ffl %ffi}}}\\
%{\fontseries{mc}\fontshape{sl}\selectfont Ein Test mit der Nexus-Schrift 0123456789 fi ffl ffi}\\


\section{The Sans Serif series}
\sffamily
A test with the Nexus font 0123456789 -- --- fl ffl fi ffi\\% ok
\textit{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}\\
\textbf{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}\\
\textsc{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}\\% ok
\textbf{\textit{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}}\\
\textbf{\textsc{A test with the Nexus font 0123456789 -- --- fl ffl fi ffi}}\\



\iffalse
\fontfamily{fnxx}\fontseries{eb}\selectfont
Ein Test mit der Nexus-Schrift 0123456789\\% ok
\fontshape{it}\selectfont
Ein Test mit der Nexus-Schrift 0123456789\\% ok
\fontshape{sc}\selectfont
Ein Test mit der Nexus-Schrift 0123456789\\% ok
\fi%


%
%\sffamily
%Ein Test mir der Nexus-Schrift\\
%\textbf{Ein Test mir der Nexus-Schrift}\\

\end{document}


\DeclareOptionX{tabular}[true]{\@nameuse{Nexus@tabular#1}}
\DeclareOptionX{tf}[true]{\@nameuse{if#1}\Nexus@tabulartrue\else\Nexus@tabularfalse\fi}
\DeclareOptionX{proportional}[true]{\@nameuse{if#1}\Nexus@tabulartrue\else\Nexus@tabularfalse\fi}
\DeclareOptionX{pf}[true]{\@nameuse{if#1}\Nexus@tabulartrue\else\Nexus@tabularfalse\fi}

\newcommand*\nexusRM@scale{1}  
\newcommand*\nexusSF@scale{1}
\DeclareOptionX{ScaleRM}{\renewcommand*{\nexusRM@scale}{#1}}
\DeclareOptionX{ScaleSF}{\renewcommand*{\nexusSF@scale}{#1}}
\DeclareOptionX{scaled}{\renewcommand*{\nexusRM@scale}{#1}\renewcommand*{\nexusSF@scale}{#1}}
\DeclareOptionX{scale}{\renewcommand*{\nexusRM@scale}{#1}\renewcommand*{\nexusSF@scale}{#1}}
\fi