]> git.donarmstrong.com Git - lib.git/blob - texmf/tex/latex/pst-pdgr/pst-pdgr.dtx
add pst-pdr
[lib.git] / texmf / tex / latex / pst-pdgr / pst-pdgr.dtx
1 % \iffalse
2 %<*gobble>
3 % $Id: pst-pdgr.dtx,v 1.43 2006/05/16 22:16:43 boris Exp $
4 %
5 % Copyright 2006, Boris Veytsman <borisv@lk.net>, Leila Akhmadeeva
6 % This work may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either
8 % version 1.3 of this license or (at your option) any 
9 % later version.
10 % The latest version of the license is in
11 %    http://www.latex-project.org/lppl.txt
12 % and version 1.3 or later is part of all distributions of
13 % LaTeX version 2003/06/01 or later.
14 %
15 % This work has the LPPL maintenance status `maintained'.
16 %
17 % The Current Maintainer of this work is Boris Veytsman
18 %
19 % This work consists of the file pst-pdgr.dtx and the
20 % derived files pst-pdgr.tex, pst-pdgr.sty, pst-pdgr.pdf. 
21 %
22 % \fi 
23 % \CheckSum{505}
24 %
25 % \changes{v0.1}{2006/04/18}{The interface is mostly done}
26 % \changes{v0.2}{2006/04/19}{Added new examples}
27 %
28 %
29 %% \CharacterTable
30 %%  {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
31 %%   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
32 %%   Digits        \0\1\2\3\4\5\6\7\8\9
33 %%   Exclamation   \!     Double quote  \"     Hash (number) \#
34 %%   Dollar        \$     Percent       \%     Ampersand     \&
35 %%   Acute accent  \'     Left paren    \(     Right paren   \)
36 %%   Asterisk      \*     Plus          \+     Comma         \,
37 %%   Minus         \-     Point         \.     Solidus       \/
38 %%   Colon         \:     Semicolon     \;     Less than     \<
39 %%   Equals        \=     Greater than  \>     Question mark \?
40 %%   Commercial at \@     Left bracket  \[     Backslash     \\
41 %%   Right bracket \]     Circumflex    \^     Underscore    \_
42 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
43 %%   Right brace   \}     Tilde         \~} 
44 %
45 %\iffalse
46 %    \begin{macrocode}
47 \documentclass{ltxdoc}
48 \usepackage{array}
49 \usepackage{url}
50 \usepackage{graphicx}
51 \usepackage{pst-pdgr}
52 \usepackage{pstricks-add}
53 % Taken from xkeyval.dtx
54 \makeatletter
55 \def\DescribeOption#1{\leavevmode\@bsphack
56               \marginpar{\raggedleft\PrintDescribeOption{#1}}%
57               \SpecialOptionIndex{#1}\@esphack\ignorespaces}
58 \def\PrintDescribeOption#1{\strut\emph{option}\\\MacroFont #1\ }
59 \def\SpecialOptionIndex#1{\@bsphack
60     \index{#1\actualchar{\protect\ttfamily#1}
61            (option)\encapchar usage}%
62     \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
63            usage}\@esphack}
64 \def\DescribeOptions#1{\leavevmode\@bsphack
65   \marginpar{\raggedleft\strut\emph{options}%
66   \@for\@tempa:=#1\do{%
67     \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa
68   }}\@esphack\ignorespaces}
69 \makeatother
70 \DoNotIndex{\@Alph,\@alph,\@arabic,\@badmath}
71 \DoNotIndex{\@centercr}
72 \DoNotIndex{\@empty,\@ignoretrue}
73 \DoNotIndex{\@ixpt}
74 \DoNotIndex{\@M,\@minus,\@ne,\@plus}
75 \DoNotIndex{\\,\addtolength}
76 \DoNotIndex{\advance}
77 \DoNotIndex{\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
78 \DoNotIndex{\bullet}
79 \DoNotIndex{\cdot,\cr,\day,\DeclareOption}
80 \DoNotIndex{\def,\DocInput,\documentclass}
81 \DoNotIndex{\DoNotIndex,\egroup,\ifx,\else,\fi,\endtrivlist}
82 \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
83 \DoNotIndex{\endlist,\everycr,\ExecuteOptions}
84 \DoNotIndex{\filedate,\filename,\fileversion}
85 \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
86 \DoNotIndex{\hsize,\hskip,\hspace,\hss,\ifcase,\or,\fi}
87 \DoNotIndex{\ifvmode,\fi,\ifnum,\fi,\input}
88 \DoNotIndex{\kern,\leavevmode,\let,\leftmark}
89 \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark}
90 \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
91 \DoNotIndex{\NeedsTeXFormat,\newdimen}
92 \DoNotIndex{\newpage,\nobreak,\noindent,\number}
93 \DoNotIndex{\p@}
94 \DoNotIndex{\pagestyle,\par}
95 \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
96 \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
97 \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
98 \DoNotIndex{\rightmargin,\rlap,\rmfamily}
99 \DoNotIndex{\setbox,\setcounter,\setlength}
100 \DoNotIndex{\skip,\slshape,\space}
101 \DoNotIndex{\trivlist,\typeout,\tw@}
102 \DoNotIndex{\vskip,\vspace,\year,\z@}
103 %
104 \DoNotIndex{\@ptsize,\@sptoken,\addtocounter,\afterassignment}
105 \DoNotIndex{\AtEndOfPackage,\baselineskip,\boxmaxdepth,\clearpage}
106 \DoNotIndex{\clubpenalty,\csname,\CurrentOption,\DeclareRobustCommand}
107 \DoNotIndex{\eject,\endcsname,\evensidemargin,\expandafter}
108 \DoNotIndex{\footnotesize,\footskip,\fromaddress,\futurelet}
109 \DoNotIndex{\headheight,\headsep,\hfuzz,\ignorespaces}
110 \DoNotIndex{\InputIfFileExists,\large,\lineskip,\loop}
111 \DoNotIndex{\MakeUppercase,\MessageBreak,\mbox,\multiply}
112 \DoNotIndex{\newcount,\newif,\newlength,\newtoks,\nolinebreak}
113 \DoNotIndex{\nopagebreak,\normalfont,\normalsize,\null,\newline}
114 \DoNotIndex{\oddsidemargin,\PackageError,\PackageInfo}
115 \DoNotIndex{\paperheight,\paperwidth,\parbox,\parindent}
116 \DoNotIndex{\PassOptionsToPackage,\ProvidesPackage,\RequirePackage}
117 \DoNotIndex{\rule,\selectfont,\sffamily,\sloppy,\small,\spaceskip}
118 \DoNotIndex{\stepcounter,\textheight,\textwidth,\the,\topmargin}
119 \DoNotIndex{\unhbox,\voidb@x,\vsize,\vfuzz,\widowpenalty,\xspaceskip}
120 \DoNotIndex{\AtBeginDocument,\AtEndDocument}
121 \DoNotIndex{\endinput,\ProvidesFile,\message,\catcode,\@}
122 \DoNotIndex{\PSTricksLoaded,\PSTXKeyLoaded,\PSTnodesLoaded,\PSTreeLoaded}
123 \DoNotIndex{\pst@addfams,\define@key,\define@choicekey,\pssetlength}
124 \DoNotIndex{\@nameuse,\@namedef,\psset,\rnode,\@ifnextchar,\pscircle}
125 \DoNotIndex{\psdot,\pscircle,\pspolygon,\qline,\rput,\psline,\psframe}
126 \DoNotIndex{\@pstrickserr,\@ehpa,\pst@checknum,\lput,\ncline,\pspicture}
127 \DoNotIndex{\ncangle,\pnode,\pspicture,\endpspicture,\Tr}
128 \DoNotIndex{\ifdim,\fi}
129 \PageIndex
130 \CodelineIndex
131 \RecordChanges
132 \EnableCrossrefs
133 \begin{document}
134   \DocInput{pst-pdgr.dtx}
135 \end{document}
136 %    \end{macrocode}
137 %</gobble> 
138 % \fi
139 % \MakeShortVerb{|}
140 %
141 %\GetFileInfo{pst-pdgr.sty}
142 %\title{Creating Medical Pedigree with PSTricks and \LaTeX.
143 %  \thanks{\copyright Boris Veytsman, Leila Akhmadeeva 2006}}
144 %\author{Boris Veytsman, \path{borisv@lk.net} \and Leila Akhmadeeva}
145 %\date{\filedate, \fileversion}
146 %\maketitle
147 %\begin{abstract}
148 %  A set of macros based on |PSTricks| to draw medical pedigrees
149 %  according to the recommendations for standardized human pedigree
150 %  nomenclature.  The drawing commands place the symbols on a
151 %  |pspicture| canvas.  An interface for making trees is also
152 %  provided.  The package can be used both with \LaTeX{} and
153 %  \PlainTeX.  A separate |Perl| program for generating \TeX{} files
154 %  from spreadsheets is provided elsewhere on |CTAN|.
155 %\end{abstract}
156 %
157 % \clearpage
158 %
159 %\tableofcontents
160 %
161 % \clearpage
162 %
163 %\listoffigures
164 %\listoftables
165 % \clearpage
166 %
167 %\section{User Guide}
168 %\label{sec:user_guide}
169
170 %
171 %\subsection{Introduction}
172 %\label{sec:intro}
173 %
174 % Medical pedigree is a very important tool for clinicians, genetic
175 % researchers and educators.  As stated
176 % in~\cite{PedigreeNomenclature95}, ``The construction of an accurate
177 % family pedigree is a fundamental component of a clinical genetic
178 % evaluation and of human genetic research.''  Unfortunately, up to
179 % now most geneticians make the pedigrees manually.  There are several
180 % programs for doing so (see a list at
181 % \url{http://www.kumc.edu/gec/prof/genecomp.html#pedigree}), but they
182 % are rather expensive, lack multilanguage support and the quality of
183 % typesetting is somewhat lacking.  This package tries to offer a
184 % \LaTeX-based solution for this problem.  It could be used with a
185 % companion \path{Perl} program \path{pedigree}~\cite{pedigree-perl},
186 % which converts databases of patients into a \LaTeX{} file.
187 %
188 % Note that there are ways to draw genealogical trees with
189 % |PSTricks|~\cite{PSTricks93}; see the beautiful ones at
190 % \url{http://www.tug.org/PSTricks/main.cgi?file=Examples/Genealogy/genealogy}.
191 % Unfortunately, medical pedigrees are often not \emph{trees}.
192 % Therefore we do not use tree approach throughout, but provide it as
193 % an alternative.   Our general approach is based on the use of
194 % nodes~\cite[Part~VII]{PSTricks93}.  Each person or entity is a node,
195 % and the lines are in fact |\ncline|s.  This provides a flexibility
196 % to draw complex pedigrees.
197 %
198 % Each node in the system \emph{must} have a name.  To prevent
199 % confusion with names of individuals, we call such name an \emph{id}.
200 % As usual in |PSTricks|, it is a sequence of letters and numbers
201 % starting with a letter.  This rule is very important; a name like 1
202 % or 1-1 can lead to mysterious PostScript errors.
203 %
204 % Our symbols follows the standard~\cite{PedigreeNomenclature95} with
205 % the exception that we do not implement showing several conditions
206 % on the same chart.
207 %
208 % To use the package, add the line
209 % \begin{verbatim}
210 % \usepackage{pst-pdgr}
211 % \end{verbatim}
212 % to a \LaTeX{} document or
213 % \begin{verbatim}
214 % \input pst-pdgr.tex
215 % \end{verbatim}
216 % to a \PlainTeX{} one.  Note that since this is a |PSTricks|
217 % package, you need to use \path{tex-dvips} path to compile your
218 % document.  If you need a PDF document, you can use \path{ps2pdf} or
219 % packages like \path{pst-pdf}, \path{ps4pdf}, \path{pstricks}.
220 %
221 % If you are using the package in a \LaTeX{} document, you have an
222 % added benefit of a local configuration file |pst-pdgr.cfg|.  Such
223 % file, if exists, will be read. It can be used to override package
224 % settings (use |\AtEndOfPackage| for this).
225 %
226 %
227 %
228 %\subsection{Global Settings}
229 %\label{sec:globals}
230
231 % By default the size of each node is |0.5 unit|.  You can change
232 % the size by setting the value of  |unit| (1\,cm by default)
233 % with |\psset|
234 %
235 %\DescribeMacro{\affectedstyle}
236 %\DescribeMacro{\affectedbgcolor}
237 % By default the affected individual is drawn as a black node.  This
238 % could be changed by setting |\affectedstyle| and
239 % |\affectedbgcolor|, see Figure~\ref{fig:affectedstyle}.  
240 %\DescribeMacro{\affectedfgcolor}
241 % Sometimes we need to write something inside a node representing an
242 % affected individual.  An example in~\cite{PedigreeNomenclature95}
243 % changes in this situation the style from filled to hatched, which
244 % looks inconsistent.  We rather change the color of the foreground,
245 % as shown on Fig.~\ref{fig:affectedfgcolor}. 
246 %
247 % \begin{figure}
248 %   \centering
249 %   \begin{minipage}[t]{0.4\linewidth}
250 %     \centering
251 %       \begin{pspicture}(2,2)
252 %         \def\affectedbgcolor{blue}
253 %          \expandafter\pscircle\expandafter[\affectedstyle](1,1){1}
254 %       \end{pspicture}\leavevmode\\
255 %       \small
256 %     |\def\affectedbgcolor{%|\\
257 %       |blue}|
258 %   \end{minipage}
259 %   \begin{minipage}[t]{0.4\linewidth}
260 %     \centering
261 %       \begin{pspicture}(2,2)
262 %         \def\affectedstyle{fillstyle=hlines, hatchcolor=\affectedbgcolor}
263 %          \expandafter\pscircle\expandafter[\affectedstyle](1,1){1}
264 %       \end{pspicture}\leavevmode\\
265 %       \small
266 %       |\def\affectedstyle{fillstyle=%|\\
267 %         |hlines,hatchcolor=\affectedbgcolor}|
268 %   \end{minipage}
269 %   \caption{Setting Style of Affected Individuals}
270 %   \label{fig:affectedstyle}
271 % \end{figure}
272 %
273 % \begin{figure}
274 %   \centering
275 %   \begin{minipage}[t]{0.4\linewidth}
276 %     \centering
277 %       \begin{pspicture}(2,2)
278 %          \expandafter\pscircle\expandafter[\affectedstyle](1,1){1}
279 %          \rput(1,1){\expandafter\textcolor\expandafter{%
280 %              \affectedfgcolor}{\Huge 2}}
281 %       \end{pspicture}\leavevmode\\
282 %       \small
283 %     default
284 %   \end{minipage}
285 %   \begin{minipage}[t]{0.4\linewidth}
286 %     \centering
287 %       \begin{pspicture}(2,2)
288 %         \def\affectedfgcolor{green}
289 %          \expandafter\pscircle\expandafter[\affectedstyle](1,1){1}
290 %          \rput(1,1){\expandafter\textcolor\expandafter{%
291 %              \affectedfgcolor}{\Huge 2}}
292 %       \end{pspicture}
293 %       \small
294 %     |\def\affectedfgcolor{green}|
295 %   \end{minipage}
296 %   \caption{Use of Foreground Colors for Affected Individuals }
297 %   \label{fig:affectedfgcolor}
298 % \end{figure}
299 %
300 %
301 %\subsection{Node Drawing Commands}
302 %\label{sec:node_commands}
303 %
304 %
305 % The node drawing commands are based on the |\pnode| commands from
306 % |PSTricks|~\cite[Part~VII]{PSTricks93}.  It is the preferred command
307 % for drawing, for example, a ``marriage node'' (see the examples
308 % below).  It is useful to remember this when drawing complex
309 % pedigrees.  
310 %
311 %
312 %\subsubsection{One Person}
313 %\label{sec:person}
314 %
315 % \DescribeMacro{\pstPerson} The main command in the package is
316 % |\pstPerson|.  It draws one person, which is a |PSTricks| node.  It
317 % has the following structure: |\pstPerson|\oarg{options}\marg{id}.
318 % The parameter \meta{id} is the name of the node.  It can be used to
319 % make connections to the node (see below).
320 %
321 % There are many options to this command.  As other |PSTricks|
322 % options, the also can be set globally through |\psset| command.
323 %
324
325 % \DescribeOptions{sex,condition,deceased,proband,adopted,evaluated}
326 % The first group of options describes the state of the person:  sex,
327 % condition with respect to the decease, whether the person is
328 % deceased, is a proband, was adopted and was evaluated.  These
329 % options are listed in Table~\ref{tab:person_state_opts}.  Some 
330 % options of this group can take only two values: |true| or |false|.
331 % For simplicity the clause |=true| can be omitted, so the clauses
332 % |adopted=true| and |adopted| are equivalent.  Two options: |sex| and
333 % |condition| can take several values each (geneticians consider three
334 % possibilities for sex: |male|, |female| and |unknown|).  Again for
335 % simplicity the clauses |sex=| and |condition=| can be omitted, so
336 % the invocations |sex=male| and |male| are equivalent, as well as
337 % |condition=asymptomatic| and |asymptomatic|.
338 %
339 % \DescribeOptions{insidetext,abovetext,belowtext,lefttext,righttext}
340 % The second group of options (Table~\ref{tab:person_text_opts}) is
341 % used to putting text comments inside the symbol, above it, below it
342 % or to the right or left to it.  The text will be typeset in a
343 % |PSTricks| LR-box~\cite{PSTricks93}; additional control over the
344 % text position can be achieved by using |\parbox| or \PlainTeX{}
345 % boxes. 
346 %
347 % \DescribeOptions{abovetextrp,belowtextrp,lefttextrp,righttextrp} 
348 % The third group of options (Table~\ref{tab:person_text_rp_opts}) is
349 % used to set the text position with respect to the node.  They set
350 % the reference point of the text.  They correspond to the usual
351 % notation: |r| being right, |l| being left, |t| being top, |b| being
352 % bottom and |B| being baseline.  The setting |={}| makes the
353 % reference point to be the center of the box.  Note that to prevent
354 % the text above and below the symbol to clash with the descent lines,
355 % the spaces of |2\pslinewidth| are added to the right and to the left
356 % of the symbol.
357 %
358 % Examples of usage of this command are shown in
359 % Table~\ref{tab:pstPerson}.
360 %
361 %
362 % \begin{table}
363 %   \centering
364 %   \begin{tabular}{l>{\raggedright\obeylines
365 %       }p{0.3\linewidth}lp{0.3\linewidth}}
366 %     \hline
367 %     Option  & Values  & Default  & Description \\
368 %     \hline
369 %     |sex| & |male|, |female|, |unknown| & |unknown| & Sex of the
370 %     person\\
371 %     |condition| & |normal|, |obligatory|, |asymptomatic|, |affected|
372 %     & |normal|  & The condition of the person\\
373 %     |deceased| & |true|, |false|  & |false|  & Whether the person is
374 %     deceased \\
375 %     |proband| & |true|, |false| & |false| & Whether the person is a
376 %     proband\\  
377 %     |adopted| & |true|, |false| & |false| & Whether the individual
378 %     is adopted \\
379 %     |evaluated|  & |true|, |false| & |false| & Whether a documented
380 %     evaluation took place\\
381 %     \hline
382 %   \end{tabular}
383 %   \caption{Options Showing State of a Person}
384 %   \label{tab:person_state_opts}
385 % \end{table}
386 %
387 %
388 %
389 % \begin{table}
390 %   \centering
391 %   \begin{tabular}{l>{\raggedright\obeylines
392 %       }llp{0.5\linewidth}}
393 %     \hline
394 %     Option  & Values  & Default  & Description \\
395 %     \hline
396 %     |insidetext| & String  & None & A text to be placed inside the
397 %     symbol (number of individuals, pregnancy, etc.)\\ 
398 %     |abovetext| & String  & None & A text to be placed above the
399 %     symbol (name, number, etc.)\\ 
400 %     |belowtext| & String  & None & A text to be placed below the
401 %     symbol (name, number, etc.)\\ 
402 %     |lefttext| & String  & None & A text to be placed to the left of the
403 %     symbol (name, number, etc.)\\ 
404 %     |righttext| & String  & None & A text to be placed to the right of the
405 %     symbol (name, number, etc.)\\ 
406 %     \hline
407 %   \end{tabular}
408 %   \caption{Options for Making Textual Comments}
409 %   \label{tab:person_text_opts}
410 % \end{table}
411 %
412 % \begin{table}
413 %   \centering
414 %   \begin{tabular}{l>{\raggedright\obeylines
415 %       }p{0.25\linewidth}lp{0.35\linewidth}}
416 %     \hline
417 %     Option  & Values  & Default  & Description \\
418 %     \hline
419 %     |abovetextrp| & Combination of |r| or |l| and |t|, |b| or |B|  &
420 %     |lB| & The reference point for the text above the symbol\\ 
421 %     |belowtextrp| & Combination of |r| or |l| and |t|, |b| or |B|  &
422 %     |lt| & The reference point for the text below the symbol\\ 
423 %     |lefttextrp| & Combination of |r| or |l| and |t|, |b| or |B|  &
424 %     |r| & The reference point for the text to the left the symbol\\ 
425 %     |righttextrp| & Combination of |r| or |l| and |t|, |b| or |B|  &
426 %     |l| & The reference point for the text to the right the symbol\\ 
427 %     \hline
428 %   \end{tabular}
429 %   \caption{Options for Setting Text Reference Point}
430 %   \label{tab:person_text_rp_opts}
431 % \end{table}
432 %
433 %
434 % \begin{table}
435 %   \centering
436 %     \def\arraystretch{1.5}
437 %     \begin{tabular}{>{\tt\bslash pstPerson[}p{0.6\textwidth}<{]\{P\}}c}
438 %       \hline
439 %       \multicolumn{1}{l}{Command} & Result\rule{0.5cm}{0cm}\\
440 %       \hline
441 %       condition=asymptomatic &
442 %       \pstPerson[condition=asymptomatic]{A} \\
443 %       condition=affected, sex=male, evaluated &
444 %       \pstPerson[condition=affected,sex=male, evaluated]{A} \\
445 %       obligatory, female &
446 %       \pstPerson[obligatory, female]{A} \\
447 %       asymptomatic, male, proband &
448 %       \pstPerson[asymptomatic, male, proband]{A} \\
449 %       condition=obligatory, sex=male, deceased &
450 %       \pstPerson[condition=obligatory, sex=male, deceased]{A} \\
451 %       sex=female, adopted, condition=affected, abovetext=Jane &
452 %       \pstPerson[sex=female, adopted, condition=affected,
453 %       abovetext=Jane]{A} \\ 
454 %       sex=male, condition=affected, belowtext=20 yr, deceased &
455 %       \pstPerson[sex=male,  condition=affected, deceased,
456 %       belowtext=20 yr]{A} \\[5ex]
457 %       unknown, affected, righttext=\bslash
458 %       parbox\{1cm\}\{\bslash footnotesize A \bslash\bslash 1 w\} &
459 %       \pstPerson[unknown,  affected,
460 %       righttext=\parbox{1cm}{\footnotesize A\\1 w}]{A} \\
461 %       sex=male, insidetex=5 &
462 %       \pstPerson[sex=male,  insidetext=5]{A}\\
463 %       sex=female, condition=affected, insidetext=P &
464 %       \pstPerson[sex=female, condition=affected, insidetext=P]{A}\\
465 %       sex=female, affected, belowtext=\bslash
466 %       parbox\{1cm\}\{\bslash centering SB\bslash\bslash 2wks\}, deceased &
467 %       \pstPerson[sex=female,  affected, deceased,
468 %       belowtext=\parbox{1cm}{\centering SB\\ 2wks}]{A} \\[7ex]
469 %       \hline
470 %     \end{tabular}
471 %   \caption{Examples of Persons}
472 %   \label{tab:pstPerson}
473 % \end{table}
474 %
475 %
476 %\subsubsection{Pregnancy Not Carried To Term}
477 %\label{sec:abortion}
478
479 % \DescribeMacro{\pstAbortion} 
480 % The command |\pstAbortion| is used to draw a pregnancy not carried
481 % to term: spontaneous abortions or terminated pregnancies.  The
482 % format of it the same as for the command |\pstPerson| (see
483 % Section~\ref{sec:person}): |\pstAbortion|\oarg{options}\marg{id}.
484 % However, many of options listed in Table~\ref{tab:person_state_opts} are
485 % silently ignored.  The only options meaningful for these nodes are
486 % |sex| and |condition| (only |normal| and |affected| values are
487 % possible).  All options listed in Table~\ref{tab:person_text_opts}
488 % and \ref{tab:person_text_rp_opts} are valid and have the same
489 % meaning as in Section~\ref{sec:person}. 
490 %
491 % \DescribeOption{sab} 
492 % The command has also an option |sab| with the values |true| or
493 % |false|.  If it is |true|, the pregnancy is a spontaneous abortion.
494 % Otherwise it is terminated.  Examples of usage of this command are
495 % shown in Table~\ref{tab:abortions}.
496 %
497 %
498 % \begin{table}
499 %   \centering
500 %     \def\arraystretch{2}
501 %     \begin{tabular}{>{\tt\bslash pstAbortion[}p{0.6\textwidth}<{]\{A\}}c}
502 %       \hline
503 %       \multicolumn{1}{l}{Command} & Symbol\\
504 %       \hline
505 %         belowtext=male   & \rule{0cm}{1cm} \pstAbortion[belowtext=male]{A}\\
506 %         sab, righttext=1w &  \pstAbortion[sab, righttext=1w]{A}\\
507 %         affected &  \pstAbortion[affected]{A}\\
508 %       \hline
509 %     \end{tabular}
510 %   \caption{Examples of Abortion Symbols}
511 %   \label{tab:abortions}
512 % \end{table}
513 %
514 %\subsubsection{Childlessness and Infertility}
515 %\label{sec:childness}
516
517 % The symbols for childlessness and infertility are listed under
518 % ``line definitions'' in~\cite{PedigreeNomenclature95}.  However, to
519 % make the placing the symbols on the chart more flexible, we assign
520 % nodes to them.  
521 %
522 % \DescribeMacro{\pstChildless} 
523 % The command for drawing these symbols
524 % has the same structure as the other node drawing commands:
525 % |\pstChildless}|\oarg{options}\marg{id}.  
526 % While all options listed in Table~\ref{tab:pstPerson} are valid, the
527 % only meaningful one is |belowtext|.  Note that the option
528 % |belowtextrp| is silently ignored:  the text is always centered
529 % below the infertility symbol.  
530 %
531 % \DescribeOption{infertile}
532 % There is one additional option
533 % |infertile|, which can have values |true| of |false|.  If it is
534 % |false|, the person (or relationship) is childless by choice (or by
535 % an unknown reason).  The clause |=true| can be omitted.
536
537 %
538 % \begin{table}
539 %   \centering
540 %     \def\arraystretch{2}
541 %     \begin{tabular}{>{\tt\bslash pstChildless[}p{0.6\textwidth}<{]\{C\}}c}
542 %       \hline
543 %       \multicolumn{1}{l}{Command} & Symbol\rule{0.5cm}{0cm}\\
544 %       \hline
545 %         belowtext=vasectomy   &
546 %         \pstChildless[belowtext=vasectomy]{A}\\
547 %         belowtext=anospermia, infertile   &
548 %         \pstChildless[belowtext=anospermia, infertile]{A}\\
549 %       \hline
550 %     \end{tabular}
551 %   \caption{Examples of Childlessness or Infertility Symbols}
552 %   \label{tab:childness}
553 % \end{table}
554 %
555 %
556 %
557 %\subsection{Connection Drawing Commands}
558 %\label{sec:lines}
559 %
560 % The connections in pedigrees are based on |\ncline| and friends.
561 % There are, however, some additional features for pedigree
562 % connections.  
563 %
564 %
565 %\subsubsection{Relationship}
566 %\label{sec:relationship}
567 %
568 %\DescribeMacro{\pstRelationship}
569 % Relationships are marriages or other unions.  The main command for
570 % drawing relationships is 
571 % |\pstRelationship|\oarg{options}\marg{nodeA}\marg{nodeB}.  It draws
572 % a relationship line between \marg{nodeA} and \marg{nodeB}.  Normal
573 % |PSTricks| options like |linestyle=dashed| can be used with the
574 % expected effect.
575 %
576 % \DescribeOptions{broken,consanguinic,descentnode,brokenpos,descentnodepos,rellinecmd}
577 % There are also several options specific for this command, listed in
578 % Table~\ref{tab:relationship_opts}. The options |broken| and
579 % |consanguinic| are self-explanatory.  The option |descentnode| is
580 % used, if we want the descent lines to start at a node on the
581 % relationship line.  The name of this descent node must satisfy the
582 % usual criteria for the node (see Section~\ref{sec:intro}).  The
583 % options |brokenpos| and |descentnodepos| determine, where on the
584 % relationship line the corresponding objects are placed.  The option
585 % |rellinecmd| allows to change the default straight line for the
586 % relationship to something else, like |ncbar|, |ncangle|, etc.
587 % Examples of this command use are shown in
588 % Table~\ref{tab:pstRelationship}
589 %
590 %
591 %
592 % \begin{table}
593 %   \centering
594 %   \begin{tabular}{l>{\raggedright\obeylines
595 %       }p{0.2\linewidth}lp{0.3\linewidth}}  
596 %     \hline
597 %     Option  & Values  & Default  & Description \\
598 %     \hline
599 %     |broken|  & |true|, |false|  & |false| & Whether the
600 %     relationship no longer exists\\
601 %     |consanguinic| & |true|, |false|  & |false|  & Whether the
602 %     relationship is consanguinic\\
603 %     |descentnode|  &  Node name  & None  & A node that will be used
604 %     to draw descent lines for the relationship \\
605 %     |brokenpos|  & A number between 0 and 1  & 0.3 & Where to put the
606 %     symbol for broken relationship on the line (as a fraction of the
607 %     line length)\\
608 %     |descentnodepos|  & A number &  0.5 & Where
609 %     to put the the descent node on the relationship line\\
610 %     |rellinecmd|  & Name  & |ncline|  & Name of the line drawing
611 %     command (without \textbackslash)\\
612 %     \hline
613 %   \end{tabular}
614 %   \caption{Options for Relationship Lines}
615 %   \label{tab:relationship_opts}
616 % \end{table}
617 %
618 % \begin{table}
619 %   \centering
620 %     \def\arraystretch{1.5}
621 %     \begin{tabular}{>{\tt\raggedright\obeylines }b{0.6\textwidth}c}
622 %       \hline
623 %       \multicolumn{1}{l}{Command} & Result\\
624 %       \hline
625 %         \bslash rput(0.5,0.5)\{\bslash pstPerson[male]\{A\}\}
626 %         \bslash rput(2.5,0.5)\{\bslash pstPerson[female]\{B\}\}
627 %         \bslash pstRelationship[broken]\{A\}\{B\}
628 %       &
629 %       \begin{pspicture}[shift=-1](3,1)
630 %         \rput(0.5,0.5){\pstPerson[male]{A}}
631 %         \rput(2.5,0.5){\pstPerson[female]{B}}
632 %         \pstRelationship[broken]{A}{B}
633 %       \end{pspicture}\\
634 %         \bslash rput(0.5,0.5)\{\bslash pstPerson[male]\{A\}\}
635 %         \bslash rput(2.5,0.5)\{\bslash pstPerson[female]\{B\}\}
636 %         \bslash pstRelationship[consanguinic]\{A\}\{B\}
637 %       &
638 %       \begin{pspicture}[shift=-1](3,1)
639 %         \rput(0.5,0.5){\pstPerson[male]{A}}
640 %         \rput(2.5,0.5){\pstPerson[female]{B}}
641 %         \pstRelationship[consanguinic]{A}{B}
642 %       \end{pspicture}\\
643 %         \bslash rput(0.5,1.5)\{\bslash pstPerson[male]\{A\}\}
644 %         \bslash rput(2.5,1.5)\{\bslash pstPerson[female]\{B\}\}
645 %         \bslash rput(1.5,0.5)\{\bslash pstPerson[female]\{C\}\}
646 %         \bslash pstRelationship[descentnode=AB]\{A\}\{B\}
647 %         \bslash ncline\{AB\}\{C\}
648 %       &
649 %       \begin{pspicture}[shift=-1](3,2)
650 %         \rput(0.5,1.5){\pstPerson[male]{A}}
651 %         \rput(2.5,1.5){\pstPerson[female]{B}}
652 %         \rput(1.5,0.5){\pstPerson[female]{C}}
653 %         \pstRelationship[descentnode=AB]{A}{B}
654 %         \ncline{AB}{C}
655 %       \end{pspicture}\\
656 %         \bslash rput(0.5,1.5)\{\bslash
657 %         pstPerson[male, belowtext=1-1]\{A\}\} 
658 %         \bslash rput(2.5,1.5)\{\bslash
659 %         pstPerson[affected, female, belowtext=1-2]\{B\}\} 
660 %         \bslash rput(1.5,0.6)\{\bslash pstPerson[male,
661 %         belowtext=2-1]\{C\}\} 
662 %         \bslash pstRelationship[descentnode=AB, rellinecmd=ncangle,
663 %         angleA=90, angleB=90, descentnodepos=1.5,
664 %         broken, brokenpos=1.2]\{A\}\{B\}
665 %         \bslash ncline\{AB\}\{C\}
666 %       &
667 %       \begin{pspicture}[shift=-1](3,3)
668 %         \rput(0.5,1.5){\pstPerson[male,belowtext=1-1]{A}}
669 %         \rput(2.5,1.5){\pstPerson[affected,female, belowtext=1-2]{B}}
670 %         \rput(1.5,0.6){\pstPerson[male, belowtext=2-1]{C}}
671 %         \pstRelationship[descentnode=AB, rellinecmd=ncangle,
672 %         angleA=90, angleB=90, descentnodepos=1.5,
673 %         broken, brokenpos=1.2]{A}{B}
674 %         \ncline{AB}{C}
675 %       \end{pspicture}\\
676 %       \hline
677 %     \end{tabular}
678 %   \caption{Examples of Relationships}
679 %   \label{tab:pstRelationship}
680 % \end{table}
681 %
682 %
683 %\subsubsection{Descent}
684 %\label{sec:pstDescent}
685
686 % The paper~\cite{PedigreeNomenclature95} distinguishes between
687 % descent line and sibs line.  We, however, will call all segments of
688 % the line, joining a parent (or a descent node) and a child the
689 % descent line.  \DescribeMacro{\pstDescent} The main command for
690 % showing parent-child relations is
691 % |\pstDescent|\oarg{options}\marg{Parent}\marg{Child}.  It has no
692 % special options, but the usual |\PSTricks| options for lines are
693 % valid.  The most important option is |armB|: the length of the
694 % segment between the parent node and the sib line.  Note that to make
695 % the sib line straight the actual direction of the |\ncangle| used by
696 % |\pstRelationship| internally is \emph{reversed}: from \marg{Child}
697 % to \marg{Parent}. Examples of this command are shown in
698 % Table~\ref{tab:pstDescent}.  Note the option |linestyle=dashed| used
699 % to show social parentage in the first example.
700 %
701 %
702 %
703 % \begin{table}
704 %   \centering
705 %     \def\arraystretch{1.5}
706 %     \begin{tabular}{>{\tt\raggedright\obeylines }b{0.6\textwidth}c}
707 %       \hline
708 %       \multicolumn{1}{l}{Command} & Result\\
709 %       \hline
710 %         \bslash rput(1.5,2)\{\bslash pstPerson[female]\{A\}\}
711 %         \bslash rput(0.5,0.5)\{\bslash pstPerson[female, adopted]\{B\}\}
712 %         \bslash rput(1.5,0.5)\{\bslash pstPerson[male]\{C\}\}
713 %         \bslash rput(2.5,0.5)\{\bslash pstAbortion[female]\{D\}\}
714 %         \bslash pstDescent[linestyle=dashed]\{A\}\{B\}
715 %         \bslash pstDescent\{A\}\{C\}
716 %         \bslash pstDescent\{A\}\{D\}
717 %       &
718 %       \begin{pspicture}[shift=-1](3,2.5)
719 %         \rput(1.5,2){\pstPerson[female]{A}}
720 %         \rput(0.5,0.5){\pstPerson[female, adopted]{B}}
721 %         \rput(1.5,0.5){\pstPerson[male]{C}}
722 %         \rput(2.5,0.5){\pstAbortion[female]{D}}
723 %         \pstDescent[linestyle=dashed]{A}{B}
724 %         \pstDescent{A}{C}
725 %         \pstDescent{A}{D}
726 %       \end{pspicture}\\
727 %         \bslash psset\{armB=1\}
728 %         \bslash rput(0.5,2)\{\bslash pstPerson[male, belowtext=Fred]\{A\}\}
729 %         \bslash rput(2.5,2)\{\bslash pstPerson[female, obligatory, belowtext=Ginger]\{B\}\}
730 %         \bslash pstRelationship[descentnode=AB]\{A\}\{B\}
731 %         \bslash rput(0.5,0.5)\{\bslash pstPerson[male,asymptomatic, belowtext=John]\{C1\}\}
732 %         \bslash rput(1.5,0.5)\{\bslash pstPerson[female, belowtext=Mary]\{C2\}\}
733 %         \bslash rput(2.5,0.5)\{\bslash pstAbortion[sab, affected, belowtext=male]\{C3\}\}
734 %         \bslash pstDescent\{AB\}\{C1\}
735 %         \bslash pstDescent\{AB\}\{C2\}
736 %         \bslash pstDescent\{AB\}\{C3\}
737 %       &
738 %       \begin{pspicture}[shift=-1](0,-0.2)(3.5,2.5)
739 %         \psset{armB=1}
740 %         \rput(0.5,2){\pstPerson[male, belowtext=Fred]{A}}
741 %         \rput(2.5,2){\pstPerson[female, obligatory, belowtext=Ginger]{B}}
742 %         \pstRelationship[descentnode=AB]{A}{B}
743 %         \rput(0.5,0.5){\pstPerson[male,asymptomatic, belowtext=John]{C1}}
744 %         \rput(1.5,0.5){\pstPerson[female, belowtext=Mary]{C2}}
745 %         \rput(2.5,0.5){\pstAbortion[sab, affected, belowtext=male]{C3}}
746 %         \pstDescent{AB}{C1}
747 %         \pstDescent{AB}{C2}
748 %         \pstDescent{AB}{C3}
749 %       \end{pspicture}\\
750 %         \bslash rput(0.5,1.5)\{\bslash pstPerson[male]\{A\}\}
751 %         \bslash rput(2.5,1.5)\{\bslash pstPerson[female]\{B\}\}
752 %         \bslash pstRelationship[descentnode=AB]\{A\}\{B\}
753 %         \bslash rput(1.5,0.5)\{\bslash pstChildless[infertile, belowtext=anospermia]\{C\}\}
754 %         \bslash pstDescent\{AB\}\{C\}
755 %       &
756 %       \begin{pspicture}[shift=-1](0,-0.2)(3,2)
757 %         \rput(0.5,1.5){\pstPerson[male]{A}}
758 %         \rput(2.5,1.5){\pstPerson[female]{B}}
759 %         \pstRelationship[descentnode=AB]{A}{B}
760 %         \rput(1.5,0.5){\pstChildless[belowtext=anospermia, infertile]{C}}
761 %         \pstDescent{AB}{C}
762 %       \end{pspicture}\\
763 %       \hline
764 %     \end{tabular}
765 %   \caption{Examples of Descent Lines}
766 %   \label{tab:pstDescent}
767 % \end{table}
768
769 %
770 %\subsubsection{Twins}
771 %\label{sec:pstTwins}
772 %
773 %
774 %
775 % \DescribeMacro{\pstTwins} A special care is needed when we talk
776 % about twins.  First, the user must define a \emph{twin node}: the
777 % node which is used as a nexus for twin lines.  Then the following
778 % command draws all the necessary
779 % lines: \\
780 % |\pstTwins|\oarg{options}\marg{Parent}\marg{TwinNode}\marg{LeftTwin}\marg{RightTwin}.
781 %
782 % \DescribeOptions{monozygotic,qzygotic,mzlinepos,addtwins}
783 % The options for this command are listed in
784 % Table~\ref{tab:twin_opts}.  The option |monozygotic| allows to show
785 % that the twins are monozygotic.  The actual position of the
786 % horizontal line is determined by the option |mzlinepos|.  If it is
787 % unknown, whether the twins are monozygotic or not, |qzygotic|
788 % options draws a question mark, as recommended
789 % by~\cite{PedigreeNomenclature95}.  Note that |mzlinepos| in this
790 % situation helps to position the question mark properly.  The option
791 % |addtwin| allows to draw pedigrees with more than two twins.  It can
792 % be repeated several times if necessary.  Examples of the usage of
793 % this command are shown in Table~\ref{tab:pstTwins}.
794
795 % \begin{table}
796 %   \centering
797 %   \begin{tabular}{l>{\raggedright\obeylines
798 %       }p{0.2\linewidth}lp{0.3\linewidth}}  
799 %     \hline
800 %     Option  & Values  & Default  & Description \\
801 %     \hline
802 %     |monozygotic|  & |true|, |false|  & |false| & Whether the twins
803 %     are monozygotic\\
804 %     |qzygotic|  & |true|, |false|  & |false| & Whether the
805 %     monozygoticity of twins is questionable\\
806 %     |addtwin| & Twin node  & Node  & Additional twin node id if
807 %     there are more than two twins (this
808 %     option may be repeated)\\
809 %     |mzlinepos|  & A number &  0.5 & Where to put the horizontal
810 %     line for monozygotic twins (as a factor of the total line length)\\
811 %     \hline
812 %   \end{tabular}
813 %   \caption{Options for Twins Lines}
814 %   \label{tab:twin_opts}
815 % \end{table}
816 %
817 %
818 % \begin{table}
819 %   \centering
820 %     \def\arraystretch{1.5}
821 %     \begin{tabular}{>{\tt\raggedright\obeylines }b{0.6\textwidth}c}
822 %       \hline
823 %       \multicolumn{1}{l}{Command} & Result\\
824 %       \hline
825 %         \bslash rput(1.5,2)\{\bslash pstPerson[female]\{A\}\}
826 %         \bslash rput(1,1.1)\{\bslash pnode\{Twins\}\}
827 %         \bslash rput(0.5,0.5)\{\bslash pstPerson[male]\{B\}\}
828 %         \bslash rput(1.5,0.5)\{\bslash pstPerson[male]\{C\}\}
829 %         \bslash rput(2.5,0.5)\{\bslash pstPerson[female]\{D\}\}
830 %         \bslash pstTwins[monozygotic]\{A\}\{Twins\}\{B\}\{C\}
831 %         \bslash pstDescent\{A\}\{D\}
832 %       &
833 %       \begin{pspicture}(3,2.5)
834 %         \rput(1.5,2){\pstPerson[female]{A}}
835 %         \rput(1,1.1){\pnode{Twins}}
836 %         \rput(0.5,0.5){\pstPerson[male]{B}}
837 %         \rput(1.5,0.5){\pstPerson[male]{C}}
838 %         \rput(2.5,0.5){\pstPerson[female]{D}}
839 %         \pstTwins[monozygotic]{A}{Twins}{B}{C}
840 %         \pstDescent{A}{D}
841 %       \end{pspicture}\\
842 %         \bslash rput(0.5,2)\{\bslash pstPerson[male]\{A\}\}
843 %         \bslash rput(2.5,2)\{\bslash pstPerson[female]\{B\}\}
844 %         \bslash pstRelationship[descentnode=AB]\{A\}\{B\}
845 %         \bslash rput(1.5,1.2)\{\bslash pnode\{Twins\}\}
846 %         \bslash rput(1,0.5)\{\bslash pstPerson[male]\{C1\}\}
847 %         \bslash rput(2,0.5)\{\bslash pstPerson[male]\{C2\}\}
848 %         \bslash pstTwins[qzygotic, mzlinepos=0.8]\{AB\}\{Twins\}\{C1\}\{C2\}
849 %       &
850 %       \begin{pspicture}(3,2.5)
851 %         \rput(0.5,2){\pstPerson[male]{A}}
852 %         \rput(2.5,2){\pstPerson[female]{B}}
853 %         \pstRelationship[descentnode=AB]{A}{B}
854 %         \rput(1.5,1.2){\pnode{Twins}}
855 %         \rput(1,0.5){\pstPerson[male]{C1}}
856 %         \rput(2,0.5){\pstPerson[male]{C2}}
857 %         \pstTwins[qzygotic, mzlinepos=0.8]{AB}{Twins}{C1}{C2}
858 %       \end{pspicture}\\
859 %         \bslash rput(1.5,2)\{\bslash pstPerson[male]\{A\}\}
860 %         \bslash rput(1.5,1.5)\{\bslash pnode\{Twins\}\}
861 %         \bslash rput(0.5,0.5)\{\bslash pstPerson[female]\{B\}\}
862 %         \bslash rput(1.2,0.5)\{\bslash pstPerson[female]\{C\}\}
863 %         \bslash rput(1.9,0.5)\{\bslash pstPerson[female]\{D\}\}
864 %         \bslash rput(2.6,0.5)\{\bslash pstPerson[female]\{E\}\}
865 %         \bslash pstTwins[addtwin=C, addtwin=D]\{A\}\{Twins\}\{B\}\{E\}
866 %       &
867 %       \begin{pspicture}(3,2.5)
868 %         \rput(1.5,2){\pstPerson[male]{A}}
869 %         \rput(1.5,1.5){\pnode{Twins}}
870 %         \rput(0.5,0.5){\pstPerson[female]{B}}
871 %         \rput(1.2,0.5){\pstPerson[female]{C}}
872 %         \rput(1.9,0.5){\pstPerson[female]{D}}
873 %         \rput(2.6,0.5){\pstPerson[female]{E}}
874 %         \pstTwins[addtwin=C, addtwin=D]{A}{Twins}{B}{E}
875 %       \end{pspicture}\\
876 %       \hline
877 %     \end{tabular}
878 %   \caption{Examples of Twins Lines}
879 %   \label{tab:pstTwins}
880 % \end{table}
881
882 %
883 %
884 %\subsection{Making Trees}
885 %\label{sec:trees}
886 %
887 % As discussed above (Section~\ref{sec:intro}), the medical pedigrees
888 % are not necessary trees.  Even if they are, they are usually not
889 % simple layered trees.  Nevertheless sometimes pedigree can be
890 % represented as a layered tree.  For such cases we provide tree
891 % drawing commands.  See the discussion in~\cite{pedigree-perl} for
892 % more details.
893 %
894 % \DescribeMacro{\TpstPerson}
895 % \DescribeMacro{\TpstAbortion}
896 % \DescribeMacro{\TpstChildless}
897 % The macros |\TpstPerson|, |\TpstAbortion| and |\TpstChildless| have
898 % the same options and arguments as their ``normal'' counterparts.  You
899 % probably need to use command like
900 % \begin{verbatim}
901 % \def\psedge{\pstDescent}
902 % \psset{armB=1}
903 % \end{verbatim}
904 % in your code.  An example of us of such commands is shown on
905 % Figure~\ref{fig:example_tree}.  Note that the resulting figure is
906 % \emph{not} a tree!  The corresponding code is shown on
907 % Figure~\ref{fig:example_tree_code}. 
908 %
909 % \begin{figure}
910 %   \centering
911 %     \begin{pspicture}(0,1)(7,7)
912 %     \rput(3,4){%
913 %       \pstree{\TpstPerson[female, obligatory, belowtext=Ann]{Ann}}{%
914 %         \def\psedge{\pstDescent}\psset{armB=1}
915 %         \pstree{\TpstPerson[male, affected, belowtext=John]{John}}{%
916 %           \TpstPerson[female, belowtext=Sue]{Sue}
917 %           \TpstPerson[male, belowtext=Paul]{Paul}
918 %           \TpstAbortion[affected, belowtext=male]{A1}
919 %           \pstree[thislevelsep=1.2]{\TpstPerson[male, 
920 %             belowtext=Peter, affected, proband]{Peter}}{%
921 %             \def\psedge{\ncline}
922 %             \TpstChildless[infertile]{C1}
923 %             }
924 %         }
925 %         \pstree{\TpstPerson[female, belowtext=Mary]{Mary}}{
926 %         \TpstPerson[female, belowtext=Joan]{Joan}
927 %         }
928 %       }
929 %     }
930 %     \pstRelationship[consanguinic]{Peter}{Joan}
931 %     \end{pspicture}
932 %   \caption{Example of Using Tree-Making Commands}
933 %   \label{fig:example_tree}
934 % \end{figure}
935 %
936 % \begin{figure}
937 %   \centering
938 % \begin{verbatim}
939 %  \begin{pspicture}(0,1)(7,7)
940 %     \rput(3,4){%
941 %       \pstree{\TpstPerson[female, obligatory, belowtext=Ann]{Ann}}{%
942 %         \def\psedge{\pstDescent}\psset{armB=1}
943 %         \pstree{\TpstPerson[male, affected, belowtext=John]{John}}{%
944 %           \TpstPerson[female, belowtext=Sue]{Sue}
945 %           \TpstPerson[male, belowtext=Paul]{Paul}
946 %           \TpstAbortion[affected, belowtext=male]{A1}
947 %           \pstree[thislevelsep=1.2]{\TpstPerson[male, 
948 %             belowtext=Peter, affected, proband]{Peter}}{%
949 %             \def\psedge{\ncline}
950 %             \TpstChildless[infertile]{C1}
951 %             }
952 %         }
953 %         \pstree{\TpstPerson[female, belowtext=Mary]{Mary}}{
954 %         \TpstPerson[female, belowtext=Joan]{Joan}
955 %         }
956 %       }
957 %     }
958 %     \pstRelationship[consanguinic]{Peter}{Joan}
959 %  \end{pspicture}
960 % \end{verbatim}
961 %   \caption{Code Producing Figure~\ref{fig:example_tree}}
962 %   \label{fig:example_tree_code}
963 % \end{figure}
964 %
965 %
966 %
967 %\subsection{More Examples}
968 %\label{sec:examples}
969 %
970 % A number of examples were listed above.  Here we show even more
971 % examples of complex pedigrees.
972 %
973 % On Figure~\ref{fig:example_PROMM} we show an example of a pedigree
974 % from~\cite{Harper01:MDBook}.  The corresponding code is listed on
975 % Figure~\ref{fig:example_PROMM_code}. 
976 %
977 % \begin{figure}
978 %   \centering
979 %   \begin{pspicture}(6,6)
980 %     \psset{belowtextrp=t, armB=1}
981 %     \rput(2.5,5.5){\pstPerson[male, deceased, belowtext=I:1]{I:1}}
982 %     \rput(3.5,5.5){\pstPerson[female, deceased, belowtext=I:2]{I:2}}
983 %     \pstRelationship[descentnode=I:1_2]{I:1}{I:2}
984 %     \rput(1,3.5){\pstPerson[female, affected, belowtext=II:1]{II:1}}
985 %     \pstDescent{I:1_2}{II:1}
986 %     \rput(2,3.5){\pstPerson[male, belowtext=II:2]{II:2}}
987 %     \pstRelationship[descentnode=II:1_2]{II:1}{II:2}
988 %     \rput(3.5,3.5){\pstPerson[male, affected, belowtext=II:3]{II:3}}
989 %     \pstDescent{I:1_2}{II:3}
990 %     \rput(4.5,3.5){\pstPerson[female, belowtext=II:4]{II:4}}
991 %     \pstRelationship[descentnode=II:3_4]{II:3}{II:4}
992 %     \rput(5.5,3.5){\pstPerson[female, affected, deceased, proband,
993 %       belowtext=II:5]{II:5}}
994 %     \pstDescent{I:1_2}{II:5}
995 %     \rput(0.5,1.5){\pstPerson[female, belowtext=III:1]{III:1}}
996 %     \pstDescent{II:1_2}{III:1}
997 %     \rput(1.5,1.5){\pstPerson[female, belowtext=III:2]{III:2}}
998 %     \pstDescent{II:1_2}{III:2}
999 %     \rput(2.5,1.5){\pstPerson[female, deceased,
1000 %       belowtext=\parbox{2cm}{\centering III:3\\4/52}]{III:3}} 
1001 %     \pstDescent{II:1_2}{III:3}
1002 %     \rput(3.5,1.5){\pstPerson[female, affected,
1003 %       belowtext=III:4]{III:4}} 
1004 %     \pstDescent{II:3_4}{III:4}
1005 %     \rput(4.5,1.5){\pstPerson[male, insidetext=?,
1006 %       belowtext=III:5]{III:5}} 
1007 %     \pstDescent{II:3_4}{III:5}
1008 %   \end{pspicture}
1009 %   \caption{Example of a Pedigree of a Family With PROMM
1010 %   From~\cite[p.~48]{Harper01:MDBook}} 
1011 %   \label{fig:example_PROMM}
1012 % \end{figure}
1013 %
1014 %
1015 % \begin{figure}
1016 %   \centering
1017 % \begin{verbatim}
1018 %   \begin{pspicture}(6,6)
1019 %     \psset{belowtextrp=t, armB=1}
1020 %     \rput(2.5,5.5){\pstPerson[male, deceased, belowtext=I:1]{I:1}}
1021 %     \rput(3.5,5.5){\pstPerson[female, deceased, belowtext=I:2]{I:2}}
1022 %     \pstRelationship[descentnode=I:1_2]{I:1}{I:2}
1023 %     \rput(1,3.5){\pstPerson[female, affected, belowtext=II:1]{II:1}}
1024 %     \pstDescent{I:1_2}{II:1}
1025 %     \rput(2,3.5){\pstPerson[male, belowtext=II:2]{II:2}}
1026 %     \pstRelationship[descentnode=II:1_2]{II:1}{II:2}
1027 %     \rput(3.5,3.5){\pstPerson[male, affected, belowtext=II:3]{II:3}}
1028 %     \pstDescent{I:1_2}{II:3}
1029 %     \rput(4.5,3.5){\pstPerson[female, belowtext=II:4]{II:4}}
1030 %     \pstRelationship[descentnode=II:3_4]{II:3}{II:4}
1031 %     \rput(5.5,3.5){\pstPerson[female, affected, deceased, proband,
1032 %       belowtext=II:5]{II:5}}
1033 %     \pstDescent{I:1_2}{II:5}
1034 %     \rput(0.5,1.5){\pstPerson[female, belowtext=III:1]{III:1}}
1035 %     \pstDescent{II:1_2}{III:1}
1036 %     \rput(1.5,1.5){\pstPerson[female, belowtext=III:2]{III:2}}
1037 %     \pstDescent{II:1_2}{III:2}
1038 %     \rput(2.5,1.5){\pstPerson[female, deceased,
1039 %       belowtext=\parbox{2cm}{\centering III:3\\4/52}]{III:3}} 
1040 %     \pstDescent{II:1_2}{III:3}
1041 %     \rput(3.5,1.5){\pstPerson[female, affected,
1042 %       belowtext=III:4]{III:4}} 
1043 %     \pstDescent{II:3_4}{III:4}
1044 %     \rput(4.5,1.5){\pstPerson[male, insidetext=?,
1045 %       belowtext=III:5]{III:5}} 
1046 %     \pstDescent{II:3_4}{III:5}
1047 %   \end{pspicture}
1048 % \end{verbatim}
1049 %   \caption{Code Producing Figure~\ref{fig:example_PROMM}}
1050 %   \label{fig:example_PROMM_code}
1051 % \end{figure}
1052 %
1053 %
1054 % A very complex pedigree is used as an example
1055 % in~\cite{PedigreeNomenclature95}.  On
1056 % Figure~\ref{fig:complex_example} we reproduce this pedigree. The
1057 % corresponding code is shown on
1058 % Figures~\ref{fig:complex_example_codeI},
1059 % \ref{fig:complex_example_codeII} and~\ref{fig:complex_example_codeIII}.
1060 %
1061 % \begin{figure}
1062 %   \centering
1063 %   \rotatebox{90}{
1064 %       \begin{pspicture}(0.7,0)(21.3,9)
1065 %         \psset{armB=1.1, hatchsep=1.5pt}
1066 %         \rput(3.5,8){Ethnic Background}
1067 %         \rput(18.5,8){Ethnic Background}
1068 %         \rput(3.5,7.5){\rnode{OType1}{O'Type}}
1069 %         \rput(18.5,7.5){\pnode{Origin2}}
1070 %         \rput(6.5,7.5){\rnode{Quest1}{?}}
1071 %         \rput(1,6.5){\Huge I}
1072 %         \rput(1.5,6.5){\pstPerson[male, belowtext=1]{I1}}
1073 %         \rput(2.5,6.5){\pstPerson[female, obligatory, belowtext=2]{I2}}
1074 %         \rput(3.5,6.5){\pstPerson[male, belowtext=3]{I3}}
1075 %         \rput(4.5,6.5){\pstPerson[male, belowtext=4]{I4}}
1076 %         \rput(5.5,6.5){\pstPerson[male, belowtext=5]{I5}}
1077 %         \rput(6.5,6.5){\pstPerson[female, affected,
1078 %             belowtext=6]{I6}}
1079 %         \rput(2,7.2){\pnode{Twins1}}
1080 %         \rput(4,7.2){\pnode{Twins2}}
1081 %         \pstTwins[armB=0]{OType1}{Twins1}{I1}{I2}
1082 %         \pstTwins[qzygotic, armB=0, mzlinepos=0.8]{OType1}{Twins2}{I3}{I4}
1083 %         \pstDescent[armB=0]{OType1}{I5}
1084 %         \pstDescent[armB=0]{Quest1}{I6}
1085 %         \pstRelationship[descentnode=I5I6]{I5}{I6}
1086 %         \rput(1.5,5.5){\pstChildless{CI1}}
1087 %         \ncline{I1}{CI1}
1088 %         \rput(13.5,6.5){\pstPerson[male, deceased, belowtextrp=t,
1089 %              belowtext=\parbox{2cm}{\centering d. 72 y\\7}]{I7}}
1090 %         \rput(15.5,6.5){\pstPerson[female, deceased, belowtextrp=t,
1091 %              belowtext=\parbox{2cm}{\centering d. 70 y\\8}]{I8}}
1092 %         \pstRelationship[descentnode=I7I8]{I7}{I8}
1093 %         \rput(21,6.5){\pstPerson[insidetext=5, belowtext=9--14,
1094 %            belowtextrp=rt]{I9}}
1095 %         \pstDescent[armB=0]{Origin2}{I8}
1096 %         \pstDescent[armB=0]{Origin2}{I9}
1097 %         \rput(1,4.5){\Huge II}
1098 %         \rput(2.5,4.5){\pstPerson[male, affected, belowtext=1,
1099 %              abovetext=Proto, abovetextrp=rB]{II1}} 
1100 %         \pstDescent{I2}{II1}
1101 %         \rput(4.5,4.5){\pstPerson[female, asymptomatic,
1102 %             belowtext=\parbox{3cm}{32 y\\
1103 %             $E_3-$\\$E_4+$(45n/18n)\\2}, abovetext={Sterrie},
1104 %             abovetextrp=rB, evaluated]{II2}}  
1105 %         \pstDescent{I5I6}{II2}
1106 %         \pstRelationship[consanguinic, descentnode=II1II2]{II1}{II2}
1107 %         \rput(5.5,5.2){\rnode{Quest2}{?}}
1108 %         \rput(5.5,4.5){\pstPerson[female, insidetext=D,
1109 %             belowtext=3]{II3}}
1110 %         \ncline{Quest2}{II3}
1111 %         \rput(6.5,5.2){\rnode{Quest3}{?}}
1112 %         \rput(6.5,4.5){\pstPerson[male, insidetext=D,
1113 %             belowtext=4]{II4}}
1114 %         \ncline{Quest3}{II4}
1115 %         \rput(7.5,4.5){\pstPerson[female, belowtext=5]{II5}}
1116 %         \rput(8.5,4.5){\pstPerson[male, abovetext=Gary, abovetextrp=rB,
1117 %            belowtext=\parbox{2cm}{36 y\\$E_3-$\\6},
1118 %            evaluated]{II6}} 
1119 %         \rput(9.5,4.5){\pstPerson[male, abovetext={Gene},
1120 %            belowtext=\parbox{2cm}{36 y\\$E_3-$\\7},
1121 %            evaluated]{II7}} 
1122 %         \rput(9,5.2){\pnode{Twins3}}
1123 %         \pstTwins[monozygotic]{I5I6}{Twins3}{II6}{II7}
1124 %         \pstRelationship{II5}{II6}
1125 %         \rput(7.5,5.7){O'Type}
1126 %         \rput(11.5,4.5){\pstPerson[female, proband,
1127 %             belowtext=\parbox{1cm}{35 y\\8}, abovetext=Feene]{II8}}
1128 %         \pstRelationship[descentnode=II7II8]{II7}{II8}
1129 %         \rput(13.5,4.5){\pstPerson[male, belowtext=9]{II9}}
1130 %         \pstRelationship[broken, descentnode=II8II9,
1131 %              descentnodepos=0.85]{II8}{II9} 
1132 %         \rput(16,4.5){\pstPerson[abovetext=Stacey, female,
1133 %             abovetextrp=rB, 
1134 %             belowtext=\parbox{1cm}{33y\\ 10}]{II10}}
1135 %         \def\affectedstyle{fillstyle=crosshatch}
1136 %         \rput(17,4.5){\pstPerson[male, affected, abovetext=Sam,
1137 %             belowtext=\parbox{3cm}{31 y\\ $E_2+$\\
1138 %             11}, hatchsep=3pt]{II11}}
1139 %         \rput(17,3.5){\pstChildless[infertile]{C2}}
1140 %         \ncline{II11}{C2}
1141 %         \rput(18,4.5){\pstPerson[male, obligatory,
1142 %             abovetext=Donald, 
1143 %             belowtext=\parbox{3cm}{29 y\\ $E_2+$ \\
1144 %             12}]{II12}}
1145 %         \pstDescent{I7I8}{II8}
1146 %         \pstDescent{I7I8}{II10}
1147 %         \pstDescent{I7I8}{II11}
1148 %         \pstDescent{I7I8}{II12}
1149 %         \rput(19,4.5){\pstPerson[female, belowtext=13]{II13}}
1150 %         \pstRelationship[descentnode=II12II13]{II12}{II13}
1151 %         \rput(20,4.5){\pstPerson[female, insidetext=S, 
1152 %             belowtext=14]{II14}}
1153 %         \rput(21,4.5){\pstPerson[insidetext=n]{II15}}
1154 %         \pstDescent{I9}{II15}
1155 %         \rput(1,2.5){\Huge III}
1156 %         \rput(3,2.5){\pstPerson[male, adopted, belowtext=1]{III1}}
1157 %         \rput(4,2.5){\pstPerson[insidetext=P, belowtext=2]{III2}}
1158 %         \pstDescent[linestyle=dashed]{II1II2}{III1}
1159 %         \pstDescent{II1II2}{III2}
1160 %         \ncline{II3}{III2}
1161 %         \rput(7.5,2.5){\pstPerson[insidetext=P,
1162 %              belowtext=\parbox{2cm}{6 wk\\3}]{III3}}
1163 %         \pstDescent{II5}{III3}
1164 %         \ncline{II4}{III3}
1165 %         \def\affectedstyle{fillstyle=vlines}
1166 %         \rput(10,2.5){\pstAbortion[affected, 
1167 %             belowtext=\parbox{2cm}{\centering 
1168 %               female\\18wk\\$E_1+$(tri 21)\\4},
1169 %               belowtextrp=t]{III4}}
1170 %           \rput(11,2.5){\pstPerson[insidetext=P,
1171 %               belowtext=\parbox{1cm}{16wk\\5}]{III5}}
1172 %         \pstDescent{II7II8}{III4}
1173 %         \pstDescent{II7II8}{III5}
1174 %         \rput(12,2.5){\pstAbortion[belowtext=6]{III6}}
1175 %         \rput(13,2.5){\pstAbortion[sab, belowtextrp=t,
1176 %               belowtext=\parbox{2cm}{\centering female\\19 wk\\
1177 %               7}]{III7}}
1178 %         \rput(14,2.5){\pstPerson[adopted, male,
1179 %               belowtext=\parbox{1cm}{10 y\\ 8}]{III8}}
1180 %         \pstDescent{II8II9}{III6}
1181 %         \pstDescent{II8II9}{III7}
1182 %         \pstDescent{II8II9}{III8}
1183 %         \ncline[linestyle=dashed]{II10}{III8}
1184 %         \rput(15,2.5){\pstAbortion[sab, belowtext=9]{III9}}
1185 %         \def\affectedstyle{fillstyle=hlines}
1186 %         \rput(16,2.5){\pstAbortion[sab, belowtextrp=t, affected, 
1187 %             belowtext=\parbox{2cm}{\centering male\\ 20 wk\\ $E_1+$
1188 %             (tri 18)\\ 10}]{III10}}
1189 %         \rput(17,2.5){\pstPerson[deceased, female,
1190 %             belowtext=\parbox{1cm}{\centering SB\\32 wk\\
1191 %             11}]{III11}}
1192 %         \pstDescent{II10}{III9}
1193 %         \pstDescent{II10}{III10}
1194 %         \pstDescent{II10}{III11}
1195 %         \rput(20,2.5){\pstPerson[insidetext=P, 
1196 %             belowtext=12]{III12}}
1197 %         \pstDescent{II14}{III12}
1198 %         \ncline{II12II13}{III12}
1199 %       \end{pspicture}
1200 %   }
1201 %   \caption{A Complex Pedigree From~\cite{PedigreeNomenclature95}}
1202 %   \label{fig:complex_example}
1203 % \end{figure}
1204 %
1205 %
1206 % \begin{figure}
1207 %   \centering
1208 % \begin{verbatim}
1209 %         \psset{armB=1.1, hatchsep=1.5pt}
1210 %         \rput(3.5,8){Ethnic Background}
1211 %         \rput(18.5,8){Ethnic Background}
1212 %         \rput(3.5,7.5){\rnode{OType1}{O'Type}}
1213 %         \rput(18.5,7.5){\pnode{Origin2}}
1214 %         \rput(6.5,7.5){\rnode{Quest1}{?}}
1215 %         \rput(1,6.5){\Huge I}
1216 %         \rput(1.5,6.5){\pstPerson[male, belowtext=1]{I1}}
1217 %         \rput(2.5,6.5){\pstPerson[female, obligatory, belowtext=2]{I2}}
1218 %         \rput(3.5,6.5){\pstPerson[male, belowtext=3]{I3}}
1219 %         \rput(4.5,6.5){\pstPerson[male, belowtext=4]{I4}}
1220 %         \rput(5.5,6.5){\pstPerson[male, belowtext=5]{I5}}
1221 %         \rput(6.5,6.5){\pstPerson[female, affected,
1222 %             belowtext=6]{I6}}
1223 %         \rput(2,7.2){\pnode{Twins1}}
1224 %         \rput(4,7.2){\pnode{Twins2}}
1225 %         \pstTwins[armB=0]{OType1}{Twins1}{I1}{I2}
1226 %         \pstTwins[qzygotic, armB=0, mzlinepos=0.8]{OType1}{Twins2}{I3}{I4}
1227 %         \pstDescent[armB=0]{OType1}{I5}
1228 %         \pstDescent[armB=0]{Quest1}{I6}
1229 %         \pstRelationship[descentnode=I5I6]{I5}{I6}
1230 %         \rput(1.5,5.5){\pstChildless{CI1}}
1231 %         \ncline{I1}{CI1}
1232 %         \rput(13.5,6.5){\pstPerson[male, deceased, belowtextrp=t,
1233 %              belowtext=\parbox{2cm}{\centering d. 72 y\\7}]{I7}}
1234 %         \rput(15.5,6.5){\pstPerson[female, deceased, belowtextrp=t,
1235 %              belowtext=\parbox{2cm}{\centering d. 70 y\\8}]{I8}}
1236 %         \pstRelationship[descentnode=I7I8]{I7}{I8}
1237 %         \rput(21,6.5){\pstPerson[insidetext=5, belowtext=9--14,
1238 %            belowtextrp=rt]{I9}}
1239 %         \pstDescent[armB=0]{Origin2}{I8}
1240 %         \pstDescent[armB=0]{Origin2}{I9}
1241 % \end{verbatim}
1242 %   \caption{Code for Figure~\ref{fig:complex_example}:  Generation I}
1243 %   \label{fig:complex_example_codeI}
1244 % \end{figure}
1245 %
1246 % \begin{figure}
1247 %   \centering
1248 % \begin{verbatim}
1249 %         \rput(1,4.5){\Huge II}
1250 %         \rput(2.5,4.5){\pstPerson[male, affected, belowtext=1,
1251 %              abovetext=Proto, abovetextrp=rB]{II1}} 
1252 %         \pstDescent{I2}{II1}
1253 %         \rput(4.5,4.5){\pstPerson[female, asymptomatic,
1254 %             belowtext=\parbox{3cm}{32 y\\
1255 %             $E_3-$\\$E_4+$(45n/18n)\\2}, abovetext={Sterrie},
1256 %             abovetextrp=rB, evaluated]{II2}}  
1257 %         \pstDescent{I5I6}{II2}
1258 %         \pstRelationship[consanguinic, descentnode=II1II2]{II1}{II2}
1259 %         \rput(5.5,5.2){\rnode{Quest2}{?}}
1260 %         \rput(5.5,4.5){\pstPerson[female, insidetext=D,
1261 %             belowtext=3]{II3}}
1262 %         \ncline{Quest2}{II3}
1263 %         \rput(6.5,5.2){\rnode{Quest3}{?}}
1264 %         \rput(6.5,4.5){\pstPerson[male, insidetext=D,
1265 %             belowtext=4]{II4}}
1266 %         \ncline{Quest3}{II4}
1267 %         \rput(7.5,4.5){\pstPerson[female, belowtext=5]{II5}}
1268 %         \rput(8.5,4.5){\pstPerson[male, abovetext=Gary, abovetextrp=rB,
1269 %            belowtext=\parbox{2cm}{36 y\\$E_3-$\\6},
1270 %            evaluated]{II6}} 
1271 %         \rput(9.5,4.5){\pstPerson[male, abovetext={Gene},
1272 %            belowtext=\parbox{2cm}{36 y\\$E_3-$\\7},
1273 %            evaluated]{II7}} 
1274 %         \rput(9,5.2){\pnode{Twins3}}
1275 %         \pstTwins[monozygotic]{I5I6}{Twins3}{II6}{II7}
1276 %         \pstRelationship{II5}{II6}
1277 %         \rput(7.5,5.7){O'Type}
1278 %         \rput(11.5,4.5){\pstPerson[female, proband,
1279 %             belowtext=\parbox{1cm}{35 y\\8}, abovetext=Feene]{II8}}
1280 %         \pstRelationship[descentnode=II7II8]{II7}{II8}
1281 %         \rput(13.5,4.5){\pstPerson[male, belowtext=9]{II9}}
1282 %         \pstRelationship[broken, descentnode=II8II9,
1283 %              descentnodepos=0.85]{II8}{II9} 
1284 %         \rput(16,4.5){\pstPerson[abovetext=Stacey, female,
1285 %             abovetextrp=rB, 
1286 %             belowtext=\parbox{1cm}{33y\\ 10}]{II10}}
1287 %         \def\affectedstyle{fillstyle=crosshatch}
1288 %         \rput(17,4.5){\pstPerson[male, affected, abovetext=Sam,
1289 %             belowtext=\parbox{3cm}{31 y\\ $E_2+$\\
1290 %             11}, hatchsep=3pt]{II11}}
1291 %         \rput(17,3.5){\pstChildless[infertile]{C2}}
1292 %         \ncline{II11}{C2}
1293 %         \rput(18,4.5){\pstPerson[male, obligatory,
1294 %             abovetext=Donald, 
1295 %             belowtext=\parbox{3cm}{29 y\\ $E_2+$ \\
1296 %             12}]{II12}}
1297 %         \pstDescent{I7I8}{II8}
1298 %         \pstDescent{I7I8}{II10}
1299 %         \pstDescent{I7I8}{II11}
1300 %         \pstDescent{I7I8}{II12}
1301 %         \rput(19,4.5){\pstPerson[female, belowtext=13]{II13}}
1302 %         \pstRelationship[descentnode=II12II13]{II12}{II13}
1303 %         \rput(20,4.5){\pstPerson[female, insidetext=S, 
1304 %             belowtext=14]{II14}}
1305 %         \rput(21,4.5){\pstPerson[insidetext=n]{II15}}
1306 %         \pstDescent{I9}{II15}
1307 % \end{verbatim}
1308 %   \caption{Code for Figure~\ref{fig:complex_example}:  Generation II}
1309 %   \label{fig:complex_example_codeII}
1310 % \end{figure}
1311 %
1312 % \begin{figure}
1313 %   \centering
1314 % \begin{verbatim}
1315 %         \rput(1,2.5){\Huge III}
1316 %         \rput(3,2.5){\pstPerson[male, adopted, belowtext=1]{III1}}
1317 %         \rput(4,2.5){\pstPerson[insidetext=P, belowtext=2]{III2}}
1318 %         \pstDescent[linestyle=dashed]{II1II2}{III1}
1319 %         \pstDescent{II1II2}{III2}
1320 %         \ncline{II3}{III2}
1321 %         \rput(7.5,2.5){\pstPerson[insidetext=P,
1322 %              belowtext=\parbox{2cm}{6 wk\\3}]{III3}}
1323 %         \pstDescent{II5}{III3}
1324 %         \ncline{II4}{III3}
1325 %         \def\affectedstyle{fillstyle=vlines}
1326 %         \rput(10,2.5){\pstAbortion[affected, 
1327 %             belowtext=\parbox{2cm}{\centering 
1328 %               female\\18wk\\$E_1+$(tri 21)\\4},
1329 %               belowtextrp=t]{III4}}
1330 %           \rput(11,2.5){\pstPerson[insidetext=P,
1331 %               belowtext=\parbox{1cm}{16wk\\5}]{III5}}
1332 %         \pstDescent{II7II8}{III4}
1333 %         \pstDescent{II7II8}{III5}
1334 %         \rput(12,2.5){\pstAbortion[belowtext=6]{III6}}
1335 %         \rput(13,2.5){\pstAbortion[sab, belowtextrp=t,
1336 %               belowtext=\parbox{2cm}{\centering female\\19 wk\\
1337 %               7}]{III7}}
1338 %         \rput(14,2.5){\pstPerson[adopted, male,
1339 %               belowtext=\parbox{1cm}{10 y\\ 8}]{III8}}
1340 %         \pstDescent{II8II9}{III6}
1341 %         \pstDescent{II8II9}{III7}
1342 %         \pstDescent{II8II9}{III8}
1343 %         \ncline[linestyle=dashed]{II10}{III8}
1344 %         \rput(15,2.5){\pstAbortion[sab, belowtext=9]{III9}}
1345 %         \def\affectedstyle{fillstyle=hlines}
1346 %         \rput(16,2.5){\pstAbortion[sab, belowtextrp=t, affected, 
1347 %             belowtext=\parbox{2cm}{\centering male\\ 20 wk\\ $E_1+$
1348 %             (tri 18)\\ 10}]{III10}}
1349 %         \rput(17,2.5){\pstPerson[deceased, female,
1350 %             belowtext=\parbox{1cm}{\centering SB\\32 wk\\
1351 %             11}]{III11}}
1352 %         \pstDescent{II10}{III9}
1353 %         \pstDescent{II10}{III10}
1354 %         \pstDescent{II10}{III11}
1355 %         \rput(20,2.5){\pstPerson[insidetext=P, 
1356 %             belowtext=12]{III12}}
1357 %         \pstDescent{II14}{III12}
1358 %         \ncline{II12II13}{III12}
1359 % \end{verbatim}
1360 %   \caption{Code for Figure~\ref{fig:complex_example}:  Generation III}
1361 %   \label{fig:complex_example_codeIII}
1362 % \end{figure}
1363 %\clearpage
1364 %
1365 %
1366 %\StopEventually{}
1367 %
1368 %\section{Implementation}
1369 %\label{sec:implementation}
1370 %
1371 %
1372 %
1373 %\subsection{Identification and Setting Up}
1374 %\label{sec:identification}
1375 %
1376 %
1377 %Traditionally |PSTricks| works in two regimes:  the \LaTeX one and
1378 %the plain one.  Probably it is a good idea to keep this
1379 %tradition. Therefore we will use a \TeX{} file \path{pst-pdgr.tex}
1380 %and a \LaTeX file \path{pst-pdgr.sty}.  They have different means of
1381 %preserving from loading twice and identification.  
1382 %
1383 % \begin{macro}{\PSTPedigreeLoaded}
1384 % A \TeX{} guard |\PSTPedigreeLoaded| prevents the double loading
1385 % of the file:
1386 %    \begin{macrocode}
1387 %<*tex>
1388 \csname PSTPedigreeLoaded\endcsname
1389 \let\PSTPedigreeLoaded\endinput
1390 %</tex>
1391 %    \end{macrocode}
1392 % \end{macro}
1393 %
1394 %Now we can start real identification.  Note the difference between
1395 %the ways a \LaTeX{} style, a \LaTeX{} configuration file and a \TeX{}
1396 %file announce itself
1397 %    \begin{macrocode}
1398 %<latex>\NeedsTeXFormat{LaTeX2e}
1399 %<latex>\ProvidesPackage{pst-pdgr}
1400 %<cfg>\ProvidesFile{pst-pdgr.cfg}
1401 %<tex>\message{
1402 [2006/04/18 v0.2a Medical Pedigree with PSTricks]
1403 %<tex>}
1404 %    \end{macrocode}
1405 %
1406 % The \LaTeX{} style is in fact just a wrapper: it calls the
1407 % configuration file, and then the \TeX file, which does the real
1408 % work:
1409 %    \begin{macrocode}
1410 %<*latex>
1411 \InputIfFileExists{pst-pdgr.cfg}{%
1412   \typeout{Loading configuration file pst-pdgr.cfg}}{%
1413   \typeout{Configuration file pst-pdgr.cfg is not found}}
1414 \input{pst-pdgr.tex}
1415 %</latex>
1416 %    \end{macrocode}
1417 %
1418 % Now we are dealing (almost) exclusively with \TeX.
1419 %    \begin{macrocode}
1420 %<*tex>
1421 %    \end{macrocode}
1422 %
1423 % Check the packages we use  are loaded:
1424 %    \begin{macrocode}
1425 \ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
1426 \ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi
1427 \ifx\PSTreeLoaded\endinput\else\input pst-tree.tex\fi
1428 \ifx\PSTXKeyLoaded\endinput\else\input pst-xkey.tex\fi
1429 %    \end{macrocode}
1430 %
1431 % We set up that |@| symbol:
1432 %    \begin{macrocode}
1433 \catcode`\@=11\relax
1434 %    \end{macrocode}
1435 % and set up keys for our package
1436 %    \begin{macrocode}
1437 \pst@addfams{pst-pdgr}
1438 %    \end{macrocode}
1439 %
1440 %\subsection{Global Parameters}
1441 %\label{sec:impl_globals}
1442 %
1443 % These macros define the way affected individuals are drawn
1444 % \begin{macro}{\affectedbgcolor}
1445 % The background color:
1446 %    \begin{macrocode}
1447 \def\affectedbgcolor{gray}
1448 %    \end{macrocode}
1449 % \end{macro}
1450 % \begin{macro}{\affectedfgcolor}
1451 % The foreground color for the text:
1452 %    \begin{macrocode}
1453 \def\affectedfgcolor{white}
1454 %    \end{macrocode}
1455 % \end{macro}
1456 % \begin{macro}{\affectedstyle}
1457 %   And the style:
1458 %    \begin{macrocode}
1459 \def\affectedstyle{fillstyle=solid, fillcolor=\affectedbgcolor}
1460 %    \end{macrocode}
1461 % \end{macro}
1462 % \begin{macro}{\pst@pdgr@intxtcolor}
1463 % Normally the color of the inside text for normal persons is the
1464 % current color:
1465 %    \begin{macrocode}
1466 \def\pst@pdgr@instxtcolor{\relax}
1467 %    \end{macrocode}
1468 % \end{macro}
1469 %
1470 %
1471 %
1472 %\subsection{Options}
1473 %\label{sec:impl_opts}
1474 %
1475 % Here we define the option for the commands and their action.
1476 %
1477 %
1478 %\subsubsection{Choice Options}
1479 %\label{sec:impl_choice}
1480 %
1481 % This groups of options sets a key from a given set of choices.
1482 % \begin{macro}{\pst@pdgr@sex}
1483 %   First, the sex of the person.  The numbers 0, 1 and 2 correspond
1484 %   to the sequence in the alternatives list
1485 %    \begin{macrocode}
1486 \def\pst@pdgr@sex{0}
1487 \define@choicekey[psset]{pst-pdgr}{sex}[\pst@pdgr@temp \pst@pdgr@sex]{%
1488   unknown,male,female}[unknown]{}
1489 %    \end{macrocode}
1490 % \end{macro}
1491 % \begin{macro}{\pst@pdgr@condition}
1492 %   Next, the condition of the person.  The numbers again correspond
1493 %   to the sequence in the alternatives list
1494 %    \begin{macrocode}
1495 \def\pst@pdgr@condition{0}
1496 \define@choicekey[psset]{pst-pdgr}{%
1497   condition}[\pst@pdgr@temp \pst@pdgr@condition]{%
1498   normal,obligatory,asymptomatic,affected}[normal]{}
1499 %    \end{macrocode}
1500 % \end{macro}
1501 %
1502 % A bunch of shortcuts
1503 %    \begin{macrocode}
1504 \define@key[psset]{pst-pdgr}{unknown}[]{\psset{sex=unknown}}
1505 \define@key[psset]{pst-pdgr}{male}[]{\psset{sex=male}}
1506 \define@key[psset]{pst-pdgr}{female}[]{\psset{sex=female}}
1507 \define@key[psset]{pst-pdgr}{normal}[]{\psset{condition=normal}}
1508 \define@key[psset]{pst-pdgr}{obligatory}[]{\psset{condition=obligatory}}
1509 \define@key[psset]{pst-pdgr}{asymptomatic}[]{\psset{condition=asymptomatic}}
1510 \define@key[psset]{pst-pdgr}{affected}[]{\psset{condition=affected}}
1511 %    \end{macrocode}
1512 %
1513 %
1514 %
1515 %\subsubsection{Boolean Options}
1516 %\label{sec:impl_bool}
1517 %
1518 % True or false options.  
1519 %
1520 %
1521 % \begin{macro}{\pst@pdgr@defineboolkey}
1522 %   We use use our own version of definition of boolean keys, rather
1523 %   than the one provided by |xkeyval|.
1524 %    \begin{macrocode}
1525 \def\pst@pdgr@defineboolkey#1{%
1526 \expandafter\newif\csname ifpst@pdgr@#1\endcsname%
1527 \csname pst@pdgr@#1false\endcsname%
1528 \define@key[psset]{pst-pdgr}{#1}[true]{%
1529   \@nameuse{pst@pdgr@#1##1}}}
1530 %    \end{macrocode}
1531 % \end{macro}
1532 %
1533 %
1534 % \begin{macro}{\ifpst@pdgr@deceased}
1535 % Whether the individual is deceased:
1536 %    \begin{macrocode}
1537 \pst@pdgr@defineboolkey{deceased}
1538 %    \end{macrocode}
1539 % \end{macro}
1540 % \begin{macro}{\ifpst@pdgr@proband}
1541 % Whether the individual is a proband:
1542 %    \begin{macrocode}
1543 \pst@pdgr@defineboolkey{proband}
1544 %    \end{macrocode}
1545 % \end{macro}
1546 % \begin{macro}{\ifpst@pdgr@adopted}
1547 % Whether the individual is adopted:
1548 %    \begin{macrocode}
1549 \pst@pdgr@defineboolkey{adopted}
1550 %    \end{macrocode}
1551 % \end{macro}
1552 % \begin{macro}{\ifpst@pdgr@evaluated}
1553 % Whether the individual is evaluated:
1554 %    \begin{macrocode}
1555 \pst@pdgr@defineboolkey{evaluated}
1556 %    \end{macrocode}
1557 % \end{macro}
1558 % \begin{macro}{\ifpst@pdgr@sab}
1559 % Whether the abortion is SAB:
1560 %    \begin{macrocode}
1561 \pst@pdgr@defineboolkey{sab}
1562 %    \end{macrocode}
1563 % \end{macro}
1564 % \begin{macro}{\ifpst@pdgr@infertile}
1565 % Whether the individual or relationship is infertile:
1566 %    \begin{macrocode}
1567 \pst@pdgr@defineboolkey{infertile}
1568 %    \end{macrocode}
1569 % \end{macro}
1570 % \begin{macro}{\ifpst@pdgr@broken}
1571 % Whether the relationship is broken:
1572 %    \begin{macrocode}
1573 \pst@pdgr@defineboolkey{broken}
1574 %    \end{macrocode}
1575 % \end{macro}
1576 % \begin{macro}{\ifpst@pdgr@consanguinic}
1577 % Whether the relationship is consanguinic:
1578 %    \begin{macrocode}
1579 \pst@pdgr@defineboolkey{consanguinic}
1580 %    \end{macrocode}
1581 % \end{macro}
1582 % \begin{macro}{\ifpst@pdgr@monozygotic}
1583 % Whether the twins are monozygotic:
1584 %    \begin{macrocode}
1585 \pst@pdgr@defineboolkey{monozygotic}
1586 %    \end{macrocode}
1587 % \end{macro}
1588 % \begin{macro}{\ifpst@pdgr@qzygotic}
1589 % Whether the are questionably monozygotic:
1590 %    \begin{macrocode}
1591 \pst@pdgr@defineboolkey{qzygotic}
1592 %    \end{macrocode}
1593 % \end{macro}
1594
1595 %
1596 %
1597 %
1598 %\subsubsection{String Options}
1599 %\label{sec:impl_string}
1600 %
1601 % Options setting up strings.
1602 %
1603 %  
1604 % \begin{macro}{\pst@pdgr@insidetext}
1605 % Text inside the symbol
1606 %    \begin{macrocode}
1607 \def\pst@pdgr@insidetext{}%
1608 \define@key[psset]{pst-pdgr}{insidetext}{%
1609   \def\pst@pdgr@insidetext{#1}}%
1610 %    \end{macrocode}
1611 % \end{macro}
1612 % \begin{macro}{\pst@pdgr@belowtext}
1613 % Text below the symbol
1614 %    \begin{macrocode}
1615 \def\pst@pdgr@belowtext{}%
1616 \define@key[psset]{pst-pdgr}{belowtext}{%
1617   \def\pst@pdgr@belowtext{#1}}%
1618 %    \end{macrocode}
1619 % \end{macro}
1620 % \begin{macro}{\pst@pdgr@abovetext}
1621 % Text above the symbol
1622 %    \begin{macrocode}
1623 \def\pst@pdgr@abovetext{}%
1624 \define@key[psset]{pst-pdgr}{abovetext}{%
1625   \def\pst@pdgr@abovetext{#1}}%
1626 %    \end{macrocode}
1627 % \end{macro}
1628 % \begin{macro}{\pst@pdgr@lefttext}
1629 % Text to the left of the symbol
1630 %    \begin{macrocode}
1631 \def\pst@pdgr@lefttext{}%
1632 \define@key[psset]{pst-pdgr}{lefttext}{%
1633   \def\pst@pdgr@lefttext{#1}}%
1634 %    \end{macrocode}
1635 % \end{macro}
1636 % \begin{macro}{\pst@pdgr@righttext}
1637 % Text to the right of the symbol
1638 %    \begin{macrocode}
1639 \def\pst@pdgr@righttext{}%
1640 \define@key[psset]{pst-pdgr}{righttext}{%
1641   \def\pst@pdgr@righttext{#1}}%
1642 %    \end{macrocode}
1643 % \end{macro}
1644 % \begin{macro}{\pst@pdgr@descentnode}
1645 % Name of the descent node
1646 %    \begin{macrocode}
1647 \def\pst@pdgr@descentnode{}%
1648 \define@key[psset]{pst-pdgr}{descentnode}{%
1649   \def\pst@pdgr@descentnode{#1}}%
1650 %    \end{macrocode}
1651 % \end{macro}
1652 % \begin{macro}{\pst@pdgr@rellinecmd}
1653 % Command to draw relationship lines:
1654 %    \begin{macrocode}
1655 \def\pst@pdgr@rellinecmd{\ncline}%
1656 \define@key[psset]{pst-pdgr}{rellinecmd}{%
1657   \def\pst@pdgr@rellinecmd{\@nameuse{#1}}}%
1658 %    \end{macrocode}
1659 % \end{macro}
1660 %
1661 % A number of text positioning commands.
1662 % \begin{macro}{\pst@pdgr@abovetextrp}
1663 % The command to set the reference position for the text above the
1664 % symbol.
1665 %    \begin{macrocode}
1666 \def\pst@pdgr@abovetextrp{lB}%
1667 \define@key[psset]{pst-pdgr}{abovetextrp}{%
1668   \def\pst@pdgr@abovetextrp{#1}}%
1669 %    \end{macrocode}
1670 %   \changes{v0.2}{2006/04/18}{Added the command}
1671 % \end{macro}
1672 % \begin{macro}{\pst@pdgr@belowtextrp}
1673 % The command to set the reference position for the text below the
1674 % symbol.
1675 %    \begin{macrocode}
1676 \def\pst@pdgr@belowtextrp{lt}%
1677 \define@key[psset]{pst-pdgr}{belowtextrp}{%
1678   \def\pst@pdgr@belowtextrp{#1}}%
1679 %    \end{macrocode}
1680 %   \changes{v0.2}{2006/04/18}{Added the command}
1681 % \end{macro}
1682 % \begin{macro}{\pst@pdgr@lefttextrp}
1683 % The command to set the reference position for the text to the left
1684 % of the symbol.
1685 %    \begin{macrocode}
1686 \def\pst@pdgr@lefttextrp{r}%
1687 \define@key[psset]{pst-pdgr}{lefttextrp}{%
1688   \def\pst@pdgr@lefttextrp{#1}}%
1689 %    \end{macrocode}
1690 %   \changes{v0.2}{2006/04/18}{Added the command}
1691 % \end{macro}
1692 % \begin{macro}{\pst@pdgr@righttextrp}
1693 % The command to set the reference position for the text to the right
1694 % of the symbol.
1695 %    \begin{macrocode}
1696 \def\pst@pdgr@righttextrp{l}%
1697 \define@key[psset]{pst-pdgr}{righttextrp}{%
1698   \def\pst@pdgr@righttextrp{#1}}%
1699 %    \end{macrocode}
1700 %   \changes{v0.2}{2006/04/18}{Added the command}
1701 % \end{macro}
1702 %
1703 % The option |addtwin| for |\pstTwin| command is special.  Since it
1704 % can be repeated, we want it to be executed immediately.  We store
1705 % the name of the descentnode in |\pst@pdgr@tempnode|
1706 %    \begin{macrocode}
1707 \define@key[psset]{pst-pdgr}{addtwin}{\ncline{\pst@pdgr@tempnode}{#1}}%
1708 \define@key[psset]{pst-pdgr}{descentnode}{%
1709   \def\pst@pdgr@descentnode{#1}}%
1710 %    \end{macrocode}
1711 %
1712 %
1713 %
1714 %\subsubsection{Numerical Options}
1715 %\label{sec:impl_opts_num}
1716 %
1717 % The options to set up numerical values.
1718 %
1719 % \begin{macro}{\pst@pdgr@descentnodepos}
1720 % The position of the descent node on the relationship line
1721 %    \begin{macrocode}
1722 \def\pst@pdgr@descentnodepos{0.5}
1723 \define@key[psset]{pst-pdgr}{descentnodepos}{%
1724   \pst@checknum{#1}\pst@pdgr@descentnodepos%
1725   \ifdim\pst@pdgr@descentnodepos \p@<\z@
1726   \def\pst@pdgr@descentnodepos{0.5}%
1727   \@pstrickserr{Bad `descentnodepos' value: `#1'. Must be >0}\@ehpa%
1728   \fi}%
1729 %    \end{macrocode}
1730 % \end{macro}
1731 % \begin{macro}{\pst@pdgr@brokenpos}
1732 % The position of the broken line symbol on the relationship line
1733 %    \begin{macrocode}
1734 \def\pst@pdgr@brokenpos{0.3}
1735 \define@key[psset]{pst-pdgr}{brokenpos}{%
1736   \pst@checknum{#1}\pst@pdgr@brokenpos%
1737   \ifdim\pst@pdgr@brokenpos \p@<\z@
1738   \def\pst@pdgr@brokenpos{0.3}%
1739   \@pstrickserr{Bad `brokenpos' value: `#1'. Must be >0}\@ehpa%
1740   \fi}%
1741 %    \end{macrocode}
1742 % \end{macro}
1743 % \begin{macro}{\pst@pdgr@mzlinepos}
1744 % The position of the monozygotic line or question mark on the twins
1745 % line: 
1746 %    \begin{macrocode}
1747 \def\pst@pdgr@mzlinepos{0.5}
1748 \define@key[psset]{pst-pdgr}{mzlinepos}{%
1749   \pst@checknum{#1}\pst@pdgr@mzlinepos%
1750   \ifdim\pst@pdgr@mzlinepos \p@<\z@%
1751     \def\pst@pdgr@mzlinepos{0.5}%
1752     \@pstrickserr{Bad `mzlinepos' value: `#1'. Must be >0}\@ehpa%
1753   \fi%
1754   \ifdim\pst@pdgr@mzlinepos \p@>\p@\relax%
1755     \def\pst@pdgr@mzlinepos{0.5}%
1756     \@pstrickserr{Bad `mzlinepos' value: `#1'. Must be <1}\@ehpa%
1757   \fi}%
1758 %    \end{macrocode}
1759 % \end{macro}
1760 %
1761 %
1762 %
1763 %
1764 %\subsection{Drawing A Person}
1765 %\label{sec:impl_pstPerson}
1766 %
1767 % And now the main macro.
1768 %
1769 % \begin{macro}{\pstPerson}
1770 %   First, the standard processing of optional parameter
1771 %    \begin{macrocode}
1772 \def\pstPerson{\@ifnextchar[{\pstPerson@i}{\pstPerson@i[]}}
1773 %    \end{macrocode}
1774 % \end{macro}
1775 % \begin{macro}{\pstPerson@i}
1776 %   And now we are ready for a real work.  Actually we create a
1777 %   |rnode| and put everything inside.  We add a |\pspicture| for the
1778 %   node to have non-zero size.
1779 %    \begin{macrocode}
1780 \def\pstPerson@i[#1]#2{%
1781   \rnode{#2}{%
1782    \psset{arrows=-, linestyle=solid}%
1783    \psset{#1}%
1784     \pspicture[shift=-0.25](-0.25,-0.25)(0.25,0.25)%
1785 %    \end{macrocode}
1786 % Condition processing. 
1787 %    \begin{macrocode}
1788      \ifcase\pst@pdgr@condition\relax  % Nothing to do if normal
1789      \or  % obligatory
1790        \psdot(0,0)%
1791      \or % asymptomatic
1792        \qline(0,0.25)(0,-0.25)%
1793      \or % affected
1794         \expandafter\psset\expandafter{\affectedstyle}%
1795         \def\pst@pdgr@instxtcolor{\csname\affectedfgcolor\endcsname}%
1796      \fi%
1797 %    \end{macrocode}
1798 % The actual drawing
1799 %    \begin{macrocode}
1800      \ifcase\pst@pdgr@sex\relax  % First, unknown sex.  A diamond 
1801          \pspolygon(0,0.25)(0.25,0)(0,-0.25)(-0.25,0)%
1802       \or  % Male.  A square with side 0.5
1803          \pspolygon(-0.25,-0.25)(-0.25,0.25)(0.25,0.25)(0.25,-0.25)%
1804       \or  % Female.  A circle with radius 0.25
1805           \pscircle{0.25}%
1806       \fi%
1807 %    \end{macrocode}
1808 % Necessary for next
1809 %    \begin{macrocode}
1810       \psset{fillstyle=none}%
1811 %    \end{macrocode}
1812 %
1813 % Deceased or not?
1814 %    \begin{macrocode}
1815      \ifpst@pdgr@deceased%
1816         \qline(-0.33,-0.33)(0.33,0.33)%
1817       \fi%
1818 %    \end{macrocode}
1819 % Proband or not?
1820 %    \begin{macrocode}
1821      \ifpst@pdgr@proband%
1822         \psline[arrows=->](-0.55,-0.55)(-0.29,-0.29)%
1823      \fi%
1824 %    \end{macrocode}
1825 % Adopted or not?
1826 %    \begin{macrocode}
1827      \ifpst@pdgr@adopted%
1828        \psline(-0.25,-0.35)(-0.35,-0.35)(-0.35,0.35)(-0.25,0.35)%
1829        \psline(0.25,-0.35)(0.35,-0.35)(0.35,0.35)(0.25,0.35)%
1830      \fi%
1831 %    \end{macrocode}
1832 % \changes{v0.2}{2006/04/18}{Slightly increased brackets for the ``adopted''
1833 %   symbol} 
1834 % Evaluated or not?
1835 %    \begin{macrocode}
1836      \ifpst@pdgr@evaluated%
1837         \rput(0.4,-0.4){$\ast$}%
1838       \fi%
1839 %    \end{macrocode}
1840 %
1841 % Now a bunch of text putting commands
1842 %    \begin{macrocode}
1843      \ifx\pst@pdgr@abovetext\@empty\relax\else%
1844         \rput[\pst@pdgr@abovetextrp](0,0.4){%
1845           \kern2\pslinewidth\pst@pdgr@abovetext\kern2\pslinewidth}%
1846      \fi%
1847      \ifx\pst@pdgr@belowtext\@empty\relax\else%
1848         \rput[\pst@pdgr@belowtextrp](0,-0.4){%
1849           \kern2\pslinewidth\pst@pdgr@belowtext\kern2\pslinewidth}%
1850      \fi%
1851      \ifx\pst@pdgr@righttext\@empty\relax\else%
1852         \rput[\pst@pdgr@righttextrp](0.4,0){\pst@pdgr@righttext}%
1853      \fi%
1854      \ifx\pst@pdgr@lefttext\@empty\relax\else%
1855         \rput[\pst@pdgr@lefttextrp](-0.4,0){\pst@pdgr@lefttext}%
1856      \fi%
1857 %    \end{macrocode}
1858 % Inside text is a bit more difficult since we want to be able to
1859 % do reverse video if necessary
1860 %    \begin{macrocode}
1861      \ifx\pst@pdgr@insidetext\@empty\relax\else%
1862         \rput(0,0){\pst@pdgr@instxtcolor\pst@pdgr@insidetext}%
1863      \fi%
1864      \endpspicture%
1865 }}%
1866 %    \end{macrocode}
1867 % \changes{v0.2}{2006/04/18}{Changed text positioning}
1868 % \end{macro}
1869 %
1870 %
1871 %\subsection{Drawing A Terminated Pregnancy}
1872 %\label{sec:impl_pstAbortion}
1873 %
1874 % \begin{macro}{\pstAbortion}
1875 %   First, the standard processing of optional parameter
1876 %    \begin{macrocode}
1877 \def\pstAbortion{\@ifnextchar[{\pstAbortion@i}{\pstAbortion@i[]}}%
1878 %    \end{macrocode}
1879 % \end{macro}
1880 % \begin{macro}{\pstAbortion@i}
1881 %   And the actual macro:
1882 %    \begin{macrocode}
1883 \def\pstAbortion@i[#1]#2{%
1884   \rnode{#2}{%
1885     \psset{arrows=-, linestyle=solid}%
1886     \psset{#1}%
1887 %    \end{macrocode}
1888 %
1889 % The standard~\cite{PedigreeNomenclature95} requires the lines for
1890 % the terminated pregnancies to be shorter than for the normal ones.
1891 % A way to do this is to make the node \emph{higher}:
1892 %    \begin{macrocode}
1893      \pspicture[shift=-0.25](-0.25,-0.25)(0.25,0.5)%
1894 %    \end{macrocode}
1895 %
1896 %
1897 % Condition processing:
1898 %    \begin{macrocode}
1899      \ifcase\pst@pdgr@condition\relax  % Nothing to do if normal
1900      \or  \relax % Nothing to do if obligatory
1901      \or \relax  % Nothing to do if asymptomatic
1902      \or % affected
1903         \expandafter\psset\expandafter{\affectedstyle}%
1904      \fi%
1905 %    \end{macrocode}
1906 %
1907 % If this is a terminated pregnancy, we use the same symbol as for
1908 % |deceased|:
1909 %    \begin{macrocode}
1910     \ifpst@pdgr@sab\relax\else%
1911        \qline(-0.25,0.1)(0.25,0.6)%
1912      \fi%
1913 %    \end{macrocode}
1914 %  
1915 %  The actual drawing
1916 %    \begin{macrocode}
1917     \pspolygon(-0.25,0.25)(0,0.5)(0.25,0.25)
1918 %    \end{macrocode}
1919 %
1920 % And text putting commands
1921 %    \begin{macrocode}
1922      \ifx\pst@pdgr@abovetext\@empty\relax\else%
1923         \rput[\pst@pdgr@abovetextrp](0,0.65){%
1924           \kern2\pslinewidth\pst@pdgr@abovetext\kern2\pslinewidth}%
1925      \fi%
1926      \ifx\pst@pdgr@belowtext\@empty\relax\else%
1927         \rput[\pst@pdgr@belowtextrp](0,0.1){%
1928           \kern2\pslinewidth\pst@pdgr@belowtext\kern2\pslinewidth}%
1929      \fi%
1930      \ifx\pst@pdgr@righttext\@empty\relax\else%
1931         \rput[\pst@pdgr@righttextrp](0.4,0.35){\pst@pdgr@righttext}%
1932      \fi%
1933      \ifx\pst@pdgr@lefttext\@empty\relax\else%
1934         \rput[\pst@pdgr@lefttextrp](-0.4,0.35){\pst@pdgr@lefttext}%
1935      \fi%
1936      \endpspicture%
1937 }}%
1938 %    \end{macrocode}
1939 % \changes{v0.2}{2006/04/18}{Changed text positioning}
1940 % \end{macro}
1941 %
1942 %
1943 %\subsection{Drawing A Childlessness Symbol}
1944 %\label{sec:impl_childless}
1945 %
1946 % \begin{macro}{\pstChildless}
1947 %   Again, the standard processing of optional parameter
1948 %    \begin{macrocode}
1949 \def\pstChildless{\@ifnextchar[{\pstChildless@i}{\pstChildless@i[]}}%
1950 %    \end{macrocode}
1951 % \end{macro}
1952 % \begin{macro}{\pstChildless@i}
1953 %   And the actual macro:
1954 %    \begin{macrocode}
1955 \def\pstChildless@i[#1]#2{%
1956   \rnode{#2}{%
1957     \psset{arrows=-, linestyle=solid}%
1958     \psset{#1}%
1959 %    \end{macrocode}
1960 % The actual drawing depends on the |infertile| option.  If it is
1961 % true, we want a double line (an non-zero height).  Otherwise this is
1962 % a single line with zero height:
1963 %    \begin{macrocode}
1964     \ifpst@pdgr@infertile  % double line
1965       \pspicture[shift=-0.05](-0.2,-0.05)(0.2,0.05)%
1966         \qline(-0.2,-0.05)(0.2,-0.05)%
1967          \qline(-0.2,0.05)(0.2,0.05)%
1968       \endpspicture%
1969     \else  % single line
1970       \qline(-0.2,0)(0.2,0)%
1971     \fi%
1972 %    \end{macrocode}
1973 % And the text below the symbol:
1974 %    \begin{macrocode}
1975      \ifx\pst@pdgr@belowtext\@empty\relax\else%
1976         \rput[t](0,-0.2){\pst@pdgr@belowtext}%
1977      \fi%
1978 }}%
1979 %    \end{macrocode}
1980 %
1981 % \end{macro}
1982 %
1983 %\subsection{Drawing A Relationship Line}
1984 %\label{sec:impl_pstRelationship}
1985 %
1986 % \begin{macro}{\pstRelationship}
1987 %   The |\pstRelationship| command can have both optional and
1988 %   non-optional parameters:
1989 %    \begin{macrocode}
1990 \def\pstRelationship{\@ifnextchar[{%
1991     \pstRelationship@i}{\pstRelationship@i[]}}%
1992 %    \end{macrocode}
1993 % \end{macro}
1994 % \begin{macro}{\pstRelationship@i}
1995 %   The actual macro:
1996 %    \begin{macrocode}
1997 \def\pstRelationship@i[#1]#2#3{%
1998   \begingroup%
1999   \psset{arrows=-, linestyle=solid, nodesep=0.7\pslinewidth}%
2000   \psset{#1}%
2001 %    \end{macrocode}
2002 % A consanguinic relationship is shown by a double line:
2003 %    \begin{macrocode}
2004    \ifpst@pdgr@consanguinic%
2005       \psset{doubleline=true}%
2006    \else%
2007       \psset{doubleline=false}%
2008    \fi%
2009 %    \end{macrocode}
2010 % The actual drawing
2011 %    \begin{macrocode}
2012    \pst@pdgr@rellinecmd{#2}{#3}%
2013 %    \end{macrocode}
2014 % The broken relationships are shown using  //:
2015 %    \begin{macrocode}
2016     \ifpst@pdgr@broken%
2017          \lput(\pst@pdgr@brokenpos){/\kern-0.7ex/}%
2018     \fi%
2019 %    \end{macrocode}
2020 % And the descent node
2021 %    \begin{macrocode}
2022      \ifx\pst@pdgr@descentnode\@empty\relax%
2023      \else%
2024          \lput(\pst@pdgr@descentnodepos){\pnode{\pst@pdgr@descentnode}}%
2025       \fi%
2026       \endgroup%
2027 }%    
2028 %    \end{macrocode}
2029 %
2030 % \end{macro}
2031 %
2032 %\subsection{Drawing a Descent Line}
2033 %\label{sec:impl_pstDescent}
2034 %
2035 % \begin{macro}{\pstDescent}
2036 %   The standard option processing command:
2037 %    \begin{macrocode}
2038 \def\pstDescent{\@ifnextchar[{\pstDescent@i}{\pstDescent@i[]}}%
2039 %    \end{macrocode}
2040 % \end{macro}
2041 % \begin{macro}{\pstDescent@i}
2042 %   The actual macro.  Note the ``reverse'' direction of the line:
2043 %   this is because for |\ncangle| only |armB| is constant, and we
2044 %   want the sib line to be straight
2045 %    \begin{macrocode}
2046 \def\pstDescent@i[#1]#2#3{%
2047   \begingroup%
2048   \psset{arrows=-, linestyle=solid, angleA=90, %
2049          angleB=-90}%
2050   \psset{#1}%
2051   \ncangle{#3}{#2}%
2052   \endgroup}%
2053 %    \end{macrocode}
2054 % \end{macro}
2055 %
2056 %
2057 %
2058 %\subsection{Drawing Twins}
2059 %\label{sec:impl_pstTwins}
2060 %
2061 % \begin{macro}{\pstTwins}
2062 %   The standard option processing command:
2063 %    \begin{macrocode}
2064 \def\pstTwins{\@ifnextchar[{\pstTwins@i}{\pstTwins@i[]}}%
2065 %    \end{macrocode}
2066 % \end{macro}
2067 % \begin{macro}{\pstTwins@i}
2068 %   The actual macro.  Note that we need to keep the twin node in
2069 %   |\pst@pdgr@tempnode| to correctly process |addtwin|.
2070 %    \begin{macrocode}
2071 \def\pstTwins@i[#1]#2#3#4#5{%
2072   \begingroup%
2073   \def\pst@pdgr@tempnode{#3}
2074   \psset{arrows=-, linestyle=solid, angleA=90, %
2075          angleB=-90}%
2076   \psset{#1}%
2077 %    \end{macrocode}
2078 % The descent line from the parent to the twin node
2079 %    \begin{macrocode}
2080   \pstDescent{#2}{#3}%
2081 %    \end{macrocode}
2082 % And the twin lines and nodes
2083 %    \begin{macrocode}
2084   \ncline{#3}{#4}%
2085   \lput(\pst@pdgr@mzlinepos){\pnode{pst@pdgr@tempnodeA}}%
2086   \ncline{#3}{#5}%
2087   \lput(\pst@pdgr@mzlinepos){\pnode{pst@pdgr@tempnodeB}}%
2088 %    \end{macrocode}
2089 % The monozygotic or qzygotic line
2090 %    \begin{macrocode}
2091   \ifpst@pdgr@monozygotic%
2092      \ncline{pst@pdgr@tempnodeA}{pst@pdgr@tempnodeB}%
2093   \else%
2094       \ifpst@pdgr@qzygotic%
2095          \ncline[linestyle=none]{pst@pdgr@tempnodeA}{pst@pdgr@tempnodeB}%
2096          \lput(0.5){?}%
2097       \fi%
2098   \fi%
2099   \endgroup}%
2100 %    \end{macrocode}
2101 %
2102 %
2103 % \end{macro}
2104 %
2105 %
2106 %\subsection{Tree Making Commands}
2107 %\label{sec:impl_trees}
2108 %
2109 % \begin{macro}{\pst@pdgr@makeTcommand}
2110 %   The general macro to create a tree command from the normal command
2111 %    \begin{macrocode}
2112 \def\pst@pdgr@makeTcommand#1{%
2113   \@namedef{T#1}{%
2114     \@ifnextchar[{\@nameuse{T#1@i}}{\@nameuse{T#1@i}[]}}%
2115   \@namedef{T#1@i}[##1]##2{%
2116       \Tr{\@nameuse{#1@i}[##1]{##2}}}}%
2117 %    \end{macrocode}
2118 % \end{macro}
2119 %
2120 % And the macros
2121 % \begin{macro}{\TpstPerson}
2122 % Drawing a person
2123 %    \begin{macrocode}
2124 \pst@pdgr@makeTcommand{pstPerson}%
2125 %    \end{macrocode}
2126 % \end{macro}
2127 % \begin{macro}{\TpstAbortion}
2128 % Drawing an abortion
2129 %    \begin{macrocode}
2130 \pst@pdgr@makeTcommand{pstAbortion}%
2131 %    \end{macrocode}
2132 % \end{macro}
2133 % \begin{macro}{\TpstChildless}
2134 % Drawing a childlessness symbol
2135 %    \begin{macrocode}
2136 \pst@pdgr@makeTcommand{pstChildless}%
2137 %    \end{macrocode}
2138 % \end{macro}
2139 %
2140 %\subsection{Finishing Touch}
2141 %\label{sec:finish}
2142 %
2143 %
2144 %    \begin{macrocode}
2145 %</tex>
2146 %    \end{macrocode}
2147 %\Finale
2148 %\clearpage
2149 %
2150 %\iffalse\bibliography{genetics,neurology,tex}\fi
2151 %\bibliography{pst-pdgr}
2152 %\bibliographystyle{plain}
2153 %
2154 %\PrintChanges
2155 %\clearpage
2156 %\PrintIndex
2157 %
2158 \endinput