diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:55:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:55:56 +0000 |
commit | 44d5743506d09ed3576840868832d7ee1a763202 (patch) | |
tree | f9d3ed7cb737afbe302922f6e3f29383983ef243 /Master/texmf-dist/source/latex/paresse/english-paresse.dtx | |
parent | de587d62664bc9c125fb8ed97513fd5b322dc7bd (diff) |
trunk/Master/texmf-dist/source/latex/paresse
git-svn-id: svn://tug.org/texlive/trunk@435 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/paresse/english-paresse.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/paresse/english-paresse.dtx | 402 |
1 files changed, 402 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/paresse/english-paresse.dtx b/Master/texmf-dist/source/latex/paresse/english-paresse.dtx new file mode 100644 index 00000000000..9a9490d70e4 --- /dev/null +++ b/Master/texmf-dist/source/latex/paresse/english-paresse.dtx @@ -0,0 +1,402 @@ +% \iffalse meta-comment +% +%%%% Copyright (C) 2004 by Yvon Henel <Yvon.Henel@wanadoo.fr> +%%%% -------------------------------------------------------- +% +% +% This file may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.2 +% 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.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% \fi +% +% \iffalse +%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%<package>\def\fileversion{v1a} +%<package>\def\filedate{2005/03/01} +%<package>\def\fileinfo{file paresse.dtx (English version) by The `\TeX nicien de surface'} +%<package>\ProvidesPackage{paresse} +%<package> [\filedate\space\fileversion\space\fileinfo] +% +%<*driver> +\documentclass[a4paper]{ltxdoc} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[tame]{paresse} +\usepackage{xspace,url,array,ifthen} +\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{} +\usepackage[frenchb,english]{babel} +% comment out the following line to obtain the full code with explanations +\OnlyDescription +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{english-paresse.dtx} +\end{document} +%</driver> +% \fi +% +% \CheckSum{319} +% +% \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 \~} +% +% +% \changes{v0.0}{2004/02/07}{New name, some redefinitions, first public +% release} +% \changes{v1}{2004/04/17}{New documentation} +% \changes{v1a}{2005/03/01}{Error in Infofile corrected} +% +% \GetFileInfo{paresse.sty} +% +% \DoNotIndex{\newcommand,\newenvironment,\i,\ae,\oe,\DeclareOption,% +% \ifthenelse,\if,\else,\fi,\tr@@c,\ExecuteOptions,\ProcessOptions,% +% \relax,\MessageBreak,\CurrentOption,\RequirePackage,\PackageError,% +% \def,\endinput,\let,\boolean,\newboolean,\setboolean,\renewcommand,% +% \afterassignment,\global,\aftergroup,\bgroup,\egroup,\csname,% +% \endcsname,\emph,\catcode,\space,\string,\next,\active,\rmfamily,\rule,% +% \textsl,\upshape, \alpha, \beta, \gamma, \delta, \epsilon, % +% \varepsilon, \zeta, \eta, \theta, \vartheta, \iota, \kappa, % +% \lambda, \mu, \nu, \xi, \pi, \varpi, \rho, \varrho, \sigma, % +% \varsigma, \tau, \upsilon, \phi, \varphi, \chi, \psi, \omega, % +% \Delta, \Gamma, \Theta, \Lambda, \Xi, \Pi, \Sigma, \Upsilon, % +% \Phi, \Psi, \Omega, \newif, \ifnum, \count@, \ensuremath} % +% +% \title{The package \textsf{paresse}\thanks{This document corresponds to the +% file \textsf{paresse}~\fileversion, dated \filedate.}\\ +% English translation by the author\footnote{Any comment about the +% translation is welcome.}} +% \author{Le \TeX nicien de surface\\ \url{Yvon.Henel@wanadoo.fr}} +% +% \maketitle +% \begin{otherlanguage}{french} +% \begin{abstract} +% Ce module, reprenant un exemple de T.~\textsc{Lachand-Robert} +% dans~\cite{tlachand}, fournit un moyen de taper des lettres +% grecques isolées à l'aide du caractère actif et +% redéfini. Au lieu de |\(\alpha\)| ou tape |§a| pour obtenir +% \(\alpha\). +% +% \textbf{Important} : Il doit être chargé \textbf{après} |inputenc| si +% ce dernier est utilisé. De plus, il faut que le signe § soit une lettre +% pour \TeX. +% \end{abstract} +% \end{otherlanguage} +% \begin{abstract} +% This package implements an example from T.~\textsc{Lachand-Robert} +% in~\cite{tlachand}. It provides a means of typing isolated +% greek letters with the character § activated and +% redefined. Instead of |\(\alpha\)| one types |§a| to obtain +% \(\alpha\). +% +% \textbf{Important}: You have to load it \textbf{after} the +% |inputenc| package if the latter is used. Moreover the sign +% § must be a letter for \TeX. +% \end{abstract} +% +% \section{Introduction} +% This is the English version of the |paresse| package. +% +% This package provides only a `quick and low-cost' access to greek letters +% which one can obtain with a macro such as |\alpha| or |\Omega|. It provides +% also an environment and a macro which make possible the use of § to type in +% those letters. Because of an |\ensuremath| we are not bound to explicitly +% enter ---~i.e. by typing |$ $| or |\( \)| or else |\[ \]| or anything +% whatsoever with the same effect~--- mathematics mode to obtain a greek +% letter. +% +% The idea of the method is from T.~\textsc{Lachand-Robert} and described +% in~\cite{tlachand}. I have just add the +% |\ensuremath| which is so agreeable to write macros. +% +% There is \emph{no} macros for the lowercase omicron nor for the uppercase +% alpha, beta... that one can obtain with the latin roman letters with the +% same look. I have not had the courage nor the strength to build a solution +% which would provide a means of obtaining an upright uppercase alpha in a +% math formula enbedded in an italic boldfaced text. +% +% Even if the meaning of the French `paresse' is just `lazyness' I would +% like to enphasize that the name of this package comes from the fact that the +% sign § can be used to point at a paragraph and looks like an S. So there is +% no connection between the name and the not unfrequent sin of the same +% (French) name... or maybe... +% +% \section{Usage} +% +% One loads the package with |\usepackage{paresse}| +% \textbf{after} the package |inputenc|. The sign § must be recognised as a +% letter by \TeX. On can use for instance |inputenc| with option |latin1| for +% such a purpose. +% +% By default the package is loaded with option |wild| and so the macros such +% as |§a| are immediately available. If one prefers one can choose the option +% |tame| by writing +% |\usepackage[tame]{paresse}|. One must then use the +% command |\ActiveLaParesse| or the environment |ParesseActive| +% to use the `§-macros'. +% +% When `paresse' is active, one has just to type |§a| in to obtain +% \(\alpha\). One has access, by the same means, to all the other +% greek letters to which a macro is devoted such as |\alpha|, +% see the table page~\pageref{tableau}. One obtains +% \(\alpha^{\beta}\) with |\(§a^{§b}\)| when § is active. One will +% note that, if the package |amsmath| is loaded, the curly braces are +% \emph{not} compulsory and that one obtains the same result with just +% |\(§a^§b\)|. +% +% \subsection{Options} +% +% \begin{itemize} +% \item |tame| is the contrary of |wild| which is the option by +% default. When |tame| reigns, one \textbf{must} use an environment +% |ParesseActive| or a command |\ActiveLaParesse| in order to +% use the §-macros. +% \item |ttau| is the contrary of |ttheta| which is selected by +% default. When |ttheta| is active |§t| gives \(\theta\) in the +% contrary |§t| gives \(\tau\). In all cases, \(\theta\) +% is given by |§v| and \(\tau\) by |§y|. +% +% \textbf{Remark:} \(\Theta\) is `regularly' obtained with |§V| and +% \emph{also} with |§T| whatever is the chosen option. +% +% \item |epsilon| is the contrary of |varepsilon| which is selected by +% default. With |epsilon|, |§e| gives \(\epsilon\) otherwide |§e| +% gives \(\varepsilon\). +% \item The following `couples' behave as |epsilon|, |varepsilon|: +% |theta| and |vartheta|; |pi| and |varpi|; |rho| +% and |varrho|; |sigma| and |varsigma|; |phi| and |varphi|. +% +% The default options are |theta|, |pi|, |rho|, |sigma| and |varphi|. +% \end{itemize} +% +% \subsection{Commands and environment} +% \DescribeMacro{\makeparesseletter} +% This command gives the letter-catcode to the `character' §. After that one +% can use § in the name of a macro, for instance. It corresponds to the +% well-known |\makeatletter|. +% +% \DescribeMacro{\makeparesseother} +% This macro gives the catcode \emph{other} to the character §. It is the +% `contrary' of the preceding one. It corresponds to |\makeatother|. +% +% \DescribeMacro{\ActiveLaParesse} +% This macro makes § active and thus enable one to access the macros the name +% of which begins with § such as |§a|. A list of these macros and theirs +% meanings is given in the table~\pageref{tableau}. +% +% \DescribeEnv{ParesseActive} +% In this environment § is active and one can use the §-macros. One could use +% this environment if one want to use the §-macros when the package +% \texttt{paresse.sty} is loaded whith the option \texttt{tame}. +% +% +% \subsection{Table of the §-macros} +% +% \begin{center}\Large +% \begin{ParesseActive} \label{tableau} +% \begin{tabular}{*4{||>{\ttfamily \§}c| c}||}\hline +% a & §a & b & §b & g & §g & d & §d\\ \hline +% e & §e & z & §z & h & §h & v & §v\\ \hline +% i & §i & k & §k & l & §l & m & §m\\ \hline +% n & §n & x & §x & p & §p & r & §r\\ \hline +% s & §s & y & §y & u & §u & f & §f\\ \hline +% c & §c & q & §q & w & §w &\multicolumn{1}{ c|}{} & \\ \hline\hline +% G & §G & D & §D & V & §V & L & §L\\ \hline +% X & §X & P & §P & S & §S & U & §U\\ \hline +% F & §F & Q & §Q & W & §W &\multicolumn{1}{ c|}{} & \\ \hline +% \end{tabular} +% \end{ParesseActive} +% \end{center} +% +% \paragraph{Remarks : } all the latin letters used in the name of the +% §-macros, but for {\ActiveLaParesse §v, §y and §q}, are loaded with +% reminiscences, I hope \texttt{:-)} and the greek uppercases are obtained +% with the (latin) corresponding uppercases. +% +% \StopEventually{ +% \selectlanguage{french} +% \begin{thebibliography}{99} +% \addcontentsline{toc}{section}{Bibliographie} +% \bibitem{tlachand} T.~\textsc{Lachand-Robert}. +% \emph{La maîtrise de \TeX{} et \LaTeX{}}. +% Masson, Paris, Milan, Barcelone, \oldstylenums{1995}.\\ +% \textsc{isbn} : \texttt{2-225-84832-7}. +% \end{thebibliography} +% \PrintChanges \PrintIndex} +% +% \section{Implementation} +% There is almost no comment in the code. I hope it is clear enough moreover +% it largely looks like the code of the package |engpron| from the same +% \emph{author}. +% +% Here I use a lot of |\def| to grab the redefinitions of the macros done by +% packages such as |fourier|\footnote{Many thanks to Michel \textsc{Bovani} +% for his precious advice on \url{fr.comp.text.tex}.}. +% +% The package says `hello'. Some booleans are defined and default values are +% set. Options are cared for and the package yells if one option is not valid. +% \begin{macrocode} +\newif\if@optiontame \newif\if@optiontau \newif\if@optionvareps +\newif\if@optionvartheta \newif\if@optionvarrho \newif\if@optionvarsigma +\newif\if@optionvarphi \newif\if@optionvarpi +% +\DeclareOption{tame}{\@optiontametrue} +\DeclareOption{wild}{\@optiontamefalse} +\DeclareOption{ttau}{\@optiontautrue} +\DeclareOption{ttheta}{\@optiontaufalse} +\DeclareOption{varepsilon}{\@optionvarepstrue} +\DeclareOption{epsilon}{\@optionvarepsfalse} +\DeclareOption{vartheta}{\@optionvarthetatrue} +\DeclareOption{theta}{\@optionvarthetafalse} +\DeclareOption{varrho}{\@optionvarrhotrue} +\DeclareOption{rho}{\@optionvarrhofalse} +\DeclareOption{varpi}{\@optionvarpitrue} +\DeclareOption{pi}{\@optionvarpifalse} +\DeclareOption{varsigma}{\@optionvarsigmatrue} +\DeclareOption{sigma}{\@optionvarsigmafalse} +\DeclareOption{varphi}{\@optionvarphitrue} +\DeclareOption{phi}{\@optionvarphifalse} +% +\DeclareOption{defaut}{\@optiontamefalse \@optionvarepstrue + \@optionvarthetafalse \@optionvarrhofalse \@optionvarsigmafalse + \@optionvarpifalse \@optionvarphitrue \@optiontaufalse} +% +\DeclareOption*{\PackageError{paresse}{% + The option \CurrentOption\space is not known!\MessageBreak + The default options are `wild' and `theta'.}% + {Choose between `wild' (for an active Paresse in all the + document) \MessageBreak and `tame' (so that § prints + the paragraph symbol). \MessageBreak Choose between ` + theta' (for §t to give theta) \MessageBreak and `tau' (for §t to give + tau).}} \ExecuteOptions{defaut} +\ProcessOptions\relax +% \end{macrocode} +% The current catcode and definition of § are saved. +% \begin{macrocode} +\count@=\catcode`\§ +\let\GA@LaVieilleParesse= § +% \end{macrocode} +% A macro is defined to obtain the character itself. It could happen to be +% usefull, maybe... +% \begin{macrocode} +\def\§{\S} +% \end{macrocode} +% Some more or less `hidden' macros are defined. The contorsions are +% required in order not to make \TeX\ yell something as vulgar as +% |\inaccessible|. +% \begin{macrocode} +\newcommand{\makeparesseletter}{\catcode `\§=11\relax} +\newcommand{\makeparesseother}{\catcode `\§=12\relax} +\newcommand{\GA@MakeParesseActive}{\catcode `\§=\active} +\def\GA@ActiveLaParessexii{\catcode `\§=\active} +\def\GA@ActiveLaParessexiii{\catcode `\§=\active + \def§##1{\ensuremath{\csname \string§##1\endcsname}}} +\ifnum\count@=12 +\let\GA@ActiveLaParesse \GA@ActiveLaParessexii +\else +\let\GA@ActiveLaParesse \GA@ActiveLaParessexiii +\fi +% \end{macrocode} +% The usefull macro then \emph{the} environment. They both use +% the \emph{hidden} macro which follows. +% \begin{macro}{\ActiveLaParesse} +% \begin{macrocode} +\newcommand{\ActiveLaParesse}{\GA@ActiveLaParesse} +% \end{macrocode} +% \end{macro} +% \begin{environment}{ParesseActive} +% \begin{macrocode} +\newenvironment{ParesseActive}{\GA@ActiveLaParesse}{} +% \end{macrocode} +% \end{environment} +% \begin{macro}{\GA@ActiveL@P@resse} +% \begin{macrocode} +\newcommand{\GA@ActiveL@P@resse}{\catcode `\§=\active% + \def§##1{\ensuremath{\csname \string§##1\endcsname}}} +% \end{macrocode} +% \end{macro} +% A sequence of macros for the letters with variants. +% \begin{macrocode} +\if@optionvareps \def\@epsilon {\varepsilon} + \else \def\@epsilon {\epsilon} \fi +\if@optionvartheta \def\@theta {\vartheta} + \else \def\@theta {\theta} \fi +\if@optionvarpi \def\@pi {\varpi} + \else \def\@pi {\pi} \fi +\if@optionvarrho \def\@rho {\varrho} + \else \def\@rho {\rho} \fi +\if@optionvarsigma \def\@sigma {\varsigma} + \else \def\@sigma {\sigma} \fi +\if@optionvarphi \def\@phi {\varphi} + \else \def\@phi {\phi} \fi +% \end{macrocode} +% § becomes a \TeX-letter and I define macros whith the help of +% |\def\§...|. Before going to uppercases, I take care of the +% letter t (options |ttau| and |ttheta|). +% \begin{macrocode} +\makeparesseletter +%%% lowercase +\def\§a {\alpha} \def\§b {\beta} +\def\§g {\gamma} \def\§d {\delta} +\def\§e {\@epsilon} \def\§z {\zeta} +\def\§h {\eta} \def\§v {\@theta} +\def\§i {\iota} \def\§k {\kappa} +\def\§l {\lambda} \def\§m {\mu} +\def\§n {\nu} \def\§x {\xi} +\def\§p {\@pi} +\def\§r {\@rho} \def\§s {\@sigma} +\def\§y {\tau} \def\§u {\upsilon} +\def\§f {\@phi} \def\§c {\chi} +\def\§q {\psi} \def\§w {\omega} +% +\if@optiontau \def\§t {\tau}\else \def\§t {\@theta}\fi +% +%%% uppercase +\def\§G {\Gamma} \def\§D {\Delta} +\def\§V {\Theta} \def\§T {\Theta} +\def\§L {\Lambda} \def\§X {\Xi} +\def\§P {\Pi} \def\§S {\Sigma} +\def\§U {\Upsilon} \def\§F {\Phi} +\def\§Q {\Psi} \def\§W {\Omega} +% \end{macrocode} +% § is made active and the §-macros are defined. +% \begin{macrocode} +\catcode `\§=\active +\def§#1{\ensuremath{\csname \string§#1\endcsname}} +% \end{macrocode} +% If |tame| has been set, § is given its previous state and the package +% finishes. +% \begin{macrocode} +\if@optiontame +\catcode`\§=\count@ +\ifnum\count@=13 \let §=\GA@LaVieilleParesse \fi +\fi +\endinput +% \end{macrocode} +% \Finale +\endinput + +%%% Local Variables: +%%% mode: latex +%%% coding: iso-8859-15 +%%% TeX-master: t +%%% End: |