diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:54:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:54:36 +0000 |
commit | 3ae22149de526b60ca4f84b163189bb575f857f2 (patch) | |
tree | 53c4f50a5ab28dc05753d1e197a81973b754ba9f /Master | |
parent | c75be2f02e012b1a8ccd57e540c78bcfeb0d9a42 (diff) |
eemeir
git-svn-id: svn://tug.org/texlive/trunk@848 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/tex/latex/eemeir/eemeir.sty | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/eemeir/eemeir.sty b/Master/texmf-dist/tex/latex/eemeir/eemeir.sty new file mode 100644 index 00000000000..680c6d75b60 --- /dev/null +++ b/Master/texmf-dist/tex/latex/eemeir/eemeir.sty @@ -0,0 +1,93 @@ +%% +%% This is file `eemeir.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% eemeir.dtx (with options: `package') +%% The eemeir package +%% Copyright 2003 by Mogens Lemvig Hansen +%% mlhansen@uniserve.com +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{eemeir}[2003/4/22 v1.0 E-Em-Eir package] +\newcommand{\@eemeir}{\relax} +\newcommand{\@eemeirM}{\relax} +\newcommand{\@eemeirF}{\relax} +\DeclareOption{male} {\def\@eemeir{\male[]}} +\DeclareOption{female}{\def\@eemeir{\female[]}} +\DeclareOption{ask} {\def\@eemeir{\askforgender[]}} +\ExecuteOptions{ask} +\ProcessOptions +\RequirePackage{xspace} +\newcommand{\male}[1][]{% + \@bsphack + \@ifundefined{ifmale#1} + {\expandafter\newif\csname ifmale#1\endcsname} + {\relax}% + \csname male#1true\endcsname + \@esphack} +\newcommand{\female}[1][]{% + \@bsphack + \@ifundefined{ifmale#1} + {\expandafter\newif\csname ifmale#1\endcsname} + {\relax}% + \csname male#1false\endcsname + \@esphack} +\newcommand{\askforgender}[1][]{% + \@bsphack + \@ifundefined{ifmale#1} + {\expandafter\newif\csname ifmale#1\endcsname} + {\relax}% + \def\@eemeir{#1}% + \ifx\@eemeir\@empty\def\@eemeir{main}\fi + \typein[\@eemeir]{Specify the \@eemeir\space gender:% + \space\space male\space\space or\space\space female}% + \def\@eemeirM{male}% + \def\@eemeirF{female}% + \ifx\@eemeir\@eemeirM\male[#1]% + \else\ifx\@eemeir\@eemeirF\female[#1]% + \else\PackageError{eemeir} + {I'll ignore that} + {You should have typed either\space\space male\space\space + or\space\space female}% + \fi\fi + \@esphack +} +\newenvironment{swapgender}[1][]{% + \@bsphack + \@ifundefined{ifmale#1} + {\PackageError{eemeir}{unknown gender: #1} + {You must set the #1 gender with \string\male\space + (or...) first.}} + {\csname ifmale#1\endcsname\csname male#1false\endcsname + \else\csname male#1true\endcsname\fi}% + \@esphack} + {\@bsphack\@Esphack} +\newcommand{\newwordpair} {\@newwordpair\newcommand} +\newcommand{\renewwordpair}{\@newwordpair\renewcommand} +\newcommand{\@newwordpair}[4]{% + #1{#2}{\@ifstar + {\def\@eemeirM{\MakeUppercase#3}% + \def\@eemeirF{\MakeUppercase#4}% + \@eemeirword} + {\def\@eemeirM{#3}% + \def\@eemeirF{#4}% + \@eemeirword}}% +} +\newcommand{\@eemeirword}[1][]{% + \@ifundefined{ifmale#1} + {\PackageWarning{eemeir} + {You should set the #1 gender before using\MessageBreak it}% + \askforgender[#1]} + {\relax}% + \csname ifmale#1\endcsname\@eemeirM\else\@eemeirF\fi + \xspace +} +\newwordpair{\E}{he}{she} +\newwordpair{\Em}{him}{her} +\newwordpair{\Eir}{his}{her} +\newwordpair{\Eirs}{his}{hers} +\@eemeir +\endinput +%% +%% End of file `eemeir.sty'. |