summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/gender/gender.sty
blob: c34c8f64568bb01fff83ae990d9607f7e53544f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
%%
%% This is file `gender.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% gender.dtx  (with options: `package')
%% 
%% This is a generated file.
%% Copyright (C) 2015 by Steffen Banhardt
%% 
%% This file be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c 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.3c or later is part of all distributions
%% of LaTeX version 2005/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{gender}
[2015/03/07 v1.0 First official release]
\RequirePackage{xkeyval}
\DeclareOptionX[GN]<gndr>{konj}[und]{\def\gndr@konj{#1}\PackageInfo{GENDER}{Setting 'gndr@konj' to '#1'}}
\define@boolkey+[GN]{gndr}{single}[true]%
    {\PackageInfo{GENDER}{Setting boolean 'single' to '#1'}}
    {\PackageWarning{GENDER}{Value #1 for 'single' ignored}}
\presetkeys[GN]{gndr}{single=false}{}
\define@boolkey+[GN]{gndr}{malefirst}[true]%
    {\PackageInfo{GENDER}{Setting boolean 'malefirst' to '#1'}}
    {\PackageWarning{GENDER}{Value #1 for 'malefirst' ignored}}
\presetkeys[GN]{gndr}{malefirst=false}{}
\define@boolkey+[GN]{gndr}{fixmale}[true]%
    {\PackageInfo{GENDER}{Setting boolean 'fixmale' to '#1'}}
    {\PackageWarning{GENDER}{Value #1 for 'fixmale' ignored}}
\presetkeys[GN]{gndr}{fixmale=true}{}
\DeclareOptionX*{\PackageWarning{GENDER}{Unknown Option '\CurrentOption'}}
\ProcessOptionsX[GN]<gndr>\relax
\@ifundefined{gndr@konj}{\def\gndr@konj{und}\PackageInfo{GENDER}{Setting 'gndr@konj' to 'und'}}{\relax}%
\newif\iffem\femtrue%female vorne
\newif\ifuc\uctrue%uppercase
\newif\iffixmale\fixmalefalse
\ifGN@gndr@malefirst\global\femfalse\fi
\ifGN@gndr@fixmale\global\fixmaletrue\fi
\def\keep{\iffem\global\femfalse\else\global\femtrue\fi}%
\def\gender#1{\global\ucfalse\ifGN@gndr@single\@gend#1\@nil\else\@gender#1\@nil\fi}%
\def\Gender#1{\global\uctrue\ifGN@gndr@single\@gend#1\@nil\else\@gender#1\@nil\fi}%
\def\gend#1{\global\ucfalse\@gend#1\@nil}%
\def\Gend#1{\global\uctrue\@gend#1\@nil}%
\def\genderb#1{\global\ucfalse\@gender#1\@nil}%
\def\Genderb#1{\global\uctrue\@gender#1\@nil}%
\def\genderk#1{\keep\global\ucfalse\ifGN@gndr@single\@gend#1\@nil\else\@gender#1\@nil\fi}%
\def\Genderk#1{\keep\global\uctrue\ifGN@gndr@single\@gend#1\@nil\else\@gender#1\@nil\fi}%
\def\gendk#1{\keep\global\ucfalse\@gend#1\@nil}%
\def\Gendk#1{\keep\global\uctrue\@gend#1\@nil}%
\def\genderbk#1{\keep\global\ucfalse\@gender#1\@nil}%
\def\Genderbk#1{\keep\global\uctrue\@gender#1\@nil}%
\def\genderfix#1{\global\ucfalse\@genderfix#1\@nil}%
\def\Genderfix#1{\global\uctrue\@genderfix#1\@nil}%
\def\@gender#1(#2)#3\@nil{%
    \if\relax\detokenize{#2}\relax%
    \def\gndr@ko{\gndr@konj}%
    \else\def\gndr@ko{#2}%
    \fi%
    \iffem%
\ifuc\MakeUppercase#1 \else#1 \fi\gndr@ko{} #3%
\global\femfalse%
    \else%
\ifuc\MakeUppercase#3 \else#3 \fi\gndr@ko{} #1%
\global\femtrue%
    \fi%
}
\def\@gend#1(#2)#3\@nil{%
    \iffem%
\ifuc\MakeUppercase#1\else#1\fi%
\global\femfalse%
    \else%
\ifuc\MakeUppercase#3\else#3\fi%
\global\femtrue%
    \fi%
}
\def\@genderfix#1(#2)#3\@nil{%
    \iffixmale%
\ifuc\MakeUppercase#3\else#3\fi%
    \else%
\ifuc\MakeUppercase#1\else#1\fi%
    \fi%
}
\newcommand{\gnd}[2][\gndr@konj]{\gender{#2in(#1)#2}} %Kurzbefehl \gnd[konj]{neutr. Form}
\newcommand{\gndpl}[2][\gndr@konj]{\gender{#2innen(#1)#2}} %Kurzbefehl \gndpl[konj]{neutr. Form}
\newcommand{\sieer}[1][\gndr@konj]{\gender{sie(#1)er}}
\newcommand{\ersie}{\sieer}
\newcommand{\ihrsein}[1][\gndr@konj]{\gender{ihr(#1)sein}}
\newcommand{\seinihr}{\ihrsein}
\newcommand{\ihreseine}[1][\gndr@konj]{\gender{ihre(#1)seine}}
\newcommand{\seineihre}{\ihreseine}
\newcommand{\ihrihm}[1][\gndr@konj]{\gender{ihr(#1)ihm}}
\newcommand{\ihmihr}{\ihrihm}
\newcommand{\sieihn}[1][\gndr@konj]{\gender{sie(#1)ihn}}
\newcommand{\ihnsie}{\sieihn}
\newcommand{\Sieer}[1][\gndr@konj]{\Gender{sie(#1)er}}
\newcommand{\Ersie}{\Sieer}
\newcommand{\Ihrsein}[1][\gndr@konj]{\Gender{ihr(#1)sein}}
\newcommand{\Seinihr}{\Ihrsein}
\newcommand{\Ihreseine}[1][\gndr@konj]{\Gender{ihre(#1)seine}}
\newcommand{\Seineihre}{\Ihreseine}
\newcommand{\Ihrihm}[1][\gndr@konj]{\Gender{ihr(#1)ihm}}
\newcommand{\Ihmihr}{\Ihrihm}
\newcommand{\Sieihn}[1][\gndr@konj]{\Gender{sie(#1)ihn}}
\newcommand{\Ihnsie}{\Sieihn}
\endinput
%%
%% End of file `gender.sty'.