summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/nexus-otf
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/nexus-otf
Initial commit
Diffstat (limited to 'macros/latex/contrib/nexus-otf')
-rw-r--r--macros/latex/contrib/nexus-otf/Changes2
-rw-r--r--macros/latex/contrib/nexus-otf/README.md41
-rw-r--r--macros/latex/contrib/nexus-otf/doc/nexus-otf-doc.pdfbin0 -> 161314 bytes
-rw-r--r--macros/latex/contrib/nexus-otf/doc/nexus-otf-doc.tex218
-rw-r--r--macros/latex/contrib/nexus-otf/latex/nexus-otf.sty145
5 files changed, 406 insertions, 0 deletions
diff --git a/macros/latex/contrib/nexus-otf/Changes b/macros/latex/contrib/nexus-otf/Changes
new file mode 100644
index 0000000000..8a9e0c2e4e
--- /dev/null
+++ b/macros/latex/contrib/nexus-otf/Changes
@@ -0,0 +1,2 @@
+0.02 2018-07-05 - added option pro for NexusSansPro
+0.01 2018-01-18 - first CTAN version
diff --git a/macros/latex/contrib/nexus-otf/README.md b/macros/latex/contrib/nexus-otf/README.md
new file mode 100644
index 0000000000..fb1d0c45e1
--- /dev/null
+++ b/macros/latex/contrib/nexus-otf/README.md
@@ -0,0 +1,41 @@
+# README #
+Package nexus-otf supports the Nexus fonts for
+the corporate design font of the Free University
+of Berlin (Freie Universität Berlin - Germany).
+
+Following font files are supported:
+
+- NexusSansPro-BoldItalic.otf
+- NexusSansPro-Bold.otf
+- NexusSansPro-Italic.otf
+- NexusSansPro.otf
+- NxSfBdIf.ttf
+- NxSfBdIS.ttf
+- NxSfBdIt.ttf
+- NxSfBdSC.ttf
+- NxSfBdTf.ttf
+- NxSfBd__.ttf
+- NxSfItSC.ttf
+- NxSfItSO.ttf
+- NxSfItST.ttf
+- NxSfItTf.ttf
+- NxSfIt__.ttf
+- NxSfRgSC.ttf
+- NxSfRgTf.ttf
+- NxSfRg__.ttf
+- NxSnBdIS.ttf
+- NxSnBdIt.ttf
+- NxSnBdSc.ttf
+- NxSnBdTf.ttf
+- NxSnBd__.ttf
+- NxSnBItf.ttf
+- NxSnItSc.ttf
+- NxSnItTf.ttf
+- NxSnIt__.ttf
+- NxSnRgSc.ttf
+- NxSnRgTf.ttf
+- NxSnRg__.ttf
+
+%% This file is distributed under the terms of the LaTeX Project Public
+%% License from CTAN archives in directory macros/latex/base/lppl.txt.
+%% Either version 1.3 or, at your option, any later version.
diff --git a/macros/latex/contrib/nexus-otf/doc/nexus-otf-doc.pdf b/macros/latex/contrib/nexus-otf/doc/nexus-otf-doc.pdf
new file mode 100644
index 0000000000..da5e217331
--- /dev/null
+++ b/macros/latex/contrib/nexus-otf/doc/nexus-otf-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/nexus-otf/doc/nexus-otf-doc.tex b/macros/latex/contrib/nexus-otf/doc/nexus-otf-doc.tex
new file mode 100644
index 0000000000..abaef311d8
--- /dev/null
+++ b/macros/latex/contrib/nexus-otf/doc/nexus-otf-doc.tex
@@ -0,0 +1,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
+
+
diff --git a/macros/latex/contrib/nexus-otf/latex/nexus-otf.sty b/macros/latex/contrib/nexus-otf/latex/nexus-otf.sty
new file mode 100644
index 0000000000..5cbb7ccede
--- /dev/null
+++ b/macros/latex/contrib/nexus-otf/latex/nexus-otf.sty
@@ -0,0 +1,145 @@
+%% $Id: nexus-otf.sty 776 2018-07-05 10:35:40Z herbert $
+%%
+%% This file is distributed under the terms of the LaTeX Project Public
+%% License from CTAN archives in directory macros/latex/base/lppl.txt.
+%% Either version 1.3 or, at your option, any later version.
+%%
+% Copyright 2018 Herbert Voss hvoss@tug.org
+%%
+\ProvidesPackage{nexus-otf}[%
+ 2018/07/05 v. 0.02 (Herbert Voss) Supports Nexus serif and Nexus Sans ]
+
+\RequirePackage{ifxetex,ifluatex,textcomp}
+
+\newif\ifNexus@ttf
+\ifxetex\Nexus@ttftrue\else\ifluatex\Nexus@ttftrue\else % [pdf]LaTeX
+ \Nexus@ttffalse
+\fi\fi
+
+\newif\ifNexus@lining \Nexus@liningtrue
+\newif\ifNexus@tabular \Nexus@tabularfalse
+\newif\ifNexus@black \Nexus@blackfalse
+\newif\ifNexus@pro \Nexus@profalse
+\newif\ifNexus@math \Nexus@mathfalse
+
+\RequirePackage{xkeyval}
+
+\DeclareOptionX{pro}[true]{\@nameuse{Nexus@pro#1}}
+\DeclareOptionX{math}[true]{\@nameuse{Nexus@math#1}}
+
+\DeclareOptionX{lining}[true]{\@nameuse{Nexus@lining#1}}
+\DeclareOptionX{lf}[true]{\@nameuse{if#1}\Nexus@liningtrue\else\Nexus@liningfalse\fi}
+\DeclareOptionX{oldstyle}[true]{\@nameuse{if#1}\Nexus@liningfalse\else\Nexus@liningtrue\fi}
+\DeclareOptionX{osf}[true]{\@nameuse{if#1}\Nexus@liningfalse\else\Nexus@liningtrue\fi}
+\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}}
+
+\ProcessOptionsX\relax
+
+\ifNexus@lining\def\Nexus@figurestyle{Lining}\else\def\Nexus@figurestyle{OldStyle}\fi
+\ifNexus@tabular\def\Nexus@figurealign{Monospaced}\else\def\Nexus@figurealign{Proportional}\fi
+
+\RequirePackage{unicode-math}
+
+\ifxetex\XeTeXtracingfonts=1\fi
+\defaultfontfeatures{
+ Ligatures = TeX ,
+% Extension = .ttf,
+% Scale = \Nexus@scale ,
+% RawFeature=+
+}
+\setmainfont{NexusSerif}%
+ [ Numbers = {\Nexus@figurealign,\Nexus@figurestyle},
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,
+ UprightFeatures = { SmallCapsFont = *-RegularSC },
+ BoldFeatures = { SmallCapsFont= *-BoldSC },
+ ItalicFeatures = { SmallCapsFont= *-ItalicSC },
+ BoldItalicFeatures = { SmallCapsFont= *-BoldItalicSC },
+ Scale = \nexusRM@scale,
+ ]
+
+\ifNexus@pro
+ \setsansfont{NexusSansPro}%
+ [ Numbers = {\Nexus@figurealign,\Nexus@figurestyle},
+ UprightFont = *,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,
+ UprightFeatures = { SmallCapsFont = NexusSans-RegularSC },
+ BoldFeatures = { SmallCapsFont= NexusSans-BoldSC },
+ ItalicFeatures = { SmallCapsFont= NexusSans-ItalicSC },
+ BoldItalicFeatures = { SmallCapsFont= NexusSans-BoldItalicSC },
+ Scale = \nexusSF@scale,
+ ]
+\else
+ \setsansfont{NexusSans}%
+ [ Numbers = {\Nexus@figurealign,\Nexus@figurestyle},
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,
+ UprightFeatures = { SmallCapsFont = NexusSans-RegularSC },
+ BoldFeatures = { SmallCapsFont= NexusSans-BoldSC },
+ ItalicFeatures = { SmallCapsFont= NexusSans-ItalicSC },
+ BoldItalicFeatures = { SmallCapsFont= NexusSans-BoldItalicSC },
+ Scale = \nexusSF@scale,
+ ]
+\fi
+
+\ifNexus@math\setmathfont{texgyrepagella-math.otf}\fi
+
+\endinput
+
+
+
+
+\providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}}
+\providecommand\infigures{\addfontfeatures{VerticalPosition=ScientificInferior}}
+
+\DeclareTextFontCommand{\textsu}{\sufigures}
+\DeclareTextFontCommand{\textin}{\infigures}
+
+\defaultfontfeatures{}
+
+\endinput
+
+
+
+<none> NexusSansTF-Italic 4.460 2004
+<none> NexusSans-BoldItalicSC 4.460 2004
+<none> NexusSerif-RegularSC 4.460 2004
+<none> NexusSans-RegularSC 4.460 2004
+<none> NexusSerif-BoldItalicSC 4.460 2004
+<none> NexusSans-Bold 4.460 2004
+<none> NexusSerifTF-BoldItalic 4.460 2004
+<none> NexusSerif-BoldItalic 4.460 2004
+<none> NexusSansTF-Regular 4.460 2004
+<none> NexusSerif-Bold 4.460 2004
+<none> NexusSans-BoldSC 4.460 2004
+<none> NexusSerif-ItalicSwashTwo 4.460 2004
+<none> NexusSerif-Regular 4.460 2004
+<none> NexusSerif-ItalicSC 4.460 2004
+<none> NexusSerifTF-Regular 4.460 2004
+<none> NexusSansTF-BoldItalic 4.460 2004
+<none> NexusSerifTF-Bold 4.460 2004
+<none> NexusSerifTF-Italic 4.460 2004
+<none> NexusSerif-BoldSC 4.460 2004
+<none> NexusSerif-Italic 4.460 2004
+<none> NexusSerif-ItalicSwashOne 4.460 2004
+<none> NexusSans-Italic 4.460 2004
+<none> NexusSans-ItalicSC 4.460 2004
+<none> NexusSans-BoldItalic 4.460 2004
+<none> NexusSansTF-Bold 4.460 2004
+<none> NexusSans-Regular 4.460 2004