summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/he-she/he-she.sty
blob: be39aad6b0bcea113066eb70bc6c9d56c68acff3 (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
% This package implements a version of semi-automatic pronoun switching for writing
% gender-neutral (and possibly annoying) prose.
% The basic code is due to Josef (no last name) and Martin Scharrer on
% http://tex.stackexchange.com/questions/10787/
%
% Modified to handle anaphoric reference to the current gender plus
% all three case forms in both uppercase and lowercase.
% Includes an option to flag to turn off xspace, and a silly option for replacing
% all pronouns with 'they/them/their'.
%
% Copyright 2011 by Alan Munn
%
% This package may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or 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 2005/12/01 or later.
%
% This package has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this package is Alan Munn.
%
% This package consists of the file he-she.sty and documentation files
% he-she.tex and he-she.pdf
%
% Version 1.0 2011/02/13
%
% Option noxspace
%
% xspace can cause problems if the macro is e.g. enclosed in other markup such
% as \emph{}.  The noxspace option turns off the xspace and forces users to 
% insert a following space using "\ " explicitly.  Default is to enable xspace.
%
% With the default option, the \xspace can be suppressed with the \xspacefalse
% command as needed.
%
% Option they
%
% When you get tired of the silliness of alternating genders, you can switch to
% this option, which will replace all of the relevant pronouns with the third
% person plural pronoun form ('they/them/their').  Note that for the nominative
% this will cause your document to produce ungrammatical text, since there is 
% no way to fix the subject/verb agreement.
%
% As a result, this is probably not intended to be a robust alternative!
% You have been warned! (And you will be if you use it too.)
%
\ProvidesPackage{he-she}[2011/02/12 Semi-automatic pronoun switching with anaphora v1.0]
\RequirePackage{xspace}
\newif\ifxspace\xspacetrue
\newif\ifthey\theyfalse
\DeclareOption{noxspace}{\xspacefalse}
\DeclareOption{they}{%
\theytrue
\PackageWarning{he-she}{*** WARNING: Use of option `\CurrentOption` will screw up subject/verb agreement for most nominative pronouns. It is only present for for its comic value! USE AT YOUR OWN RISK! ***}
}
\DeclareOption*{%
 \PackageWarning{he-she}{Unknown option `\CurrentOption`}%
}
\ProcessOptions
% toggle for changing the gender
\newif\ifhe\hetrue
%
%
\ifthey
% Implement the (somewhat useless) 'they' option
%
\newcommand*{\heshe}{they\ifxspace\xspace\fi}
\newcommand*{\Heshe}{They\ifxspace\xspace\fi}
\newcommand*{\himher}{them\ifxspace\xspace\fi}
\newcommand*{\Himher}{Them\ifxspace\xspace\fi}
\newcommand*{\hisher}{their\ifxspace\xspace\fi}
\newcommand*{\Hisher}{Their\ifxspace\xspace\fi}
\newcommand*{\he}{they\ifxspace\xspace\fi}
\newcommand*{\He}{They\ifxspace\xspace\fi}
\newcommand*{\him}{them\ifxspace\xspace\fi}
\newcommand*{\Him}{Them\ifxspace\xspace\fi}
\newcommand*{\his}{their\ifxspace\xspace\fi}
\newcommand*{\His}{Their\ifxspace\xspace\fi}
%
\else
%
% Lowercase versions:
%
% Nominative lowercase switching form \heshe
\newcommand*{\heshe}{%
  \ifhe%
    he%
    \global\hefalse%
  \else%
    she%
    \global\hetrue%
  \fi%
  \ifxspace\xspace\fi
}
%
% Nominative lowercase anaphoric form \he
\newcommand*\he{%
\ifhe%
	she%
  \else%
  	he%
  \fi
  \ifxspace\xspace\fi
}
%
% Accusative lowercase switching form \himher
\newcommand*\himher{%
  \ifhe%
  	him%
    \global\hefalse%
  \else%
  	her%
    \global\hetrue%
  \fi%
  \ifxspace\xspace\fi
}%
%
% Accusative lowercase anaphoric form \him
\newcommand*\him{%
\ifhe%
	her%
  \else%
  	him%
  \fi
  \ifxspace\xspace\fi
}
%
% Genitive lowercase switching form \hisher
\newcommand*\hisher{%
  \ifhe%
  	his%
    \global\hefalse%
  \else%
  	her%
    \global\hetrue%
  \fi%
  \ifxspace\xspace\fi
}
%
% Genitive lowercase anaphoric form \his
\newcommand*\his{%
\ifhe%
	her%
  \else%
  	his%
  \fi
  \ifxspace\xspace\fi
}
%
% Uppercase versions:
%
% Nominative uppercase switching form \Heshe
\newcommand*{\Heshe}{%
  \ifhe%
    He%
    \global\hefalse%
  \else%
    She%
    \global\hetrue%
  \fi%
  \ifxspace\xspace\fi
}
%
% Nominative uppercase anaphoric form \He
\newcommand*\He{%
\ifhe%
	She%
  \else%
  	He%
  \fi
  \ifxspace\xspace\fi
}
%
% Accusative uppercase switching form \Himher
\newcommand*\Himher{%
  \ifhe%
  	Him%
    \global\hefalse%
  \else%
  	Her%
    \global\hetrue%
  \fi%
  \ifxspace\xspace\fi
}%
%
% Accusative uppercase anaphoric form \Him
\newcommand*\Him{%
\ifhe%
	Her%
  \else%
  	Him%
  \fi
  \ifxspace\xspace\fi
}
%
% Genitive uppercase switching form \Hisher
\newcommand*\Hisher{%
  \ifhe%
  	His%
    \global\hefalse%
  \else%
  	Her%
    \global\hetrue%
  \fi%
  \ifxspace\xspace\fi
}
%
% Genitive uppercase anaphoric form \His
\newcommand*\His{%
\ifhe%
	Her%
  \else%
  	His%
  \fi
  \ifxspace\xspace\fi
}
\fi
\let\she\he
\let\She\He
\let\her\him
\let\Her\Him
\let\hir\his
\let\Hir\His
\endinput