% \iffalse % % $Id: euroitc.dtx,v 1.2 2007-01-26 03:02:15+02 schlicht Exp schlicht $ % % Package `euroitc' to use the ITC euro symbols with LaTeX2e % Copyright (c) 2003--2007 R Schlicht % % This work may be distributed and/or modified under the conditions of % the LaTeX Project Public License, either version 1.3 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.3 or later % is part of all distributions of LaTeX version 2003/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % This program consists of the files euroitc.dtx and euroitc.ins and the % derived file euroitc.sty. % % ---------------------------------------------------------------------------- %<*driver> \ProvidesFile{euroitc.dtx}% % %\ProvidesFile{testeuroitc.tex}% %\ProvidesPackage{euroitc}% [2007/01/24 v1.1a using the ITC euro fonts (RS)] %<*driver> \documentclass[a4paper]{ltxdoc} \usepackage{array} \usepackage{booktabs} \usepackage{euroitc} \usepackage{ifpdf} \ifpdf\usepackage[colorlinks,hyperindex=false,hyperfootnotes=false]{hyperref}\fi \nonfrenchspacing \GetFileInfo{euroitc.dtx} \begin{document} \DocInput{euroitc.dtx} \end{document} % % % \fi % % ^^A ------------------------------------------------------------------------- %\changes{v1.0}{2003/08/18}{Initial version} %\changes{v1.1}{2005/01/24}{added samples} %\changes{v1.1a}{2007/01/24}{updated ITC link} % ^^A ------------------------------------------------------------------------- %\DoNotIndex{\csname,\def,\do,\edef,\else,\endcsname,\fi,\let,\newif,\noexpand,\relax} %\DoNotIndex{\@classoptionslist,\@currext,\@currname,\@empty,\@for,\@ifundefined} %\DoNotIndex{\@ptionlist,\@tempc,\@unprocessedoptions} %\DoNotIndex{\AtEndOfPackage,\CurrentOption,\DeclareRobustCommand,\MessageBreak} %\DoNotIndex{\NeedsTeXFormat,\PackageWarningNoLine,\RequirePackage} %\DoNotIndex{\equal,\ifthenelse} %\DoNotIndex{\setkeys,\define@key,\ProcessOptionsWithKV} % ^^A ------------------------------------------------------------------------- % % \title{The \texttt{euroitc} package to use\\the ITC euro symbols with \LaTeX2e} % \author{R Schlicht\\{\ttfamily w.m.l@gmx.net}} % \date{\fileversion\ -- \filedate} % \maketitle % \tableofcontents % % \bigskip % \section{The ITC Euro Symbol Fonts} % There already exists a variety of possibilities to typeset the euro % symbol\footnote{ % With the following packages, at least: |europs|, |eurosans| (using the % free Adobe fonts), |eurosym|, |marvosym|, |china2e|, and of course % |textcomp|; |eurofont| tries to combine all these packages.} % -- some are better, some are worse (and the default |\texteuro| is the % worst~\dots). % % This package provides an interface to yet another set of euro symbols, which % is available for free from the International Typeface Corporation\footnote{% % \url{http://www.itcfonts.com/}}. % % This set contains of 16 distinct symbols; they cover a range of four weights: % Book (i.\,e., regular), Medium, Bold and Black (extra bold), and are provided % in upright and italic shapes. There are serif and sans serif variants of % each of the weights and shapes. % % None of these symbols conforms to the official design of the European % Community, but in my opinion they have a less obtrusive appearance. % Especially the seriffed variant looks more elegant to me than Adobe's % version. % % Table \ref{tab:samples} presents all euro symbols included in the font sets % from ITC. % %\begin{table}\centering %\newcommand{\showeuro}[2]{#1 ({\ttfamily#2}) & % \usefont{U}{euroitc} {#2}{n}\euro\ \textit{\euro} & % \usefont{U}{euroitcs}{#2}{n}\euro\ \textit{\euro} \\} %\begin{tabular}{@{}l*2{p{4.5em}<{\centering}}} %\toprule\addlinespace % \itshape Weight & \itshape Serif & \itshape Sans Serif\\ %\cmidrule(r){1-1}\cmidrule(rl){2-2}\cmidrule(l){3-3} % \showeuro{Book} {m} % \showeuro{Medium}{mb} % \showeuro{Bold} {b} % \showeuro{Black} {eb} %\bottomrule %\end{tabular} %\caption{Samples of ITC euro symbols} %\label{tab:samples} %\end{table} % %\section{Installation} % To install the ITC euro fonts, follow these steps: % \begin{enumerate} % \item Run \LaTeX\ on |euroitc.ins| and move |euroitc.sty| into a directory % where \TeX\ will find it (e.\,g. |tex/latex/euroitc|). % \item Move all |.tfm| files into a directory where \TeX\ expects font % metrics (e.\,g. |fonts/tfm/ITC/Euro|). % \item Download the font packages from ITC.\footnote{\url{http://www.itcfonts.com/About/Euro.htm}} % The PC versions consists of two self-extracting |.exe| files; these % can also be extracted using a standard |unzip| programme. For % installation on a Unix-oid system, download the PC versions. % \item Move all |.pfb| files from these archives to the directory % |fonts/type1/ITC/Euro| and all |.afm| files to the directory % |fonts/afm/ITC/Euro| of the \TeX MF tree.\par % All other files you obtained are irrelevant for \TeX\ and can be % trashed (or recycled for the non-\TeX\ world). % \item Add either of the map files |euroitc.map| or |euroitc-origname.map| % to the PS font map file(s). How to do this depends on your \TeX\ % system, and you should consult its local guide. % \item If you are using the map file |euroitc.map|, you also have to rename % all |.pfb| files according to this scheme:\par %\begingroup\ttfamily\small % \catcode`_13\def\_{\textunderscore} %\begin{tabular}{@{}l|ll} % \textrm{\textit{(PC name)}} & \textrm{\textit{(Mac name)}} &\\ % EURSFW__.PFB & EuroSerITCBoo \qquad\textrm{\textit{to}}: & zieuk.pfb\\ % EURSFWI_.PFB & EuroSerITCBooIta & zieuki.pfb \\ % EURSFM__.PFB & EuroSerITCMed & zieum.pfb \\ % EURSFMI_.PFB & EuroSerITCMedIta & zieumi.pfb \\ % EURSFB__.PFB & EuroSerITCBol & zieub.pfb \\ % EURSFBI_.PFB & EuroSerITCBolIta & zieubi.pfb \\ % EURSFBL_.PFB & EuroSerITCBla & zieuc.pfb \\ % EURSFBLI.PFB & EuroSerITCBlaIta & zieuci.pfb \\ % EURSNW__.PFB & EuroSanITCBoo & zieuks.pfb \\ % EURSNWI_.PFB & EuroSanITCBooIta & zieukis.pfb\\ % EURSNM__.PFB & EuroSanITCMed & zieums.pfb \\ % EURSNMI_.PFB & EuroSanITCMedIta & zieumis.pfb\\ % EURSNB__.PFB & EuroSanITCBol & zieubs.pfb \\ % EURSNBI_.PFB & EuroSanITCBolIta & zieubis.pfb\\ % EURSNBL_.PFB & EuroSanITCBla & zieucs.pfb \\ % EURSNBLI.PFB & EuroSanITCBlaIta & zieucis.pfb %\end{tabular}\endgroup\par % and likewise all |.afm| files. % \item Update the file name database. % \end{enumerate} % You can test the installation by running \LaTeX\ on the file |testeuroitc.tex|. % % \section{Usage} % % Using the |euroitc| package is as simple as this: %\begin{verbatim} % \usepackage{euroitc} % ... % \euro %\end{verbatim} % % \subsection{Options} % % The shape of the euro symbol will correspond to the shape of the current % font~-- i.\,e., in the context of a seriffed font, the euro symbol will be % seriffed, too, while in the context of a sanserif font, it will be sanserif. % You can change this with the following two options: %\begin{description} % \item[sans] % will always use the sans serif symbols, no matter what the current % font is. (In the early days of the euro, this was recommended by the % EC; nowadays, they have yielded to the practice and aesthetics of % typography.) % \item[serif] % will always use the serif symbols, no matter what the current font is. %\end{description} % While the symbols match in size with the Computer Modern font, other fonts % might appear bigger or smaller; therefore, the %\begin{description} % \item[scaled] % option has been introduced. If called without an argument, it will % scale the symbols to 95\% of their size. If you want to scale them at % a different ratio, call the option as: |scale=|\meta{ratio}, e.\,g. % |scale=1.05|. %\end{description} % When using a font with a bolder semblance than the Computer Modern font % (Utopia for instance), you may want to use the following option: %\begin{description} % \item[bolder] will use the Medium series instead of the Book series as the % normal weight. All other weights will be defined accordingly: % % \begin{tabular}{@{}>{\ttfamily}lll} % \textrm{\itshape NFSS code} & \itshape default & \itshape |bolder| option\\ % \hline\\[-.75em] % l & -- & Book\\ % m & Book & Medium\\ % mb & Medium & Bold\\ % b & Bold & Black\\ % eb & Black & -- % \end{tabular} % \end{description} % % \subsection{Typesetting the euro symbol} % \DescribeMacro{\euro} % To typeset the euro symbol, type |\euro|. % % If the euro symbol is defined in the input encoding you are using (e.\,g. % |ansinew|, |latin9|), you might also want to add the line %\begin{verbatim} % \let\texteuro\euro %\end{verbatim} % to your preamble, so that you are able to produce the euro symbol by simply % pressing the euro symbol key on your keyboard. % % Should this prove necessary, you can also typeset the sanserif variants % (regardless of any options or the current font family) by typing % \DescribeMacro{\sanseuro}|\sanseuro|; % to typeset the seriffed variants, use \DescribeMacro{\serifeuro}|\serifeuro|. % % \StopEventually{} % % ^^A ------------------------------------------------------------------------- % % \section{Implementation} % \subsection{Options} % % \begin{macrocode} %<*package> \NeedsTeXFormat{LaTeX2e} \RequirePackage{keyval} \RequirePackage{ifthen} \newif\ifEuroitc@sans \newif\ifEuroitc@serif \newif\ifEuroitc@bolder \define@key{Euroitc}{sans}[true]{\csname Euroitc@sans#1\endcsname} \define@key{Euroitc}{serif}[true]{\csname Euroitc@serif#1\endcsname} \define@key{Euroitc}{bolder}[true]{\csname Euroitc@bolder#1\endcsname} \let\euroitc@@Scale\@empty \define@key{Euroitc}{scaled}[.95]{\def\euroitc@@Scale{s*[#1]}} \def\ProcessOptionsWithKV#1{% \let\@tempc\relax \let\Euroitc@tempa\@empty \@for\CurrentOption:=\@classoptionslist\do{% \@ifundefined{KV@#1@\CurrentOption}% {}% {\edef\Euroitc@tempa{\Euroitc@tempa,\CurrentOption,}}% }% \edef\Euroitc@tempa{% \noexpand\setkeys{#1}{% \Euroitc@tempa\@ptionlist{\@currname.\@currext}% }% }% \Euroitc@tempa } \ProcessOptionsWithKV{Euroitc} \AtEndOfPackage{\let\@unprocessedoptions\relax} \ifEuroitc@serif\ifEuroitc@sans \PackageWarningNoLine{euroitc}{% You cannot use both options `sans' and `serif' at the\MessageBreak same time! I will pretend you meant to say nothing}% \Euroitc@seriffalse \Euroitc@sansfalse \fi\fi % \end{macrocode} % % \subsection{Font families} % % The ITC euro symbols are provided in four series (weights), each of them in % upright and italic. We will declare two sets of families: One, in which the % `Medium' weight is the default, and one, which uses the `Book' weight as % |mddefault|. First the bolder sets: % \begin{macrocode} \ifEuroitc@bolder \DeclareFontFamily{U}{euroitcs}{} \DeclareFontShape{U}{euroitcs}{l} {n} {<-> \euroitc@@Scale zieuks}{} \DeclareFontShape{U}{euroitcs}{l} {it}{<-> \euroitc@@Scale zieukis}{} \DeclareFontShape{U}{euroitcs}{l} {sl}{<->ssub * euroitcs/l/it}{} \DeclareFontShape{U}{euroitcs}{m} {n} {<-> \euroitc@@Scale zieums}{} \DeclareFontShape{U}{euroitcs}{m} {it}{<-> \euroitc@@Scale zieumis}{} \DeclareFontShape{U}{euroitcs}{m} {sl}{<->ssub * euroitcs/m/it}{} \DeclareFontShape{U}{euroitcs}{mb}{n} {<-> \euroitc@@Scale zieubs}{} \DeclareFontShape{U}{euroitcs}{mb}{it}{<-> \euroitc@@Scale zieubis}{} \DeclareFontShape{U}{euroitcs}{mb}{sl}{<->ssub * euroitcs/mb/it}{} \DeclareFontShape{U}{euroitcs}{b} {n} {<-> \euroitc@@Scale zieucs}{} \DeclareFontShape{U}{euroitcs}{b} {it}{<-> \euroitc@@Scale zieucis}{} \DeclareFontShape{U}{euroitcs}{b} {sl}{<->ssub * euroitcs/b/it}{} \DeclareFontShape{U}{euroitcs}{bx}{n} {<->ssub * euroitcs/b/n}{} \DeclareFontShape{U}{euroitcs}{bx}{sl}{<->ssub * euroitcs/b/it}{} \DeclareFontShape{U}{euroitcs}{bx}{it}{<->ssub * euroitcs/b/it}{} \DeclareFontShape{U}{euroitcs}{eb}{n} {<->sub * euroitcs/b/n}{} \DeclareFontShape{U}{euroitcs}{eb}{it}{<->sub * euroitcs/b/it}{} \DeclareFontShape{U}{euroitcs}{eb}{sl}{<->ssub * euroitcs/eb/it}{} \DeclareFontFamily{U}{euroitc}{} \DeclareFontShape{U}{euroitc} {l} {n} {<-> \euroitc@@Scale zieuk}{} \DeclareFontShape{U}{euroitc} {l} {it}{<-> \euroitc@@Scale zieuki}{} \DeclareFontShape{U}{euroitc} {l} {sl}{<->ssub * euroitc/l/it}{} \DeclareFontShape{U}{euroitc} {m} {n} {<-> \euroitc@@Scale zieum}{} \DeclareFontShape{U}{euroitc} {m} {it}{<-> \euroitc@@Scale zieumi}{} \DeclareFontShape{U}{euroitc} {m} {sl}{<->ssub * euroitc/m/it}{} \DeclareFontShape{U}{euroitc} {mb}{n} {<-> \euroitc@@Scale zieub}{} \DeclareFontShape{U}{euroitc} {mb}{it}{<-> \euroitc@@Scale zieubi}{} \DeclareFontShape{U}{euroitc} {mb}{sl}{<->ssub * euroitc/mb/it}{} \DeclareFontShape{U}{euroitc} {b} {n} {<-> \euroitc@@Scale zieuc}{} \DeclareFontShape{U}{euroitc} {b} {it}{<-> \euroitc@@Scale zieuci}{} \DeclareFontShape{U}{euroitc} {b} {sl}{<->ssub * euroitc/b/it}{} \DeclareFontShape{U}{euroitc} {bx}{n} {<->ssub * euroitc/b/n}{} \DeclareFontShape{U}{euroitc} {bx}{sl}{<->ssub * euroitc/b/it}{} \DeclareFontShape{U}{euroitc} {bx}{it}{<->ssub * euroitc/b/it}{} \DeclareFontShape{U}{euroitc} {eb}{n} {<->sub * euroitc/b/n}{} \DeclareFontShape{U}{euroitc} {eb}{it}{<->sub * euroitc/b/it}{} \DeclareFontShape{U}{euroitc} {eb}{sl}{<->ssub * euroitc/eb/it}{} % \end{macrocode} % Otherwise the default: % \begin{macrocode} \else \DeclareFontFamily{U}{euroitcs}{} \DeclareFontShape{U}{euroitcs}{l} {n} {<->sub * euroitcs/m/n}{} \DeclareFontShape{U}{euroitcs}{l} {it}{<->sub * euroitcs/m/it}{} \DeclareFontShape{U}{euroitcs}{l} {sl}{<->ssub * euroitcs/l/it}{} \DeclareFontShape{U}{euroitcs}{m} {n} {<-> \euroitc@@Scale zieuks}{} \DeclareFontShape{U}{euroitcs}{m} {it}{<-> \euroitc@@Scale zieukis}{} \DeclareFontShape{U}{euroitcs}{m} {sl}{<->ssub * euroitcs/m/it}{} \DeclareFontShape{U}{euroitcs}{mb}{n} {<-> \euroitc@@Scale zieums}{} \DeclareFontShape{U}{euroitcs}{mb}{it}{<-> \euroitc@@Scale zieumis}{} \DeclareFontShape{U}{euroitcs}{mb}{sl}{<->ssub * euroitcs/mb/it}{} \DeclareFontShape{U}{euroitcs}{b} {n} {<-> \euroitc@@Scale zieubs}{} \DeclareFontShape{U}{euroitcs}{b} {it}{<-> \euroitc@@Scale zieubis}{} \DeclareFontShape{U}{euroitcs}{b} {sl}{<->ssub * euroitcs/b/it}{} \DeclareFontShape{U}{euroitcs}{bx}{n} {<->ssub * euroitcs/b/n}{} \DeclareFontShape{U}{euroitcs}{bx}{sl}{<->ssub * euroitcs/b/it}{} \DeclareFontShape{U}{euroitcs}{bx}{it}{<->ssub * euroitcs/b/it}{} \DeclareFontShape{U}{euroitcs}{eb}{n} {<-> \euroitc@@Scale zieucs}{} \DeclareFontShape{U}{euroitcs}{eb}{it}{<-> \euroitc@@Scale zieucis}{} \DeclareFontShape{U}{euroitcs}{eb}{sl}{<->ssub * euroitcs/eb/it}{} \DeclareFontFamily{U}{euroitc}{} \DeclareFontShape{U}{euroitc}{l} {n} {<->sub * euroitc/m/n}{} \DeclareFontShape{U}{euroitc}{l} {it}{<->sub * euroitc/m/it}{} \DeclareFontShape{U}{euroitc}{l} {sl}{<->ssub * euroitc/l/it}{} \DeclareFontShape{U}{euroitc}{m} {n} {<-> \euroitc@@Scale zieuk}{} \DeclareFontShape{U}{euroitc}{m} {it}{<-> \euroitc@@Scale zieuki}{} \DeclareFontShape{U}{euroitc}{m} {sl}{<->ssub * euroitc/m/it}{} \DeclareFontShape{U}{euroitc}{mb}{n} {<-> \euroitc@@Scale zieum}{} \DeclareFontShape{U}{euroitc}{mb}{it}{<-> \euroitc@@Scale zieumi}{} \DeclareFontShape{U}{euroitc}{mb}{sl}{<->ssub * euroitc/mb/it}{} \DeclareFontShape{U}{euroitc}{b} {n} {<-> \euroitc@@Scale zieub}{} \DeclareFontShape{U}{euroitc}{b} {it}{<-> \euroitc@@Scale zieubi}{} \DeclareFontShape{U}{euroitc}{b} {sl}{<->ssub * euroitc/b/it}{} \DeclareFontShape{U}{euroitc}{bx}{n} {<->ssub * euroitc/b/n}{} \DeclareFontShape{U}{euroitc}{bx}{sl}{<->ssub * euroitc/b/it}{} \DeclareFontShape{U}{euroitc}{bx}{it}{<->ssub * euroitc/b/it}{} \DeclareFontShape{U}{euroitc}{eb}{n} {<-> \euroitc@@Scale zieuc}{} \DeclareFontShape{U}{euroitc}{eb}{it}{<-> \euroitc@@Scale zieuci}{} \DeclareFontShape{U}{euroitc}{eb}{sl}{<->ssub * euroitc/eb/it}{} \fi % \end{macrocode} % % \subsection{User Commands} % %\begin{macro}{\sanseuro} %\begin{macro}{\serifeuro} % The sanserif and seriffed variants of the Euro symbols will always be % available as |\sanseuro| resp.\ |\serifeuro|: % \begin{macrocode} \DeclareRobustCommand*{\sanseuro}{% {\fontencoding{U}\fontfamily{euroitcs}\selectfont E}% } \DeclareRobustCommand*{\serifeuro}{% {\fontencoding{U}\fontfamily{euroitc}\selectfont E}% } % \end{macrocode} %\end{macro} %\end{macro} %\begin{macro}{\euro} % Finally the macro that will actually typeset the euro symbol, depending on the % current font and the package options: % \begin{macrocode} \DeclareRobustCommand*{\euro}{% \ifthenelse{\equal{\f@family}{\rmdefault}}% {\ifEuroitc@sans\sanseuro\else\serifeuro\fi}% {\ifEuroitc@serif\serifeuro\else\sanseuro\fi}% } % % \end{macrocode} % \end{macro} % % ^^A ------------------------------------------------------------------------- % % \section{Testing the Installation} % %\makeatletter %\let\special@index\@gobble ^^A don't bother indexing the following %\makeatother % \begin{macrocode} %<*test> \documentclass{article} \usepackage{euroitc} \newcommand{\showeuro}[2]{#1 ({\ttfamily#2}) & \usefont{U}{euroitc} {#2}{n}\euro\ \textit{\euro} & \usefont{U}{euroitcs}{#2}{n}\euro\ \textit{\euro} \\} \begin{document} \centering {\LARGE Testing the {\ttfamily euroitc} package\par} \bigskip \begin{tabular}{lll} Weight & Serif & Sans Serif\\ \hline\\[-1em] \showeuro{Book} {m} \showeuro{Medium}{mb} \showeuro{Bold} {b} \showeuro{Black} {eb} \end{tabular} \end{document} % % \end{macrocode} % % ^^A ------------------------------------------------------------------------- % % \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 \~} % % \CheckSum{236} % % \Finale % \endinput %