| 1 |
|
| 2 |
\documentclass[11pt,a4paper,english]{article} |
| 3 |
|
| 4 |
\usepackage{babel} |
| 5 |
\usepackage[margin=25mm]{geometry} |
| 6 |
\usepackage{graphicx} |
| 7 |
\usepackage{amsmath} |
| 8 |
|
| 9 |
\usepackage[helvratio=0.9]{newpxtext} |
| 10 |
\usepackage[upint]{newpxmath} |
| 11 |
\usepackage[nonpxmath]{../tex/eulerpx} |
| 12 |
\def\hmmax{0} |
| 13 |
\def\bmmax{0} |
| 14 |
\usepackage{bm} |
| 15 |
\usepackage{microtype} |
| 16 |
|
| 17 |
\usepackage[hidelinks,breaklinks=true]{hyperref} |
| 18 |
\usepackage{bookmark} |
| 19 |
\usepackage{biblatex} |
| 20 |
|
| 21 |
\usepackage{fonttable} |
| 22 |
|
| 23 |
\newcommand*\pkg[1]{{\sf #1}} |
| 24 |
\newcommand*\cs[1]{{\tt\textbackslash #1}} |
| 25 |
\newcommand*\printdef[2]{{\tt\cs{def}\cs{#1}\{#2\}}} |
| 26 |
|
| 27 |
%\urlstyle{tt} |
| 28 |
|
| 29 |
\frenchspacing |
| 30 |
|
| 31 |
\title{The \pkg{eulerpx} font package} |
| 32 |
\author{% |
| 33 |
Luuk T\ij ssen\thanks{% |
| 34 |
The intial versions of this package were written by Jabir Ali Ouassou. |
| 35 |
}\\ |
| 36 |
\nolinkurl{[email protected]}% |
| 37 |
} |
| 38 |
|
| 39 |
\begin{document} |
| 40 |
|
| 41 |
\maketitle |
| 42 |
|
| 43 |
\section*{Getting started} |
| 44 |
You can start using \pkg{eulerpx} in your document right away by adding |
| 45 |
\begin{verbatim} |
| 46 |
\usepackage{newpxtext} |
| 47 |
\usepackage{eulerpx} |
| 48 |
\end{verbatim} |
| 49 |
to your document preamble. |
| 50 |
Euler Fraktur can be accessed through the \cs{mathfrak}-macro, likewise Euler Script through \cs{mathscr}. |
| 51 |
The bold math font (Euler) can be accessed through \cs{boldsymbol}, and the bold text font through \cs{mathbf}. |
| 52 |
Alternative versions of various math symbols and alphabets from \pkg{newpx} are provided by \cs{varmathfrak}, \cs{varmathscr}, \cs{varsum} and \cs{varaleph}. |
| 53 |
|
| 54 |
%In case you get the error |
| 55 |
%\begin{verbatim} |
| 56 |
% $! LaTeX Error: Too many math alphabets used in version normal. |
| 57 |
%\end{verbatim} |
| 58 |
%with this package, try using |
| 59 |
%\begin{verbatim} |
| 60 |
% \let\mathfrak=\varmathfrak |
| 61 |
% \let\mathscr=\varmathscr |
| 62 |
%\end{verbatim} |
| 63 |
%and do \emph{not} use the \pkg{amssymb} package with \pkg{eulerpx}! |
| 64 |
|
| 65 |
\section{Introduction} |
| 66 |
\AmS{} Euler (from here on simply referred to as `Euler') is a typeface created by Hermann Zapf (1918-2015) in 1983. |
| 67 |
Unfortunately, Zapf wasn't able to complete the font during his lifetime, meaning that many frequently-used math symbols are missing from it. |
| 68 |
In order to make Euler usable, these symbols have to be substituted from other fonts. |
| 69 |
Other \LaTeX{} implementations of Euler, such as the \pkg{euler} and \pkg{eulervm} packages, use the default Computer Modern typeface for these substitutions. |
| 70 |
|
| 71 |
The big issue with using Computer Modern for substituting math symbols in Euler, is that these two fonts generally don't go well together. |
| 72 |
The \pkg{eulerpx} package tries to alleviate this issue by allowing the user to choose different math fonts for its substitutions. |
| 73 |
The obvious and default choice for this font is the Palatino typeface, another typeface created by Zapf. |
| 74 |
This font is conveniently provided by the package \pkg{newpx}, and hence the name `eulerpx.' |
| 75 |
|
| 76 |
%\subsection{Further reading} |
| 77 |
%Test |
| 78 |
|
| 79 |
\section{Options} |
| 80 |
In initial versions of this package, \pkg{newpx} was the only font option. |
| 81 |
But, since version 1{.}0, you can load your own math font \emph{before} \pkg{eulerpx}, if you use the \verb|nonpxmath|-option. |
| 82 |
We additionally provide the key-value option \verb|scale| (for instance, \verb|scale=0.9|, for a fractional scale of 0{.}9). |
| 83 |
This allows you to scale the Euler symbols to match the size of the symbols from the other font. |
| 84 |
|
| 85 |
Not all font combinations are guaranteed to look good, so exercise some caution in your font choice. |
| 86 |
Additionally, you should try to stick to math fonts that include upright integrals (for instance, through an \verb|upint|-option), and slanted versions of the inequality symbols, which are selected automatically by \pkg{eulerpx}, if available. |
| 87 |
If you prefer the non-slanted inequality symbols, this behaviour can be inhibited using the \verb|noslant|-option. |
| 88 |
|
| 89 |
\subsection{Example} |
| 90 |
For instance, in order to use the Times typeface (package \pkg{newtx}) with Euler, you can add |
| 91 |
\begin{verbatim} |
| 92 |
\usepackage{newtxtext} |
| 93 |
\usepackage[upint]{newtxmath} |
| 94 |
\usepackage[nonpxmath,scale=0.95]{eulerpx} |
| 95 |
\end{verbatim} |
| 96 |
to your document preamble. |
| 97 |
The scale factor of 0{.}95 was derived empirically by trying to match the height of the text and math `x;' \verb|x$x$|. |
| 98 |
|
| 99 |
\section{Deprecated options} |
| 100 |
Some of the options that were previously offered by this package are now deprecated. |
| 101 |
These options were not correctly implemented and could cause visual artifacts. |
| 102 |
If you would still like to use some of these options, alternatives that mimic their original behaviour are provided below. |
| 103 |
|
| 104 |
\subsection{The {\tt sansmath}-option} |
| 105 |
If you want to use the sans-serif text font for operators (as opposed to the default serif text font), you can add the following to your document preamble: |
| 106 |
\begin{verbatim} |
| 107 |
\usepackage{newpxtext} |
| 108 |
\let\oldrmdefault=\rmdefault |
| 109 |
\let\rmdefault=\sfdefault |
| 110 |
\usepackage{eulerpx} |
| 111 |
\let\rmdefault=\oldrmdefault |
| 112 |
\end{verbatim} |
| 113 |
|
| 114 |
\subsection{The {\tt unicode}-option} |
| 115 |
If you want to write mathematics in Unicode in {\tt pdflatex}, you can add this to your document preamble:\footnote{Credit: David Carlisle on Stack Exchange, \url{https://tex.stackexchange.com/a/601583}.} |
| 116 |
\begin{verbatim} |
| 117 |
\usepackage{newpxtext} |
| 118 |
\usepackage{eulerpx} |
| 119 |
\let\rmdefault=\oldrmdefault |
| 120 |
\def\z"{} |
| 121 |
\def\UnicodeMathSymbol#1#2#3#4{% |
| 122 |
\ifnum#1>"A0 |
| 123 |
\DeclareUnicodeCharacter{\z#1}{#2}% |
| 124 |
\fi |
| 125 |
} |
| 126 |
\input unicode-math-table |
| 127 |
\end{verbatim} |
| 128 |
Though, in that case, you may also want to switch to Xe\LaTeX, in which case you can use the \pkg{unicode-math} package. |
| 129 |
|
| 130 |
\pagebreak |
| 131 |
\appendix |
| 132 |
\section{Font sample}\label{sec:sample} |
| 133 |
The following excerpt is taken from Michael Sharpe's \pkg{stickstoo} package documentation (page 4), who in turn sourced it from the \TeX Book and Karl Berry's torture test. |
| 134 |
|
| 135 |
\input sample.tex |
| 136 |
|
| 137 |
\newpage |
| 138 |
\section{Font tables}\label{sec:tables} |
| 139 |
\subsection{euf} |
| 140 |
\fonttable{eufm10} |
| 141 |
|
| 142 |
\newpage |
| 143 |
\subsection{zeur} |
| 144 |
\fonttable{zeurm10} |
| 145 |
|
| 146 |
\newpage |
| 147 |
\subsection{zeus} |
| 148 |
\fonttable{zeusm10} |
| 149 |
|
| 150 |
\newpage |
| 151 |
\subsection{zeuex} |
| 152 |
\fonttable{zeuex10} |
| 153 |
|
| 154 |
\end{document} |