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