diff options
author | Karl Berry <karl@freefriends.org> | 2007-02-02 00:11:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-02-02 00:11:53 +0000 |
commit | d83c28cd6048764c4c589eaa9cc75bec41b1d425 (patch) | |
tree | f8031957cc59436410cbcbdb58364213fb619ad4 /Master/texmf-dist/source/fonts/eulervm/eulervm.dtx | |
parent | 849b8d54dfafe9d54d928ed24bf2a6ab98f98086 (diff) |
try eulervm update
git-svn-id: svn://tug.org/texlive/trunk@3864 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/fonts/eulervm/eulervm.dtx')
-rw-r--r-- | Master/texmf-dist/source/fonts/eulervm/eulervm.dtx | 948 |
1 files changed, 948 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/fonts/eulervm/eulervm.dtx b/Master/texmf-dist/source/fonts/eulervm/eulervm.dtx new file mode 100644 index 00000000000..b8e7a8290ea --- /dev/null +++ b/Master/texmf-dist/source/fonts/eulervm/eulervm.dtx @@ -0,0 +1,948 @@ +% \CheckSum{635} +% \iffalse +% +% File `eulervm.dtx'. +% Copyright (c) 1999--2005 Walter Schmidt +% +% This file is part of the `Euler-VM Bundle'. +% ------------------------------------------- +% +% It may be distributed and/or modified under the conditions +% of the LaTeX Project Public License, either version 1.1 +% 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.1 or later is part of all distributions of LaTeX +% version 1999/06/01 or later. +% +% The list of all files belonging to the `Euler-VM Bundle' is +% given in the file `manifest.txt'. +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{eulervm.dtx} +%</driver> +% +%<package>\ProvidesPackage{eulervm} +%<uzeur>\ProvidesFile{uzeur.fd}% +%<uzeus>\ProvidesFile{uzeus.fd}% +%<uzeuex>\ProvidesFile{uzeuex.fd}% + [2005/01/11 v4.0 (WaS)] +% +%<*driver> +\documentclass{ltxdoc} +\OnlyDescription +\usepackage{flafter} +\usepackage{caption}[2004/01/23] +\renewcommand{\rmdefault}{pplx} +\linespread{1.06} +\usepackage[euler-digits]{eulervm} +% *** We are using Palatino and Euler-VM at 10pt. *** +% *** Do NOT change this through ltxdoc.cfg! *** +\def\tempa{cmss}\ifx\sfdefault\tempa + \usepackage[scaled]{helvet} +\fi +\usepackage{url,mflogo} +\captionsetup{labelfont={small,bf},textfont={small}} +\DeclareMathAccent\eulerhat\mathalpha{symbols}{222} +\renewcommand{\TeX}{TeX\@} +\renewcommand{\LaTeX}{La\TeX} +\begin{document} + \DocInput{eulervm.dtx} +\end{document} +%</driver> +% \fi +% +% \GetFileInfo{eulervm.dtx} +% \renewcommand{\labelitemi}{$\triangleright$} +% \newcommand\Lopt[1]{\textsf{#1}} +% \let\Lpack\Lopt +% \title{The Euler Virtual Math Fonts \\ for use with \LaTeX} +% \author{Walter Schmidt\thanks{\texttt{w-a-schmidt@gmx.net}}} +% \date{\fileversion{} -- \filedate} +% +% \maketitle +% +% \begin{abstract}\noindent +% The Euler math fonts are suitable for math typesetting in conjunction with a +% variety of popular text fonts which do not provide math character sets +% of their own. +% Euler-VM is a set of virtual math fonts based on Euler and CM, accompanied +% by a macro package for easy use with \LaTeX. +% \end{abstract} +% +% \tableofcontents +% +% +% +% \section{The Euler math fonts} +% `With Donald Knuth's assistance and encouragement, Hermann Zapf, one of the +% premier font designers of this century, was commissioned to create designs +% for Fraktur and script, and for a somewhat experimental, upright cursive +% alphabet that would represent a mathematician's handwriting on a blackboard +% and that could be used in place of italic. The designs that resulted were +% named Euler, in honor of Leonhard Euler, a prominent mathematician of the +% eighteenth century. Zapf's designs were rendered in \MF{} code by graduate +% students at Stanford, working under Knuth's direction. [\dots] +% Knuth also noticed that the +% style of some symbols in the Computer Modern extension font, in particular +% the integral sign, was too slanted to be attractive with Euler, and +% consequently he prepared a new (partial) extension font for use with Euler.' +% \cite{amsfndoc} +% +% Knuth's book \textit{Concrete Mathematics} was typeset using +% the Concrete font family for text and the Euler fonts for math. +% With \LaTeX, the particular math font setup of this book can be mimicked +% by means of the package \Lpack{euler}, see \cite{euler}. +% In the meantime it became +% obvious that the Euler fonts match other text font families equally well. +% +% Unfortunately, the Euler fonts do not comprise all symbols required for +% mathematical typesetting with \LaTeX. As a result, the \Lpack{euler} package +% needs to redefine most of \LaTeX's math font setup, so that certain +% symbols are taken from Euler, whereas others must still come from the +% CM math fonts. +% +% +% \section{The Euler-VM fonts} +% Euler Virtual Math (Euler-VM) +% is a set of \emph{virtual} fonts based primarily on the Euler fonts. +% The missing symbols are taken from Computer Modern, and the encoding +% follows CM-Math as closely as possible. +% This approach has several advantages over immediately using the +% \emph{real} Euler fonts, as practiced in the \Lpack{euler} package: +% Most noticeably, less \TeX{} resources are consumed, +% the quality of various math symbols is improved, +% and there will be far lesser compatibility problems with other packages. +% +% Actually, the reason for creating Euler-VM was the fact that the +% \Lpack{euler} package does not provide a usable \cmd{\hbar} or +% \cmd{\hslash}, and that the \cmd{\hslash} symbol from the +% \Lpack{amssymb} package cannot be used, either, because it follows CM Roman style. +% This made the beautiful Euler fonts more or less unusable for +% physics and related fields. +% The only way to fix this was to provide a `faked' Euler-style \cmd{\hslash} +% using the virtual font mechanism. +% As a side effect, it was possible to make the layout of the virtual fonts +% compatible with CM Math to a large extent, and -- since the style file +% had to be rewritten anyway -- further improvements were introduced. +% +% +% \section{Suitable text font families} +% Beside the above-mentioned Concrete, the font families Palatino, Aldus +% and Melior blend well with Euler -- which is not surprising, since they were +% designed by H.~Zapf, too. +% The Euler math fonts have also proven to go sufficiently well +% with other typefaces such Sabon\footnote{the classical one, not Sabon Next -- unfortunately} +% or Minion, that do not differ too much from Euler as far as the weight (stroke width) +% and x-height are concerned. +% +% Changing the default text font family is easy, see \cite{fntguide}. +% For instance, in the present document the command +% \begin{quote} +% |\renewcommand{\rmdefault}{pplx}| +% \end{quote} +% makes \LaTeX{} use Palatino in place of CM~Roman. +% +% Do \emph{not} use the Euler math fonts in conjunction +% with the default Computer Modern text fonts -- this is ugly! +% +% +% \section{The \LaTeX{} package \Lpack{eulervm}} +% +% Loading the \Lpack{eulervm} package will redefine \LaTeX's +% math font setup, so that the Euler-VM fonts and the default body font +% are substituted for CM Math and CM Roman. Roughly said: +% \begin{itemize} +% \item CM Math Italic is replaced with Euler Roman. +% \item CM Calligraphic is replaced with Euler Script. +% \item Several operator and delimiter symbols are replaced with +% alternative variants matching the Euler style. +% \item In numbers and operator names, +% CM Roman is replaced with the default text font. +% \end{itemize} +% Figure \ref{fig:roman} shows the Euler Roman and Script alphabets. +% +% \begin{figure} +% {\centering +% $ABCDEFGHIJKLMNOPQRSTUVWXYZ$\\ +% $abcdefghijklmnopqrstuvwxyz$\\ +% $\Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega$\\ +% $ \alpha \beta \gamma \delta \epsilon \varepsilon \zeta \eta \theta \vartheta \iota \kappa +% \lambda \mu \nu \xi \pi \varpi \rho +% \sigma \tau \upsilon \phi \varphi \chi \psi \omega$\\ +% $\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\} +% \caption{The Euler Roman and Script alphabets} +% \label{fig:roman} +% \end{figure} +% +% +% \subsection{Special features} +% +% \subsubsection{The package option \Lopt{small}} +% \label{sec:small} +% Loading the package with the option \Lopt{small} causes the +% Euler fonts to be loaded at 95\% of their nominal size, +% thus blending better with certain text font families, +% for instance Aldus or Minion. +% The option acts also on the AMS symbols and Euler Fraktur fonts, +% which can be used by means of the \Lpack{amssymb} and \Lpack{eufrak} packages; +% any further math fonts used in your document are, however, +% unaffected. +% +% +% \subsubsection{Slashed \textit{h}} +% In contrast to `normal' \LaTeX, a \cmd{\hslash} symbol $\hslash$ +% is provided, but there is no \cmd{\hbar}. +% +% +% \subsubsection{Bold math alphabet} +% The package defines a new math alphabet \cmd{\mathbold} to typeset +% math variables, incl.\ Greek, in a bold style: +% \begin{verse} +% Default: $a, b, c, \dots, z$ \qquad \cmd{\mathbold}: $\mathbold{a, b, c, }\dots,\mathbold{z}$ +% \end{verse} +% Do not mix this up with \cmd{\mathbf}: The latter will produce +% characters from the bold \emph{text} font, whereas \cmd{\mathbold} +% will use the bold series of the Euler math font. +% +% +% \subsubsection{Size of the `large' math symbols} +% The size of the `large' math symbols is automatically adjusted with respect +% to the base font size. You need \emph{not} load the extra package +% \Lpack{exscale} for this purpose. +% +% +% \subsection{Text fonts in math} +% +% \subsubsection{Math alphabets} +% Function names as well as math accents are taken from the default text font family. +% This holds for the math alphabets \cmd{\mathrm} and \cmd{\mathbf}, too. +% The \Lpack{eulervm} package determines the default font family +% (i.e.,\ the meaning of the macro \cmd{\familydefault}) +% at load time and will apply it for the above purposes then. +% In the same way, the math alphabets \cmd{\mathsf} and \cmd{\mathtt} +% are mapped to \cmd{\sfdefault} and \cmd{\ttdefault}. +% Thus, you should redefine the default text fonts \emph{before} +% loading the \Lpack{eulervm} package! +% +% +% \subsubsection{Numbers and punctuation in math mode} +% The normal behavior is to take the digits, the comma and the period +% from the default text font family. +% Popular text fonts may, however, not be suitable for typesetting math: +% Maybe the numeral `1' cannot be distinguished +% clearly enough from the letter `l', or the style of the numerals does +% not sufficiently suit the Euler letters, or you are using oldstyle digits. +% Furthermore, most text fonts are scaled linearly, so that the digits +% may become too thin when used in super- or subscripts. +% +% The \Lpack{eulervm} package provides the option \Lopt{euler-digits}, +% which makes the digits, the comma and the period come from Euler Roman +% in math mode. Note that the Euler fonts come with separate designs sizes +% of 10\,pt, 7\,pt and 5\,pt\,! +% The option should be used with care, because entering +% |$1.23$| will yield a different result than |1.23| then, +% and you will in each case have to decide whether an input fragment +% is a math or a non-math entity. +% The samples on page~\pageref{sec:samples} show the Euler digits. +% +% +% \subsubsection{The `hat' accent for math} +% By default, the math accent |\hat| is taken from the text font +% With the option \Lopt{euler-hat-accent}, +% an alternative one from Euler Fraktur will be used. Compare the +% default accent (in the present document from Palatino) with the +% alternative variant: +% \[ +% \hat{u} \longleftrightarrow \eulerhat{u} +% \] +% +% +% \subsubsection{Encoding} +% The default text font encoding +% (i.e.\ the meaning of the macro \cmd{\encodingdefault}) +% is determined when \Lpack{eulervm} is loaded; this encoding +% will then be applied to any text fonts used in math mode (see above.) +% The \Lpack{eulervm} package can, however, handle the encodings OT1 (\LaTeX's default), +% T1 and LY1 only. If your preferred text font encoding is a different one, +% or if you want to override the default setting for one reason or another, +% you have to specify one of the above as a package option, e.g.: +% \begin{verse} +% |\usepackage[OT1]{eulervm}| +% \end{verse} +% This makes the \Lpack{eulervm} package use the given encoding for the text +% fonts in math, without affecting text mode. +% Be sure that the text fonts are actually available with this encoding! +% +% +% \subsection{Using PostScript fonts} +% The CM as well as the Euler fonts +% are available in both \MF\ and Type1 (PostScript) format. +% The collection of Type1 fonts distributed by the AMS +% (or in conjunction with VTeX, resp.) is, however, +% lacking a few sizes. In contrast to the \Lpack{euler} package, +% \Lpack{eulervm} does \emph{not} make use of these missing fonts; +% thus, you can create documents which do not require any bitmap fonts. +% +% +% \subsection{Options and command summary} +% \noindent Options of the \Lpack{eulervm} package: +% \begin{itemize} +% \item \Lopt{small}\quad Load the Euler fonts at 95\% of their nominal size. +% \item \Lopt{euler-digits}\quad Take numerals, comma and period from +% Euler Roman in math mode. +% \item \Lopt{euler-hat-accent}\quad Use the \cmd{\hat} accent from Euler Fraktur. +% \item \Lopt{OT1}\quad Use OT1 encoding for text fonts in math, regardless +% of the default text font encoding. +% \item \Lopt{T1}\quad ditto, T1 +% \item \Lopt{LY1}\quad ditto, LY1 +% \end{itemize} +% New commands: +% \begin{itemize} +% \item \cmd{\mathbold}\quad A bold Euler-style math alphabet. +% \item \cmd{\hslash}\quad A slashed Euler-style h. +% \end{itemize} +% +% +% \subsection{Known problems and deficiencies} +% \begin{itemize} +% \item Certain symbols in the bold math fonts are far from perfect. +% E.g., the bold equals sign of the Euler fonts +% is actually smaller than the regular one! +% \item The dot-generating macros such as \cmd{\dots}, \cmd{vdots} etc.\ take +% their dots from different fonts. This results partially from a design flaw +% in \LaTeX, which can be fixed by loading of the package \Lpack{mathdots}; +% yet, the macros \cmd{\cdot} and \cmd{\cdots} will always produce dots from the +% Computer Modern Symbols font, which may not perfectly match the other dot +% symbols used. +% \end{itemize} +% +% +% \section{Credits} +% Frank Jensen's \Lpack{euler} package \cite{euler} served as a model +% for parts of \Lpack{eulervm}. The implementation +% of the \Lopt{OT1}, \Lopt{T1} and \Lopt{LY1} options was adopted +% from Frank Mittelbach's \Lpack{lucidabr} package \cite{lucidabr}. +% Special thanks to Henning `Hraban' Ramm for typographical and +% Frank Mittelbach for \TeX{}nical advice. +% +% +% \section{Sample Formulas} +% \label{sec:samples} +% \subsubsection*{From the \MF\ book, p.\,298} +% [...] If $n > 2$, the identity +% \[ +% t[u_1,\dots,u_n] = t\bigl[t[u_1,\dots,u_{n_1}], t[u_2,\dots,u_n]\bigr] +% \] +% defines $t[u_1,\dots,u_n]$ recursively, and it can be shown that the alternative definition +% \[ +% t[u_1,\dots,u_n] = t\bigl[t[u_1,u_2],\dots,t[u_{n-1},u_n]\bigr] +% \] +% gives the same result. Indeed, we have +% \[ +% t[u_1,\dots,u_n] = \sum_{k=1}^n{{n-1} \choose {k-1}} (1-t)^{n-k}t^{k-1}u_k\,\mbox{,} +% \] +% a Bernstein polynomial of order $n-1$. +% +% \subsubsection*{From the \MF\ book, p.\,59} +% \[ +% \frac{x_1 + 20}{x_2 - 20} + \sqrt{a^2 - \frac{2}{3}\sqrt b} +% \] +% +% \subsubsection*{From the \TeX\ book, exercise 19.13} +% \[ +% \int_{-\infty}^{+\infty} \mathrm{e}^{-x^2}\,\mathrm{d}x = \sqrt{\pi} +% \] +% +% +% \StopEventually{ +% \begin{thebibliography}{1} +% \raggedright +% \bibitem{amsfndoc} +% American Mathematical Society:\\ +% \textit{User's Guide to AMSFonts Version 2.2}.\\ +% Jan.\ 1995.\\ +% CTAN: \path{fonts/amsfonts/doc/amsfndoc.ps} +% \bibitem{concrete} +% Ronald L.\ Graham, Donald E. Knuth, and +% Oren Patashnik:\\ +% \textit{Concrete Mathematics}.\\ +% Addison-Wesley, 1989. +% \bibitem{fntguide} +% \LaTeX3 Project Team (Ed.):\\ +% \textit{LaTeX2e font selection.} +% (Part of the \LaTeX{} online documentation.) +% \bibitem{euler} +% Frank Jensen:\\ +% \textit{The \Lpack{euler} package, v2.5}.\\ +% Mar.\ 1995.\\ +% CTAN: \path{macros/latex/contrib/euler/} +% \bibitem{lucidabr} +% Frank Mittelbach:\\ +% \textit{The \Lpack{lucidabr} package, v4.10}.\\ +% Jan.\ 1998.\\ +% CTAN: \path{macros/latex/contrib/psnfssx/lucidabr/} +% \end{thebibliography} +% } +% +% {\sloppy +% \section{The implementation of the \Lpack{eulervm} package} +% +% \subsection{Switching off font warnings} +% We suppress the annoying `warnings' about math fonts being redefined: +% \begin{macrocode} +%<*package> +\let\evm@info\@font@info +\let\evm@warning\@font@warning +\let\@font@info\@gobble +\let\@font@warning\@gobble +% \end{macrocode} +% +% \subsection{Options} +% In addition to usual options processing we also have to memorize the +% options via \cmd{\newif}'s in order to handle some cross-dependencies. +% +% The option \Lopt{small}. +% Note that only a fixed scaling of 0.95 is provided, +% for the time being. This suits, for instance, the Aldus, +% and Minion text fonts. +% \begin{macrocode} +\DeclareOption{small}{% + \def\zeu@Scale{.95}} +% \end{macrocode} +% +% The option \Lopt{euler-digits}: +% \begin{macrocode} +\newif\ifevm@ed +\DeclareOption{euler-digits}{% + \evm@edtrue + \DeclareMathSymbol{0}\mathalpha{letters}{"30} + \DeclareMathSymbol{1}\mathalpha{letters}{"31} + \DeclareMathSymbol{2}\mathalpha{letters}{"32} + \DeclareMathSymbol{3}\mathalpha{letters}{"33} + \DeclareMathSymbol{4}\mathalpha{letters}{"34} + \DeclareMathSymbol{5}\mathalpha{letters}{"35} + \DeclareMathSymbol{6}\mathalpha{letters}{"36} + \DeclareMathSymbol{7}\mathalpha{letters}{"37} + \DeclareMathSymbol{8}\mathalpha{letters}{"38} + \DeclareMathSymbol{9}\mathalpha{letters}{"39} +} +% \end{macrocode} +% +% The option \Lopt{euler-hat-accent}: +% \begin{macrocode} +\newif\ifevm@eha +\DeclareOption{euler-hat-accent}{\evm@ehatrue} +% \end{macrocode} +% +% The text encoding for the `operators' font: +% \begin{macrocode} +\edef\operator@encoding{\encodingdefault} +\DeclareOption{OT1}{\def\operator@encoding{OT1}} +\DeclareOption{T1}{\def\operator@encoding{T1}} +\DeclareOption{LY1}{\def\operator@encoding{LY1}} +% \end{macrocode} +% +% The \Lopt{icomma} option is provided only for compatibility +% with previous versions. +% \begin{macrocode} +\newif\ifevm@ic +\DeclareOption{icomma}{\evm@ictrue} +% \end{macrocode} +% +% +% \subsection{Math font setup} +% We redefine the `letters', `symbols' and `largesymbols' +% alphabets. +% The `operators' font will be redefined only after processing +% of the options. +% \begin{macrocode} +\DeclareSymbolFont{letters} {U}{zeur}{m}{n} +\SetSymbolFont{letters}{bold} {U}{zeur}{b}{n} +\DeclareSymbolFont{symbols} {U}{zeus}{m}{n} +\SetSymbolFont{symbols}{bold} {U}{zeus}{b}{n} +\DeclareSymbolFont{largesymbols} {U}{zeuex}{m}{n} +\DeclareMathAlphabet{\mathbold} {U}{zeur}{b}{n} +% \end{macrocode} +% +% +% \subsection{The `letters' math font} +% +% The uppercase Greek letters are to be taken from Euler Roman now: +% \begin{macrocode} +\DeclareMathSymbol\Gamma {\mathalpha}{letters}{"00} +\DeclareMathSymbol\Delta {\mathalpha}{letters}{"01} +\DeclareMathSymbol\Theta {\mathalpha}{letters}{"02} +\DeclareMathSymbol\Lambda {\mathalpha}{letters}{"03} +\DeclareMathSymbol\Xi {\mathalpha}{letters}{"04} +\DeclareMathSymbol\Pi {\mathalpha}{letters}{"05} +\DeclareMathSymbol\Sigma {\mathalpha}{letters}{"06} +\DeclareMathSymbol\Upsilon {\mathalpha}{letters}{"07} +\DeclareMathSymbol\Phi {\mathalpha}{letters}{"08} +\DeclareMathSymbol\Psi {\mathalpha}{letters}{"09} +\DeclareMathSymbol\Omega {\mathalpha}{letters}{"0A} +% \end{macrocode} +% Lowercase Greek letters are made |\mathalpha|, too, because +% we want the |\mathbold| command to act on them: +% \begin{macrocode} +\DeclareMathSymbol{\alpha} {\mathalpha}{letters}{"0B} +\DeclareMathSymbol{\beta} {\mathalpha}{letters}{"0C} +\DeclareMathSymbol{\gamma} {\mathalpha}{letters}{"0D} +\DeclareMathSymbol{\delta} {\mathalpha}{letters}{"0E} +\DeclareMathSymbol{\epsilon}{\mathalpha}{letters}{"0F} +\DeclareMathSymbol{\zeta} {\mathalpha}{letters}{"10} +\DeclareMathSymbol{\eta} {\mathalpha}{letters}{"11} +\DeclareMathSymbol{\theta} {\mathalpha}{letters}{"12} +\DeclareMathSymbol{\iota} {\mathalpha}{letters}{"13} +\DeclareMathSymbol{\kappa} {\mathalpha}{letters}{"14} +\DeclareMathSymbol{\lambda} {\mathalpha}{letters}{"15} +\DeclareMathSymbol{\mu} {\mathalpha}{letters}{"16} +\DeclareMathSymbol{\nu} {\mathalpha}{letters}{"17} +\DeclareMathSymbol{\xi} {\mathalpha}{letters}{"18} +\DeclareMathSymbol{\pi} {\mathalpha}{letters}{"19} +\DeclareMathSymbol{\rho} {\mathalpha}{letters}{"1A} +\DeclareMathSymbol{\sigma} {\mathalpha}{letters}{"1B} +\DeclareMathSymbol{\tau} {\mathalpha}{letters}{"1C} +\DeclareMathSymbol{\upsilon}{\mathalpha}{letters}{"1D} +\DeclareMathSymbol{\phi} {\mathalpha}{letters}{"1E} +\DeclareMathSymbol{\chi} {\mathalpha}{letters}{"1F} +\DeclareMathSymbol{\psi} {\mathalpha}{letters}{"20} +\DeclareMathSymbol{\omega} {\mathalpha}{letters}{"21} +\DeclareMathSymbol{\varepsilon}{\mathalpha}{letters}{"22} +\DeclareMathSymbol{\vartheta}{\mathalpha}{letters}{"23} +\DeclareMathSymbol{\varpi} {\mathalpha}{letters}{"24} +\DeclareMathSymbol{\varphi} {\mathalpha}{letters}{"27} +% \end{macrocode} +% +% {\sloppy +% When the upper-case Greek letters are of type |\mathalpha| +% and do \emph{not} come from the operators font, |\mathrm{\Omega}| +% yields garbage. +% This is likely to happen in conjunction with the packages +% \Lpack{gensymb} and \Lpack{units}. As a countermeasure, we provide +% a macro |\upOmega| with type |\mathord|. The \Lpack{gensymb} package will +% automatically use this macro, rather than |\Omega|. This is the only way +% to make |\unit{\ohm}| work as expected. +% For the sake of full compatibility with other packages, a corresponding +% |\upDelta| is made available, too. +% } +% \begin{macrocode} +\DeclareMathSymbol\upOmega {\mathord}{letters}{"0A} +\DeclareMathSymbol\upDelta {\mathord}{letters}{"01} +% \end{macrocode} +% +% Euler doesn't have the special variants of |\sigma| and |\rho|: +% \begin{macrocode} +\let\varsigma=\sigma +\let\varrho=\rho +% \end{macrocode} +% +% Euler-VM has its own |\hslash|, but there is no |\hbar|: +% \begin{macrocode} +\DeclareMathSymbol{\evm@hslash}{\mathord}{letters}{128} +\def\evm@hbar{\evm@hslash% + \PackageWarning{eulervm}{% + Symbol \protect\hbar\space not available;\MessageBreak + \protect\hslash\space will be used instead}} +% \end{macrocode} +% The actual macros \cmd{\hbar} and \cmd{\hslash} will be defined +% after the preamble. +% +% The slash used to come from `operators': +% \begin{macrocode} +\DeclareMathDelimiter{/}{\mathord}{letters}{61}{largesymbols}{"0E} +% \end{macrocode} +% +% +% \subsection{The `symbols' math font} +% The following characters are usually taken from the `operators' +% font; now they come from `symbols': +% \begin{macrocode} +\DeclareMathSymbol{+}\mathbin {symbols}{171} +\DeclareMathSymbol{:}\mathrel {symbols}{186} +\DeclareMathSymbol{=}\mathrel {symbols}{189} +% \end{macrocode} +% \begin{macrocode} +\DeclareMathDelimiter{(}{\mathopen} {symbols}{168}{largesymbols}{"00} +\DeclareMathDelimiter{)}{\mathclose}{symbols}{169}{largesymbols}{"01} +\DeclareMathDelimiter{[}{\mathopen} {symbols}{219}{largesymbols}{"02} +\DeclareMathDelimiter{]}{\mathclose}{symbols}{221}{largesymbols}{"03} +% \end{macrocode} +% +% The font family \texttt{zeus} provides a semicolon in slot~187, +% an exclamation mark in slot~161, and a question mark in slot~191, too; +% for the time being these are unused. +% +% +% \subsection{Extensible arrows} +% +% The long arrows are made using the macros |\Relbar| (for double +% arrows) and |\relbar| (for single arrows). The standard \LaTeX\ +% definitions of these macros use the `\texttt{=}' and `\texttt{-}' +% characters to produce the extension part of the long arrows. +% These characters come, however, from Euler Fraktur now. Thus we +% have to redefine the |\Relbar| and |\relbar| macros so as to use +% appropriately scaled characters from CM, which are +% provided in our virtual `letters' font. +% \begin{macrocode} +\DeclareMathSymbol{\cm@minus}{\mathord}{letters}{129} +\def\relbar{\mathrel{\smash\cm@minus}} +\let\Relbar\undefined +\DeclareMathSymbol{\Relbar}{\mathrel}{letters}{130} +% \end{macrocode} +% Unfortunately, since the definitions of the `arrow-filling' macros +% (|\leftarrowfill| and |\rightarrowfill|) in standard \LaTeX\ still +% use explicit minus signs (instead of |\relbar|), we also have to +% redefine those macros: +% \begin{macrocode} +\def\leftarrowfill + {$\m@th\mathord\leftarrow\mkern-6mu% + \cleaders\hbox{$\mkern-2mu\cm@minus\mkern-2mu$}\hfill + \mkern-6mu\cm@minus$} +\def\rightarrowfill + {$\m@th\cm@minus\mkern-6mu% + \cleaders\hbox{$\mkern-2mu\cm@minus\mkern-2mu$}\hfill + \mkern-6mu\mathord\rightarrow$} +% \end{macrocode} +% +% +% \subsection{Miscellaneous} +% Our virtual `largesymbols' font comprises \texttt{euex10}, which +% provides also the $\infty$ symbol. +% \begin{macrocode} +\DeclareMathSymbol{\infty}{\mathord}{largesymbols}{153} +% \end{macrocode} +% +% Knuth wanted a little extra space before the prime superscript: +% \begin{macrocode} +\begingroup + \catcode`\'=\active + \gdef'{^\bgroup\mskip2mu\prim@s} +\endgroup +% \end{macrocode} +% +% +% \subsection{Options procesing} +% This must be done before the `operators' font is defined. +% \begin{macrocode} +\ProcessOptions\relax +% \end{macrocode} +% We still have to map the comma and the period to the text font, +% in case the \Lopt{euler-digits} option has \emph{not} been selected: +% \begin{macrocode} +\ifevm@ed\relax\else + \DeclareMathSymbol{,}{\mathpunct}{operators}{44} + \DeclareMathSymbol{.}{\mathord}{operators}{46} + \DeclareMathSymbol{\ldotp}{\mathpunct}{operators}{46} +\fi +% \end{macrocode} +% +% +% \subsection{Text fonts in math}\label{text-fonts} +% +% The text fonts used in particular math alphabets and in the +% `operators' symbol font should be the same as the fonts used for the +% main text. (It is now easy to replace the fonts for the `operators' +% symbol font, since the uppercase Greek letters are taken from +% the Euler Roman fonts.) +% +% In order to reduce the total number of fonts needed, we shall -- if +% possible -- use text fonts in the same encoding for both text and +% math. We have already determined which encoding has been selected +% as the default encoding. +% +% We redefine the `operators' symbol font and the math alphabets +% |\mathsf|, |\mathit| and |\mathtt|. +% Due to the current implementation of math accents +% which take their glyphs from text fonts, +% all text fonts must be used in a common encoding. +% \begin{macrocode} +\DeclareSymbolFont{operators}{\operator@encoding}{\familydefault}{m}{n} +\SetSymbolFont{operators}{bold}{\operator@encoding}{\familydefault}{b}{n} +\SetSymbolFont{operators}{normal}{\operator@encoding}{\familydefault}{m}{n} +% \end{macrocode} +% +% \begin{macrocode} +% \DeclareSymbolFontAlphabet{\mathrm} {operators} +% \DeclareSymbolFontAlphabet{\mathnormal} {letters} +\DeclareMathAlphabet{\mathsf} {\operator@encoding}{\sfdefault}{m}{n} +\DeclareMathAlphabet{\mathit} {\operator@encoding}{\rmdefault}{m}{it} +\DeclareMathAlphabet{\mathtt} {\operator@encoding}{\ttdefault}{m}{n} +\SetMathAlphabet{\mathsf}{bold}{\operator@encoding}{\sfdefault}{b}{n} +\SetMathAlphabet{\mathit}{bold}{\operator@encoding}{\rmdefault}{b}{it} +\SetMathAlphabet{\mathtt}{bold}{\operator@encoding}{\ttdefault}{b}{n} +\DeclareMathAlphabet\mathbf \operator@encoding{\rmdefault}{b}{n} +% \end{macrocode} +% Note that |\mathrm| and |\mathnormal| will automatically follow +% the `operators' font. +% +% Before redefining the math accents with respect to the actual +% encoding of the `operators' symbol font, they should be `undefined'. +% This is required for compatibility with older versions of the \Lpack{amsmath} +% package. +% \begin{macrocode} +\let\acute\undefined +\let\grave\undefined +\let\ddot\undefined +\let\tilde\undefined +\let\bar\undefined +\let\breve\undefined +\let\check\undefined +\let\hat\undefined +\let\dot\undefined +% \end{macrocode} +% +% \begin{macrocode} +\def\@tempa{T1} +\ifx\operator@encoding\@tempa + \DeclareMathAccent{\acute}{\mathalpha}{operators}{1} + \DeclareMathAccent{\grave}{\mathalpha}{operators}{0} + \DeclareMathAccent{\ddot}{\mathalpha}{operators}{4} + \DeclareMathAccent{\tilde}{\mathalpha}{operators}{3} + \DeclareMathAccent{\bar}{\mathalpha}{operators}{9} + \DeclareMathAccent{\breve}{\mathalpha}{operators}{8} + \DeclareMathAccent{\check}{\mathalpha}{operators}{7} + \DeclareMathAccent{\hat}{\mathalpha}{operators}{2} + \DeclareMathAccent{\dot}{\mathalpha}{operators}{10} +% \end{macrocode} +% +% \begin{macrocode} +\else +\def\@tempa{OT1} +\ifx\operator@encoding\@tempa + \DeclareMathAccent{\acute}{\mathalpha}{operators}{19} + \DeclareMathAccent{\grave}{\mathalpha}{operators}{18} + \DeclareMathAccent{\ddot}{\mathalpha}{operators}{127} + \DeclareMathAccent{\tilde}{\mathalpha}{operators}{126} + \DeclareMathAccent{\bar}{\mathalpha}{operators}{22} + \DeclareMathAccent{\breve}{\mathalpha}{operators}{21} + \DeclareMathAccent{\check}{\mathalpha}{operators}{20} + \DeclareMathAccent{\hat}{\mathalpha}{operators}{94} + \DeclareMathAccent{\dot}{\mathalpha}{operators}{95} +% \end{macrocode} +% +% \begin{macrocode} +\else +\def\@tempa{LY1} +\ifx\operator@encoding\@tempa + \DeclareMathAccent{\acute}{\mathalpha}{operators}{19} + \DeclareMathAccent{\grave}{\mathalpha}{operators}{18} + \DeclareMathAccent{\ddot}{\mathalpha}{operators}{127} + \DeclareMathAccent{\tilde}{\mathalpha}{operators}{126} + \DeclareMathAccent{\bar}{\mathalpha}{operators}{22} + \DeclareMathAccent{\breve}{\mathalpha}{operators}{21} + \DeclareMathAccent{\check}{\mathalpha}{operators}{20} + \DeclareMathAccent{\hat}{\mathalpha}{operators}{94} + \DeclareMathAccent{\dot}{\mathalpha}{operators}{5} +% \end{macrocode} +% +% \begin{macrocode} +\else + \PackageWarningNoLine{eulervm} + {Unknown Operator Encoding!\MessageBreak + Math accents may be wrong: assuming OT1 positions} +\fi\fi\fi +% \end{macrocode} +% The \cmd{\hat} accent is normally taken from the `operators' symbol font. +% With the option \Lopt{euler-hat accent}, however, we take an alternative +% one from Euler Fraktur, which is provided in the `symbols' alphabet. +% The above definition must be overwritten then: +% \begin{macrocode} +\ifevm@eha + \DeclareMathAccent\hat\mathalpha{symbols}{222} +\fi +% \end{macrocode} +% +% \subsection{An intelligent comma} +% \label{sec:icomma} +% An `intelligent' comma for use within decimal numbers, +% which was once posted by Donald Arseneau on the +% \path{comp.text.tex} news group. +% It does not work with arbitarily long numbers, so +% it is no longer advertised, and I recommend to use the +% newer package \path{icomma.sty} instead. +% \begin{macrocode} +\ifevm@ic + \mathchardef\mathcomma\mathcode`\, + \mathcode`\,="8000 + \catcode`,=\active + \def,{\afterassignment\domathcomma\finalhyphendemerits=1} + \def\domathcomma{\ifnum\finalhyphendemerits>1\mathord\fi + \mathcomma + \expandafter\@gobble\number\finalhyphendemerits} + \catcode`\,=12 +\fi +% \end{macrocode} +% +% \subsection{Using extra AMS fonts} +% Euler Fraktur and the AMS symbol fonts should be used with the same design sizes +% as the Euler-VM fonts, and should honor the \Lopt{small} option. +% We defer the font definitions until |\AtBeginDocument|, to ensure +% against loading of \Lpack{eufrak} or \Lpack{ammssymb} with the \Lopt{psamsfonts} option. +% \begin{macrocode} +\AtBeginDocument{% + \begingroup + \nfss@catcodes + \expandafter\ifx\csname zeu@Scale\endcsname\relax + \let\zeu@@Scale\@empty + \else + \edef\zeu@@Scale{s*[\csname zeu@Scale\endcsname]}% + \fi + \DeclareFontFamily{U}{euf}{} + \DeclareFontShape{U}{euf}{m}{n}{% + <-6>\zeu@@Scale eufm5% + <6-9>\zeu@@Scale eufm7% + <9->\zeu@@Scale eufm10% + }{} + \DeclareFontShape{U}{euf}{b}{n}{% + <-6>\zeu@@Scale eufb5% + <6-9>\zeu@@Scale eufb7% + <9->\zeu@@Scale eufb10% + }{} + \DeclareFontFamily{U}{msa}{}% + \DeclareFontShape{U}{msa}{m}{n}{% + <-6>\zeu@@Scale msam5% + <6-9>\zeu@@Scale msam7% + <9->\zeu@@Scale msam10% + }{}% + \DeclareFontFamily{U}{msb}{}% + \DeclareFontShape{U}{msb}{m}{n}{% + <-6>\zeu@@Scale msbm5% + <6-9>\zeu@@Scale msbm7% + <9->\zeu@@Scale msbm10% + }{}% + \endgroup +} + +% \end{macrocode} +% \subsection{Peaceful coexistence with the AMS packages} +% +% We define \cmd{\hslash} and \cmd{\hbar} after the premable only, +% in order to protect them from being overwritten by \Lpack{amsfonts}: +% \begin{macrocode} +\AtBeginDocument{ + \let\hslash\evm@hslash\let\hbar\evm@hbar +% \end{macrocode} +% When the \texttt{amsmath} package is loaded, the +% multiple integral signs must be fixed wrt.\ the Euler extension font, +% and we have to take care of the macros \cmd{\relbar} and +% \cmd{\Relbar}: +% \begin{macrocode} + \@ifpackageloaded{amsmath}{% + \def\intkern@{\mkern -4mu }% + \def\relbar{\mathrel{\smash\cm@minus}} + \let\Relbar\undefined + \DeclareMathSymbol{\Relbar}{\mathrel}{letters}{130} + }% +% \end{macrocode} +% Scaling of the math extension font requires the following patches +% (see the description of the \Lpack{exscale} package), unless \Lpack{amsmath} +% is also loaded: +% \begin{macrocode} + {% + \newdimen\big@size + \addto@hook\every@math@size{\setbox\z@\vbox{\hbox{$($}\kern\z@}% + \global\big@size 1.2\ht\z@} + \def\bBigg@#1#2{% + {\hbox{$\left#2\vcenter to#1\big@size{}\right.\n@space$}}} + \def\big{\bBigg@\@ne} + \def\Big{\bBigg@{1.5}} + \def\bigg{\bBigg@\tw@} + \def\Bigg{\bBigg@{2.5}} + } +} +% \end{macrocode} +% +% \subsection{Restoring normal font warnings} +% \begin{macrocode} +\let\@font@info\evm@info +\let\@font@warning\evm@warning +%</package> +% \end{macrocode} +% +% \section{The font definition files} +% +% \subsection{Common code for scaling} +% \begin{macrocode} +%<uzeur|uzeus|uzeuex> \expandafter\ifx\csname zeu@Scale\endcsname\relax +%<uzeur|uzeus|uzeuex> \let\zeu@@Scale\@empty +%<uzeur|uzeus|uzeuex> \else +%<uzeur|uzeus|uzeuex> \edef\zeu@@Scale{s*[\csname zeu@Scale\endcsname]}% +%<uzeur|uzeus|uzeuex> \fi +% \end{macrocode} +% +% \subsection{Euler Roman} +% \begin{macrocode} +%<*uzeur> +\DeclareFontFamily{U}{zeur}{\skewchar \font =127} +\DeclareFontShape{U}{zeur}{m}{n}{ + <9-> \zeu@@Scale zeurm10 + <6-9> \zeu@@Scale zeurm7 + <-6> \zeu@@Scale zeurm5 +}{} +\DeclareFontShape{U}{zeur}{b}{n}{ + <9-> \zeu@@Scale zeurb10 + <6-9> \zeu@@Scale zeurb7 + <-6> \zeu@@Scale zeurb5 +}{} +\DeclareFontShape{U}{zeur}{bx}{n}{<->ssub * zeur/b/n}{} +%</uzeur> +% \end{macrocode} +% +% \subsection{Euler Script} +% \begin{macrocode} +%<*uzeus> +\DeclareFontFamily{U}{zeus}{\skewchar \font =176} +\DeclareFontShape{U}{zeus}{m}{n}{ + <9-> \zeu@@Scale zeusm10 + <6-9> \zeu@@Scale zeusm7 + <-6> \zeu@@Scale zeusm5 +}{} +\DeclareFontShape{U}{zeus}{b}{n}{ + <9-> \zeu@@Scale zeusb10 + <6-9> \zeu@@Scale zeusb7 + <-6> \zeu@@Scale zeusb5 +}{} +\DeclareFontShape{U}{zeus}{bx}{n}{<->ssub * zeus/b/n}{} +%</uzeus> +% \end{macrocode} +% +% \subsection{Euler Extension} +% \begin{macrocode} +%<*uzeuex> +\DeclareFontFamily{U}{zeuex}{} +\DeclareFontShape{U}{zeuex}{m}{n}{ + <-> \zeu@@Scale zeuex10 +}{} +%</uzeuex> +% \end{macrocode} +% +% } +% +% \Finale +% +% \iffalse +% The next line of code prevents DocStrip from adding the +% character table to all modules: +\endinput +% \fi +% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% |