From 0ef9f4def462c7ba14d5071ea39d737961c80ade Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 18 Oct 2006 04:01:10 +0000 Subject: [PATCH] add pst-pdr --- texmf/invoice.sty | 2 +- texmf/ls-R | 215 +-- texmf/tex/latex/pst-pdgr/Makefile | 54 + texmf/tex/latex/pst-pdgr/README | 26 + texmf/tex/latex/pst-pdgr/pst-pdgr.bib | 50 + texmf/tex/latex/pst-pdgr/pst-pdgr.dtx | 2158 +++++++++++++++++++++++++ texmf/tex/latex/pst-pdgr/pst-pdgr.ins | 48 + 7 files changed, 2374 insertions(+), 179 deletions(-) create mode 100644 texmf/tex/latex/pst-pdgr/Makefile create mode 100644 texmf/tex/latex/pst-pdgr/README create mode 100644 texmf/tex/latex/pst-pdgr/pst-pdgr.bib create mode 100644 texmf/tex/latex/pst-pdgr/pst-pdgr.dtx create mode 100644 texmf/tex/latex/pst-pdgr/pst-pdgr.ins diff --git a/texmf/invoice.sty b/texmf/invoice.sty index 60848d0..195f12a 100644 --- a/texmf/invoice.sty +++ b/texmf/invoice.sty @@ -197,7 +197,7 @@ % \gdef\Flag{1}% \begin{center}% - \begin{longtable}{p{7cm}lrrr}% + \begin{longtable}{p{9cm}lrrr}% % \else \error@message{\NoInvoiceNesting}% \fi}% diff --git a/texmf/ls-R b/texmf/ls-R index 911e7d3..9bb395c 100644 --- a/texmf/ls-R +++ b/texmf/ls-R @@ -22,21 +22,16 @@ bst unsrtdon.bst ./bibtex/bst/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./bibtex/bst/.svn/prop-base: -unsrtdon.bst.svn-base ./bibtex/bst/.svn/props: -unsrtdon.bst.svn-work ./bibtex/bst/.svn/text-base: unsrtdon.bst.svn-base @@ -55,18 +50,13 @@ wcprops ./bibtex/bst/.svn/tmp/wcprops: -./bibtex/bst/.svn/wcprops: - ./bibtex/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./bibtex/.svn/prop-base: @@ -88,8 +78,6 @@ wcprops ./bibtex/.svn/tmp/wcprops: -./bibtex/.svn/wcprops: - ./fonts: pk .svn @@ -128,57 +116,26 @@ grktxt.mf .svn ./fonts/pk/ljfour/kelly/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./fonts/pk/ljfour/kelly/.svn/prop-base: cmg10.600pk.svn-base -cmg10.mf.svn-base cmg10.tfm.svn-base cmgb10.600pk.svn-base -cmgb10.mf.svn-base cmgb10.tfm.svn-base cmgi10.600pk.svn-base -cmgi10.mf.svn-base cmgi10.tfm.svn-base cmgtt10.600pk.svn-base -cmgtt10.mf.svn-base cmgtt10.tfm.svn-base -greek.aux.svn-base greek.dvi.svn-base -greek.log.svn-base greek.pdf.svn-base -greek.sty.svn-base -greek.tex.svn-base -grktxt.mf.svn-base ./fonts/pk/ljfour/kelly/.svn/props: -cmg10.600pk.svn-work -cmg10.mf.svn-work -cmg10.tfm.svn-work -cmgb10.600pk.svn-work -cmgb10.mf.svn-work -cmgb10.tfm.svn-work -cmgi10.600pk.svn-work -cmgi10.mf.svn-work -cmgi10.tfm.svn-work -cmgtt10.600pk.svn-work -cmgtt10.mf.svn-work -cmgtt10.tfm.svn-work -greek.aux.svn-work -greek.dvi.svn-work -greek.log.svn-work -greek.pdf.svn-work -greek.sty.svn-work -greek.tex.svn-work -grktxt.mf.svn-work ./fonts/pk/ljfour/kelly/.svn/text-base: cmg10.600pk.svn-base @@ -215,24 +172,17 @@ wcprops ./fonts/pk/ljfour/kelly/.svn/tmp/wcprops: -./fonts/pk/ljfour/kelly/.svn/wcprops: - ./fonts/pk/ljfour/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./fonts/pk/ljfour/.svn/prop-base: -ls-R.svn-base ./fonts/pk/ljfour/.svn/props: -ls-R.svn-work ./fonts/pk/ljfour/.svn/text-base: ls-R.svn-base @@ -251,24 +201,18 @@ wcprops ./fonts/pk/ljfour/.svn/tmp/wcprops: -./fonts/pk/ljfour/.svn/wcprops: - ./fonts/pk/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./fonts/pk/.svn/prop-base: ljfour.svn-base ./fonts/pk/.svn/props: -ljfour.svn-work ./fonts/pk/.svn/text-base: ljfour.svn-base @@ -287,24 +231,18 @@ wcprops ./fonts/pk/.svn/tmp/wcprops: -./fonts/pk/.svn/wcprops: - ./fonts/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./fonts/.svn/prop-base: tfm.svn-base ./fonts/.svn/props: -tfm.svn-work ./fonts/.svn/text-base: tfm.svn-base @@ -323,8 +261,6 @@ wcprops ./fonts/.svn/tmp/wcprops: -./fonts/.svn/wcprops: - ./fonts/tfm: kelly ls-R @@ -354,57 +290,26 @@ grktxt.mf .svn ./fonts/tfm/kelly/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./fonts/tfm/kelly/.svn/prop-base: cmg10.600pk.svn-base -cmg10.mf.svn-base cmg10.tfm.svn-base cmgb10.600pk.svn-base -cmgb10.mf.svn-base cmgb10.tfm.svn-base cmgi10.600pk.svn-base -cmgi10.mf.svn-base cmgi10.tfm.svn-base cmgtt10.600pk.svn-base -cmgtt10.mf.svn-base cmgtt10.tfm.svn-base -greek.aux.svn-base greek.dvi.svn-base -greek.log.svn-base greek.pdf.svn-base -greek.sty.svn-base -greek.tex.svn-base -grktxt.mf.svn-base ./fonts/tfm/kelly/.svn/props: -cmg10.600pk.svn-work -cmg10.mf.svn-work -cmg10.tfm.svn-work -cmgb10.600pk.svn-work -cmgb10.mf.svn-work -cmgb10.tfm.svn-work -cmgi10.600pk.svn-work -cmgi10.mf.svn-work -cmgi10.tfm.svn-work -cmgtt10.600pk.svn-work -cmgtt10.mf.svn-work -cmgtt10.tfm.svn-work -greek.aux.svn-work -greek.dvi.svn-work -greek.log.svn-work -greek.pdf.svn-work -greek.sty.svn-work -greek.tex.svn-work -grktxt.mf.svn-work ./fonts/tfm/kelly/.svn/text-base: cmg10.600pk.svn-base @@ -441,24 +346,17 @@ wcprops ./fonts/tfm/kelly/.svn/tmp/wcprops: -./fonts/tfm/kelly/.svn/wcprops: - ./fonts/tfm/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./fonts/tfm/.svn/prop-base: -ls-R.svn-base ./fonts/tfm/.svn/props: -ls-R.svn-work ./fonts/tfm/.svn/text-base: ls-R.svn-base @@ -477,8 +375,6 @@ wcprops ./fonts/tfm/.svn/tmp/wcprops: -./fonts/tfm/.svn/wcprops: - ./metafont: kelly ls-R @@ -508,57 +404,26 @@ grktxt.mf .svn ./metafont/kelly/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./metafont/kelly/.svn/prop-base: cmg10.600pk.svn-base -cmg10.mf.svn-base cmg10.tfm.svn-base cmgb10.600pk.svn-base -cmgb10.mf.svn-base cmgb10.tfm.svn-base cmgi10.600pk.svn-base -cmgi10.mf.svn-base cmgi10.tfm.svn-base cmgtt10.600pk.svn-base -cmgtt10.mf.svn-base cmgtt10.tfm.svn-base -greek.aux.svn-base greek.dvi.svn-base -greek.log.svn-base greek.pdf.svn-base -greek.sty.svn-base -greek.tex.svn-base -grktxt.mf.svn-base ./metafont/kelly/.svn/props: -cmg10.600pk.svn-work -cmg10.mf.svn-work -cmg10.tfm.svn-work -cmgb10.600pk.svn-work -cmgb10.mf.svn-work -cmgb10.tfm.svn-work -cmgi10.600pk.svn-work -cmgi10.mf.svn-work -cmgi10.tfm.svn-work -cmgtt10.600pk.svn-work -cmgtt10.mf.svn-work -cmgtt10.tfm.svn-work -greek.aux.svn-work -greek.dvi.svn-work -greek.log.svn-work -greek.pdf.svn-work -greek.sty.svn-work -greek.tex.svn-work -grktxt.mf.svn-work ./metafont/kelly/.svn/text-base: cmg10.600pk.svn-base @@ -595,24 +460,17 @@ wcprops ./metafont/kelly/.svn/tmp/wcprops: -./metafont/kelly/.svn/wcprops: - ./metafont/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./metafont/.svn/prop-base: -ls-R.svn-base ./metafont/.svn/props: -ls-R.svn-work ./metafont/.svn/text-base: ls-R.svn-base @@ -631,32 +489,17 @@ wcprops ./metafont/.svn/tmp/wcprops: -./metafont/.svn/wcprops: - ./.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./.svn/prop-base: -aliases.svn-base -invoice.def.svn-base -invoice.sty.svn-base -ls-R.svn-base -realcalc.tex.svn-base ./.svn/props: -aliases.svn-work -invoice.def.svn-work -invoice.sty.svn-work -ls-R.svn-work -realcalc.tex.svn-work ./.svn/text-base: aliases.svn-base @@ -669,6 +512,7 @@ realcalc.tex.svn-base ./.svn/tmp: prop-base props +tempfile.tmp text-base wcprops @@ -680,15 +524,12 @@ wcprops ./.svn/tmp/wcprops: -./.svn/wcprops: - ./tex: latex .svn ./tex/latex: beamerouterthemedebiansidebar.sty -beamerouterthemedebiansidebar.sty~ curve.cls envlab.sty exam.cls @@ -696,41 +537,66 @@ fixme.sty hypernat.sty invoice.def invoice.sty +pst-pdgr realcalc.tex .svn +./tex/latex/pst-pdgr: +Makefile +pst-pdgr.bib +pst-pdgr.dtx +pst-pdgr.ins +README +.svn + +./tex/latex/pst-pdgr/.svn: +entries +format +prop-base +props +text-base +tmp + +./tex/latex/pst-pdgr/.svn/prop-base: + +./tex/latex/pst-pdgr/.svn/props: + +./tex/latex/pst-pdgr/.svn/text-base: + +./tex/latex/pst-pdgr/.svn/tmp: +prop-base +props +text-base + +./tex/latex/pst-pdgr/.svn/tmp/prop-base: + +./tex/latex/pst-pdgr/.svn/tmp/props: + +./tex/latex/pst-pdgr/.svn/tmp/text-base: + ./tex/latex/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./tex/latex/.svn/prop-base: -curve.cls.svn-base envlab.sty.svn-base -exam.cls.svn-base invoice.def.svn-base invoice.sty.svn-base realcalc.tex.svn-base ./tex/latex/.svn/props: -curve.cls.svn-work -envlab.sty.svn-work -exam.cls.svn-work -invoice.def.svn-work -invoice.sty.svn-work -realcalc.tex.svn-work ./tex/latex/.svn/text-base: +beamerouterthemedebiansidebar.sty.svn-base curve.cls.svn-base envlab.sty.svn-base exam.cls.svn-base fixme.sty.svn-base +hypernat.sty.svn-base invoice.def.svn-base invoice.sty.svn-base realcalc.tex.svn-base @@ -749,18 +615,13 @@ wcprops ./tex/latex/.svn/tmp/wcprops: -./tex/latex/.svn/wcprops: - ./tex/.svn: -empty-file entries format prop-base props -README.txt text-base tmp -wcprops ./tex/.svn/prop-base: @@ -781,5 +642,3 @@ wcprops ./tex/.svn/tmp/text-base: ./tex/.svn/tmp/wcprops: - -./tex/.svn/wcprops: diff --git a/texmf/tex/latex/pst-pdgr/Makefile b/texmf/tex/latex/pst-pdgr/Makefile new file mode 100644 index 0000000..9717ba3 --- /dev/null +++ b/texmf/tex/latex/pst-pdgr/Makefile @@ -0,0 +1,54 @@ +# +# Makefile for pst-pdgr package +# +# This file is in public domain +# +# $Id: Makefile,v 1.10 2006/05/17 16:27:18 boris Exp $ +# + +PACKAGE=pst-pdgr + +all: $(PACKAGE).pdf + +%.pdf: %.ps + ps2pdf -sAutoRotatePages=None $< + +%.ps: %.dvi + dvips -Ppdf -o $@ $< + +%.dvi: %.dtx $(PACKAGE).sty $(PACKAGE).tex + latex $< + - bibtex $* + latex $< + - makeindex -s gind.ist -o $*.ind $*.idx + - makeindex -s gglo.ist -o $*.gls $*.glo + latex $< + while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \ + do latex $<; done + + +%.sty: %.ins %.dtx + latex $< + + +%.tex: %.ins %.dtx + latex $< + +.PRECIOUS: $(PACKAGE).cfg $(PACKAGE).tex $(PACKAGE).sty + + +clean: + $(RM) $(PACKAGE).tex $(PACKAGE).sty $(PACKAGE).log $(PACKAGE).aux \ + $(PACKAGE).cfg $(PACKAGE).glo $(PACKAGE).idx $(PACKAGE).toc \ + $(PACKAGE).ilg $(PACKAGE).ind $(PACKAGE).out $(PACKAGE).lof \ + $(PACKAGE).lot $(PACKAGE).bbl $(PACKAGE).blg $(PACKAGE).gls \ + $(PACKAGE).dvi $(PACKAGE).ps + +veryclean: clean + $(RM) $(PACKAGE).pdf + +# +# Archive for the distribution. Includes typeset documentation +# +archive: all clean + tar -czvf pst-pdgr.tgz --exclude '*~' --exclude '*.tgz' --exclude CVS . diff --git a/texmf/tex/latex/pst-pdgr/README b/texmf/tex/latex/pst-pdgr/README new file mode 100644 index 0000000..bac5e7b --- /dev/null +++ b/texmf/tex/latex/pst-pdgr/README @@ -0,0 +1,26 @@ + Creating Medical Pedigree with PSTricks and LaTeX + Boris Veytsman & Leila Akhmadeeva + Version 0.2a, April 2006 + +This package is a set of macros based on PSTricks to draw medical +pedigrees according to the recommendations for standardized human +pedigree nomenclature. The drawing commands place the symbols on a +pspicture canvas. An interface for making trees is also provided. +The package can be used both with LaTeX and PlainTeX. A separate +Perl program for generating TeX files from spreadsheets is +provided elsewhere on CTAN. + +To extract the files, run pst-pdgr.ins through latex. Then move the +files pst-pdgr.sty & pst-pdgr.cfg to the place where LaTeX files are +kept in your system, e. g. /usr/share/texmf/tex/latex/pst-pdgr/, and +the file pst-pdgr.tex to the place where generic TeX files are kept in +your system, e.g. /usr/share/texmf/tex/generic/pstricks/pst-pdgr/. + +The documentation is in the file pst-pdgr.pdf. You may use the +provided Makefile to re-typeset it. + +Copyright 2006, Boris Veytsman , Leila Akhmadeeva + +This work may be distributed and/or modified under the conditions of +the LaTeX Project Public License, either version 1.3 of this license +or (at your option) any later version. diff --git a/texmf/tex/latex/pst-pdgr/pst-pdgr.bib b/texmf/tex/latex/pst-pdgr/pst-pdgr.bib new file mode 100644 index 0000000..c9ab559 --- /dev/null +++ b/texmf/tex/latex/pst-pdgr/pst-pdgr.bib @@ -0,0 +1,50 @@ +Generated on Wed Apr 19 11:55:35 2006 (1145462135). + + +,-------------------. +| BIBTEX ENTRIES | +`-------------------' + +@book{Harper01:MDBook, + address = {Philadelphia}, + author = {Peter Harper}, + edition = {Third}, + publisher = {W. B. Saunders}, + title = {Myotonic Dystrophy}, + year = {2001}, +} + +@article{PedigreeNomenclature95, + author = {Robin L. Bennett and Kathryn A. Steinhaus and + Stefanie B. Uhrich and Corrine K. O'Sullivan and + Robert G. Resta and Debra Lochner-Doyle and + Dorene S. Markei and Victoria Vincent and + Jan Hamanishi}, + journal = {Am. J. Hum. Genet.}, + number = {3}, + pages = {745--752}, + title = {Recommendations for Standardized Human Pedigree + Nomenclature}, + volume = {56}, + year = {1995}, +} + + +@manual{PSTricks93, + author = {Van Zandt, Timothy}, + month = {March}, + note = {Available from CTAN at + \path{tex-archive/graphics/pstricks/obsolete/doc}}, + title = {PSTricks: PostScript Macros for Generic \TeX}, + year = {1993}, +} + +@manual{pedigree-perl, + author = {Boris Veytsman and Leila Akhmadeeva}, + month = {April}, + note = {Available from CTAN at \path{support/pedigree}}, + title = {A Program For Automatic Pedigree Construction With pst-pdgr. + User Manual and Algorithm Description}, + year = {2006}, + +} diff --git a/texmf/tex/latex/pst-pdgr/pst-pdgr.dtx b/texmf/tex/latex/pst-pdgr/pst-pdgr.dtx new file mode 100644 index 0000000..784a068 --- /dev/null +++ b/texmf/tex/latex/pst-pdgr/pst-pdgr.dtx @@ -0,0 +1,2158 @@ +% \iffalse +%<*gobble> +% $Id: pst-pdgr.dtx,v 1.43 2006/05/16 22:16:43 boris Exp $ +% +% Copyright 2006, Boris Veytsman , Leila Akhmadeeva +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3 of this license or (at your option) any +% later version. +% The latest version of the license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of +% LaTeX version 2003/06/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Boris Veytsman +% +% This work consists of the file pst-pdgr.dtx and the +% derived files pst-pdgr.tex, pst-pdgr.sty, pst-pdgr.pdf. +% +% \fi +% \CheckSum{505} +% +% \changes{v0.1}{2006/04/18}{The interface is mostly done} +% \changes{v0.2}{2006/04/19}{Added new examples} +% +% +%% \CharacterTable +%% {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 +%% 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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\iffalse +% \begin{macrocode} +\documentclass{ltxdoc} +\usepackage{array} +\usepackage{url} +\usepackage{graphicx} +\usepackage{pst-pdgr} +\usepackage{pstricks-add} +% Taken from xkeyval.dtx +\makeatletter +\def\DescribeOption#1{\leavevmode\@bsphack + \marginpar{\raggedleft\PrintDescribeOption{#1}}% + \SpecialOptionIndex{#1}\@esphack\ignorespaces} +\def\PrintDescribeOption#1{\strut\emph{option}\\\MacroFont #1\ } +\def\SpecialOptionIndex#1{\@bsphack + \index{#1\actualchar{\protect\ttfamily#1} + (option)\encapchar usage}% + \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar + usage}\@esphack} +\def\DescribeOptions#1{\leavevmode\@bsphack + \marginpar{\raggedleft\strut\emph{options}% + \@for\@tempa:=#1\do{% + \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa + }}\@esphack\ignorespaces} +\makeatother +\DoNotIndex{\@Alph,\@alph,\@arabic,\@badmath} +\DoNotIndex{\@centercr} +\DoNotIndex{\@empty,\@ignoretrue} +\DoNotIndex{\@ixpt} +\DoNotIndex{\@M,\@minus,\@ne,\@plus} +\DoNotIndex{\\,\addtolength} +\DoNotIndex{\advance} +\DoNotIndex{\ast,\begin,\begingroup,\bfseries,\bgroup,\box} +\DoNotIndex{\bullet} +\DoNotIndex{\cdot,\cr,\day,\DeclareOption} +\DoNotIndex{\def,\DocInput,\documentclass} +\DoNotIndex{\DoNotIndex,\egroup,\ifx,\else,\fi,\endtrivlist} +\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} +\DoNotIndex{\endlist,\everycr,\ExecuteOptions} +\DoNotIndex{\filedate,\filename,\fileversion} +\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} +\DoNotIndex{\hsize,\hskip,\hspace,\hss,\ifcase,\or,\fi} +\DoNotIndex{\ifvmode,\fi,\ifnum,\fi,\input} +\DoNotIndex{\kern,\leavevmode,\let,\leftmark} +\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark} +\DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} +\DoNotIndex{\NeedsTeXFormat,\newdimen} +\DoNotIndex{\newpage,\nobreak,\noindent,\number} +\DoNotIndex{\p@} +\DoNotIndex{\pagestyle,\par} +\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} +\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} +\DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} +\DoNotIndex{\rightmargin,\rlap,\rmfamily} +\DoNotIndex{\setbox,\setcounter,\setlength} +\DoNotIndex{\skip,\slshape,\space} +\DoNotIndex{\trivlist,\typeout,\tw@} +\DoNotIndex{\vskip,\vspace,\year,\z@} +% +\DoNotIndex{\@ptsize,\@sptoken,\addtocounter,\afterassignment} +\DoNotIndex{\AtEndOfPackage,\baselineskip,\boxmaxdepth,\clearpage} +\DoNotIndex{\clubpenalty,\csname,\CurrentOption,\DeclareRobustCommand} +\DoNotIndex{\eject,\endcsname,\evensidemargin,\expandafter} +\DoNotIndex{\footnotesize,\footskip,\fromaddress,\futurelet} +\DoNotIndex{\headheight,\headsep,\hfuzz,\ignorespaces} +\DoNotIndex{\InputIfFileExists,\large,\lineskip,\loop} +\DoNotIndex{\MakeUppercase,\MessageBreak,\mbox,\multiply} +\DoNotIndex{\newcount,\newif,\newlength,\newtoks,\nolinebreak} +\DoNotIndex{\nopagebreak,\normalfont,\normalsize,\null,\newline} +\DoNotIndex{\oddsidemargin,\PackageError,\PackageInfo} +\DoNotIndex{\paperheight,\paperwidth,\parbox,\parindent} +\DoNotIndex{\PassOptionsToPackage,\ProvidesPackage,\RequirePackage} +\DoNotIndex{\rule,\selectfont,\sffamily,\sloppy,\small,\spaceskip} +\DoNotIndex{\stepcounter,\textheight,\textwidth,\the,\topmargin} +\DoNotIndex{\unhbox,\voidb@x,\vsize,\vfuzz,\widowpenalty,\xspaceskip} +\DoNotIndex{\AtBeginDocument,\AtEndDocument} +\DoNotIndex{\endinput,\ProvidesFile,\message,\catcode,\@} +\DoNotIndex{\PSTricksLoaded,\PSTXKeyLoaded,\PSTnodesLoaded,\PSTreeLoaded} +\DoNotIndex{\pst@addfams,\define@key,\define@choicekey,\pssetlength} +\DoNotIndex{\@nameuse,\@namedef,\psset,\rnode,\@ifnextchar,\pscircle} +\DoNotIndex{\psdot,\pscircle,\pspolygon,\qline,\rput,\psline,\psframe} +\DoNotIndex{\@pstrickserr,\@ehpa,\pst@checknum,\lput,\ncline,\pspicture} +\DoNotIndex{\ncangle,\pnode,\pspicture,\endpspicture,\Tr} +\DoNotIndex{\ifdim,\fi} +\PageIndex +\CodelineIndex +\RecordChanges +\EnableCrossrefs +\begin{document} + \DocInput{pst-pdgr.dtx} +\end{document} +% \end{macrocode} +% +% \fi +% \MakeShortVerb{|} +% +%\GetFileInfo{pst-pdgr.sty} +%\title{Creating Medical Pedigree with PSTricks and \LaTeX. +% \thanks{\copyright Boris Veytsman, Leila Akhmadeeva 2006}} +%\author{Boris Veytsman, \path{borisv@lk.net} \and Leila Akhmadeeva} +%\date{\filedate, \fileversion} +%\maketitle +%\begin{abstract} +% A set of macros based on |PSTricks| to draw medical pedigrees +% according to the recommendations for standardized human pedigree +% nomenclature. The drawing commands place the symbols on a +% |pspicture| canvas. An interface for making trees is also +% provided. The package can be used both with \LaTeX{} and +% \PlainTeX. A separate |Perl| program for generating \TeX{} files +% from spreadsheets is provided elsewhere on |CTAN|. +%\end{abstract} +% +% \clearpage +% +%\tableofcontents +% +% \clearpage +% +%\listoffigures +%\listoftables +% \clearpage +% +%\section{User Guide} +%\label{sec:user_guide} +% +% +%\subsection{Introduction} +%\label{sec:intro} +% +% Medical pedigree is a very important tool for clinicians, genetic +% researchers and educators. As stated +% in~\cite{PedigreeNomenclature95}, ``The construction of an accurate +% family pedigree is a fundamental component of a clinical genetic +% evaluation and of human genetic research.'' Unfortunately, up to +% now most geneticians make the pedigrees manually. There are several +% programs for doing so (see a list at +% \url{http://www.kumc.edu/gec/prof/genecomp.html#pedigree}), but they +% are rather expensive, lack multilanguage support and the quality of +% typesetting is somewhat lacking. This package tries to offer a +% \LaTeX-based solution for this problem. It could be used with a +% companion \path{Perl} program \path{pedigree}~\cite{pedigree-perl}, +% which converts databases of patients into a \LaTeX{} file. +% +% Note that there are ways to draw genealogical trees with +% |PSTricks|~\cite{PSTricks93}; see the beautiful ones at +% \url{http://www.tug.org/PSTricks/main.cgi?file=Examples/Genealogy/genealogy}. +% Unfortunately, medical pedigrees are often not \emph{trees}. +% Therefore we do not use tree approach throughout, but provide it as +% an alternative. Our general approach is based on the use of +% nodes~\cite[Part~VII]{PSTricks93}. Each person or entity is a node, +% and the lines are in fact |\ncline|s. This provides a flexibility +% to draw complex pedigrees. +% +% Each node in the system \emph{must} have a name. To prevent +% confusion with names of individuals, we call such name an \emph{id}. +% As usual in |PSTricks|, it is a sequence of letters and numbers +% starting with a letter. This rule is very important; a name like 1 +% or 1-1 can lead to mysterious PostScript errors. +% +% Our symbols follows the standard~\cite{PedigreeNomenclature95} with +% the exception that we do not implement showing several conditions +% on the same chart. +% +% To use the package, add the line +% \begin{verbatim} +% \usepackage{pst-pdgr} +% \end{verbatim} +% to a \LaTeX{} document or +% \begin{verbatim} +% \input pst-pdgr.tex +% \end{verbatim} +% to a \PlainTeX{} one. Note that since this is a |PSTricks| +% package, you need to use \path{tex-dvips} path to compile your +% document. If you need a PDF document, you can use \path{ps2pdf} or +% packages like \path{pst-pdf}, \path{ps4pdf}, \path{pstricks}. +% +% If you are using the package in a \LaTeX{} document, you have an +% added benefit of a local configuration file |pst-pdgr.cfg|. Such +% file, if exists, will be read. It can be used to override package +% settings (use |\AtEndOfPackage| for this). +% +% +% +%\subsection{Global Settings} +%\label{sec:globals} +% +% By default the size of each node is |0.5 unit|. You can change +% the size by setting the value of |unit| (1\,cm by default) +% with |\psset| +% +%\DescribeMacro{\affectedstyle} +%\DescribeMacro{\affectedbgcolor} +% By default the affected individual is drawn as a black node. This +% could be changed by setting |\affectedstyle| and +% |\affectedbgcolor|, see Figure~\ref{fig:affectedstyle}. +%\DescribeMacro{\affectedfgcolor} +% Sometimes we need to write something inside a node representing an +% affected individual. An example in~\cite{PedigreeNomenclature95} +% changes in this situation the style from filled to hatched, which +% looks inconsistent. We rather change the color of the foreground, +% as shown on Fig.~\ref{fig:affectedfgcolor}. +% +% \begin{figure} +% \centering +% \begin{minipage}[t]{0.4\linewidth} +% \centering +% \begin{pspicture}(2,2) +% \def\affectedbgcolor{blue} +% \expandafter\pscircle\expandafter[\affectedstyle](1,1){1} +% \end{pspicture}\leavevmode\\ +% \small +% |\def\affectedbgcolor{%|\\ +% |blue}| +% \end{minipage} +% \begin{minipage}[t]{0.4\linewidth} +% \centering +% \begin{pspicture}(2,2) +% \def\affectedstyle{fillstyle=hlines, hatchcolor=\affectedbgcolor} +% \expandafter\pscircle\expandafter[\affectedstyle](1,1){1} +% \end{pspicture}\leavevmode\\ +% \small +% |\def\affectedstyle{fillstyle=%|\\ +% |hlines,hatchcolor=\affectedbgcolor}| +% \end{minipage} +% \caption{Setting Style of Affected Individuals} +% \label{fig:affectedstyle} +% \end{figure} +% +% \begin{figure} +% \centering +% \begin{minipage}[t]{0.4\linewidth} +% \centering +% \begin{pspicture}(2,2) +% \expandafter\pscircle\expandafter[\affectedstyle](1,1){1} +% \rput(1,1){\expandafter\textcolor\expandafter{% +% \affectedfgcolor}{\Huge 2}} +% \end{pspicture}\leavevmode\\ +% \small +% default +% \end{minipage} +% \begin{minipage}[t]{0.4\linewidth} +% \centering +% \begin{pspicture}(2,2) +% \def\affectedfgcolor{green} +% \expandafter\pscircle\expandafter[\affectedstyle](1,1){1} +% \rput(1,1){\expandafter\textcolor\expandafter{% +% \affectedfgcolor}{\Huge 2}} +% \end{pspicture} +% \small +% |\def\affectedfgcolor{green}| +% \end{minipage} +% \caption{Use of Foreground Colors for Affected Individuals } +% \label{fig:affectedfgcolor} +% \end{figure} +% +% +%\subsection{Node Drawing Commands} +%\label{sec:node_commands} +% +% +% The node drawing commands are based on the |\pnode| commands from +% |PSTricks|~\cite[Part~VII]{PSTricks93}. It is the preferred command +% for drawing, for example, a ``marriage node'' (see the examples +% below). It is useful to remember this when drawing complex +% pedigrees. +% +% +%\subsubsection{One Person} +%\label{sec:person} +% +% \DescribeMacro{\pstPerson} The main command in the package is +% |\pstPerson|. It draws one person, which is a |PSTricks| node. It +% has the following structure: |\pstPerson|\oarg{options}\marg{id}. +% The parameter \meta{id} is the name of the node. It can be used to +% make connections to the node (see below). +% +% There are many options to this command. As other |PSTricks| +% options, the also can be set globally through |\psset| command. +% +% +% \DescribeOptions{sex,condition,deceased,proband,adopted,evaluated} +% The first group of options describes the state of the person: sex, +% condition with respect to the decease, whether the person is +% deceased, is a proband, was adopted and was evaluated. These +% options are listed in Table~\ref{tab:person_state_opts}. Some +% options of this group can take only two values: |true| or |false|. +% For simplicity the clause |=true| can be omitted, so the clauses +% |adopted=true| and |adopted| are equivalent. Two options: |sex| and +% |condition| can take several values each (geneticians consider three +% possibilities for sex: |male|, |female| and |unknown|). Again for +% simplicity the clauses |sex=| and |condition=| can be omitted, so +% the invocations |sex=male| and |male| are equivalent, as well as +% |condition=asymptomatic| and |asymptomatic|. +% +% \DescribeOptions{insidetext,abovetext,belowtext,lefttext,righttext} +% The second group of options (Table~\ref{tab:person_text_opts}) is +% used to putting text comments inside the symbol, above it, below it +% or to the right or left to it. The text will be typeset in a +% |PSTricks| LR-box~\cite{PSTricks93}; additional control over the +% text position can be achieved by using |\parbox| or \PlainTeX{} +% boxes. +% +% \DescribeOptions{abovetextrp,belowtextrp,lefttextrp,righttextrp} +% The third group of options (Table~\ref{tab:person_text_rp_opts}) is +% used to set the text position with respect to the node. They set +% the reference point of the text. They correspond to the usual +% notation: |r| being right, |l| being left, |t| being top, |b| being +% bottom and |B| being baseline. The setting |={}| makes the +% reference point to be the center of the box. Note that to prevent +% the text above and below the symbol to clash with the descent lines, +% the spaces of |2\pslinewidth| are added to the right and to the left +% of the symbol. +% +% Examples of usage of this command are shown in +% Table~\ref{tab:pstPerson}. +% +% +% \begin{table} +% \centering +% \begin{tabular}{l>{\raggedright\obeylines +% }p{0.3\linewidth}lp{0.3\linewidth}} +% \hline +% Option & Values & Default & Description \\ +% \hline +% |sex| & |male|, |female|, |unknown| & |unknown| & Sex of the +% person\\ +% |condition| & |normal|, |obligatory|, |asymptomatic|, |affected| +% & |normal| & The condition of the person\\ +% |deceased| & |true|, |false| & |false| & Whether the person is +% deceased \\ +% |proband| & |true|, |false| & |false| & Whether the person is a +% proband\\ +% |adopted| & |true|, |false| & |false| & Whether the individual +% is adopted \\ +% |evaluated| & |true|, |false| & |false| & Whether a documented +% evaluation took place\\ +% \hline +% \end{tabular} +% \caption{Options Showing State of a Person} +% \label{tab:person_state_opts} +% \end{table} +% +% +% +% \begin{table} +% \centering +% \begin{tabular}{l>{\raggedright\obeylines +% }llp{0.5\linewidth}} +% \hline +% Option & Values & Default & Description \\ +% \hline +% |insidetext| & String & None & A text to be placed inside the +% symbol (number of individuals, pregnancy, etc.)\\ +% |abovetext| & String & None & A text to be placed above the +% symbol (name, number, etc.)\\ +% |belowtext| & String & None & A text to be placed below the +% symbol (name, number, etc.)\\ +% |lefttext| & String & None & A text to be placed to the left of the +% symbol (name, number, etc.)\\ +% |righttext| & String & None & A text to be placed to the right of the +% symbol (name, number, etc.)\\ +% \hline +% \end{tabular} +% \caption{Options for Making Textual Comments} +% \label{tab:person_text_opts} +% \end{table} +% +% \begin{table} +% \centering +% \begin{tabular}{l>{\raggedright\obeylines +% }p{0.25\linewidth}lp{0.35\linewidth}} +% \hline +% Option & Values & Default & Description \\ +% \hline +% |abovetextrp| & Combination of |r| or |l| and |t|, |b| or |B| & +% |lB| & The reference point for the text above the symbol\\ +% |belowtextrp| & Combination of |r| or |l| and |t|, |b| or |B| & +% |lt| & The reference point for the text below the symbol\\ +% |lefttextrp| & Combination of |r| or |l| and |t|, |b| or |B| & +% |r| & The reference point for the text to the left the symbol\\ +% |righttextrp| & Combination of |r| or |l| and |t|, |b| or |B| & +% |l| & The reference point for the text to the right the symbol\\ +% \hline +% \end{tabular} +% \caption{Options for Setting Text Reference Point} +% \label{tab:person_text_rp_opts} +% \end{table} +% +% +% \begin{table} +% \centering +% \def\arraystretch{1.5} +% \begin{tabular}{>{\tt\bslash pstPerson[}p{0.6\textwidth}<{]\{P\}}c} +% \hline +% \multicolumn{1}{l}{Command} & Result\rule{0.5cm}{0cm}\\ +% \hline +% condition=asymptomatic & +% \pstPerson[condition=asymptomatic]{A} \\ +% condition=affected, sex=male, evaluated & +% \pstPerson[condition=affected,sex=male, evaluated]{A} \\ +% obligatory, female & +% \pstPerson[obligatory, female]{A} \\ +% asymptomatic, male, proband & +% \pstPerson[asymptomatic, male, proband]{A} \\ +% condition=obligatory, sex=male, deceased & +% \pstPerson[condition=obligatory, sex=male, deceased]{A} \\ +% sex=female, adopted, condition=affected, abovetext=Jane & +% \pstPerson[sex=female, adopted, condition=affected, +% abovetext=Jane]{A} \\ +% sex=male, condition=affected, belowtext=20 yr, deceased & +% \pstPerson[sex=male, condition=affected, deceased, +% belowtext=20 yr]{A} \\[5ex] +% unknown, affected, righttext=\bslash +% parbox\{1cm\}\{\bslash footnotesize A \bslash\bslash 1 w\} & +% \pstPerson[unknown, affected, +% righttext=\parbox{1cm}{\footnotesize A\\1 w}]{A} \\ +% sex=male, insidetex=5 & +% \pstPerson[sex=male, insidetext=5]{A}\\ +% sex=female, condition=affected, insidetext=P & +% \pstPerson[sex=female, condition=affected, insidetext=P]{A}\\ +% sex=female, affected, belowtext=\bslash +% parbox\{1cm\}\{\bslash centering SB\bslash\bslash 2wks\}, deceased & +% \pstPerson[sex=female, affected, deceased, +% belowtext=\parbox{1cm}{\centering SB\\ 2wks}]{A} \\[7ex] +% \hline +% \end{tabular} +% \caption{Examples of Persons} +% \label{tab:pstPerson} +% \end{table} +% +% +%\subsubsection{Pregnancy Not Carried To Term} +%\label{sec:abortion} +% +% \DescribeMacro{\pstAbortion} +% The command |\pstAbortion| is used to draw a pregnancy not carried +% to term: spontaneous abortions or terminated pregnancies. The +% format of it the same as for the command |\pstPerson| (see +% Section~\ref{sec:person}): |\pstAbortion|\oarg{options}\marg{id}. +% However, many of options listed in Table~\ref{tab:person_state_opts} are +% silently ignored. The only options meaningful for these nodes are +% |sex| and |condition| (only |normal| and |affected| values are +% possible). All options listed in Table~\ref{tab:person_text_opts} +% and \ref{tab:person_text_rp_opts} are valid and have the same +% meaning as in Section~\ref{sec:person}. +% +% \DescribeOption{sab} +% The command has also an option |sab| with the values |true| or +% |false|. If it is |true|, the pregnancy is a spontaneous abortion. +% Otherwise it is terminated. Examples of usage of this command are +% shown in Table~\ref{tab:abortions}. +% +% +% \begin{table} +% \centering +% \def\arraystretch{2} +% \begin{tabular}{>{\tt\bslash pstAbortion[}p{0.6\textwidth}<{]\{A\}}c} +% \hline +% \multicolumn{1}{l}{Command} & Symbol\\ +% \hline +% belowtext=male & \rule{0cm}{1cm} \pstAbortion[belowtext=male]{A}\\ +% sab, righttext=1w & \pstAbortion[sab, righttext=1w]{A}\\ +% affected & \pstAbortion[affected]{A}\\ +% \hline +% \end{tabular} +% \caption{Examples of Abortion Symbols} +% \label{tab:abortions} +% \end{table} +% +%\subsubsection{Childlessness and Infertility} +%\label{sec:childness} +% +% The symbols for childlessness and infertility are listed under +% ``line definitions'' in~\cite{PedigreeNomenclature95}. However, to +% make the placing the symbols on the chart more flexible, we assign +% nodes to them. +% +% \DescribeMacro{\pstChildless} +% The command for drawing these symbols +% has the same structure as the other node drawing commands: +% |\pstChildless}|\oarg{options}\marg{id}. +% While all options listed in Table~\ref{tab:pstPerson} are valid, the +% only meaningful one is |belowtext|. Note that the option +% |belowtextrp| is silently ignored: the text is always centered +% below the infertility symbol. +% +% \DescribeOption{infertile} +% There is one additional option +% |infertile|, which can have values |true| of |false|. If it is +% |false|, the person (or relationship) is childless by choice (or by +% an unknown reason). The clause |=true| can be omitted. +% +% +% \begin{table} +% \centering +% \def\arraystretch{2} +% \begin{tabular}{>{\tt\bslash pstChildless[}p{0.6\textwidth}<{]\{C\}}c} +% \hline +% \multicolumn{1}{l}{Command} & Symbol\rule{0.5cm}{0cm}\\ +% \hline +% belowtext=vasectomy & +% \pstChildless[belowtext=vasectomy]{A}\\ +% belowtext=anospermia, infertile & +% \pstChildless[belowtext=anospermia, infertile]{A}\\ +% \hline +% \end{tabular} +% \caption{Examples of Childlessness or Infertility Symbols} +% \label{tab:childness} +% \end{table} +% +% +% +%\subsection{Connection Drawing Commands} +%\label{sec:lines} +% +% The connections in pedigrees are based on |\ncline| and friends. +% There are, however, some additional features for pedigree +% connections. +% +% +%\subsubsection{Relationship} +%\label{sec:relationship} +% +%\DescribeMacro{\pstRelationship} +% Relationships are marriages or other unions. The main command for +% drawing relationships is +% |\pstRelationship|\oarg{options}\marg{nodeA}\marg{nodeB}. It draws +% a relationship line between \marg{nodeA} and \marg{nodeB}. Normal +% |PSTricks| options like |linestyle=dashed| can be used with the +% expected effect. +% +% \DescribeOptions{broken,consanguinic,descentnode,brokenpos,descentnodepos,rellinecmd} +% There are also several options specific for this command, listed in +% Table~\ref{tab:relationship_opts}. The options |broken| and +% |consanguinic| are self-explanatory. The option |descentnode| is +% used, if we want the descent lines to start at a node on the +% relationship line. The name of this descent node must satisfy the +% usual criteria for the node (see Section~\ref{sec:intro}). The +% options |brokenpos| and |descentnodepos| determine, where on the +% relationship line the corresponding objects are placed. The option +% |rellinecmd| allows to change the default straight line for the +% relationship to something else, like |ncbar|, |ncangle|, etc. +% Examples of this command use are shown in +% Table~\ref{tab:pstRelationship} +% +% +% +% \begin{table} +% \centering +% \begin{tabular}{l>{\raggedright\obeylines +% }p{0.2\linewidth}lp{0.3\linewidth}} +% \hline +% Option & Values & Default & Description \\ +% \hline +% |broken| & |true|, |false| & |false| & Whether the +% relationship no longer exists\\ +% |consanguinic| & |true|, |false| & |false| & Whether the +% relationship is consanguinic\\ +% |descentnode| & Node name & None & A node that will be used +% to draw descent lines for the relationship \\ +% |brokenpos| & A number between 0 and 1 & 0.3 & Where to put the +% symbol for broken relationship on the line (as a fraction of the +% line length)\\ +% |descentnodepos| & A number & 0.5 & Where +% to put the the descent node on the relationship line\\ +% |rellinecmd| & Name & |ncline| & Name of the line drawing +% command (without \textbackslash)\\ +% \hline +% \end{tabular} +% \caption{Options for Relationship Lines} +% \label{tab:relationship_opts} +% \end{table} +% +% \begin{table} +% \centering +% \def\arraystretch{1.5} +% \begin{tabular}{>{\tt\raggedright\obeylines }b{0.6\textwidth}c} +% \hline +% \multicolumn{1}{l}{Command} & Result\\ +% \hline +% \bslash rput(0.5,0.5)\{\bslash pstPerson[male]\{A\}\} +% \bslash rput(2.5,0.5)\{\bslash pstPerson[female]\{B\}\} +% \bslash pstRelationship[broken]\{A\}\{B\} +% & +% \begin{pspicture}[shift=-1](3,1) +% \rput(0.5,0.5){\pstPerson[male]{A}} +% \rput(2.5,0.5){\pstPerson[female]{B}} +% \pstRelationship[broken]{A}{B} +% \end{pspicture}\\ +% \bslash rput(0.5,0.5)\{\bslash pstPerson[male]\{A\}\} +% \bslash rput(2.5,0.5)\{\bslash pstPerson[female]\{B\}\} +% \bslash pstRelationship[consanguinic]\{A\}\{B\} +% & +% \begin{pspicture}[shift=-1](3,1) +% \rput(0.5,0.5){\pstPerson[male]{A}} +% \rput(2.5,0.5){\pstPerson[female]{B}} +% \pstRelationship[consanguinic]{A}{B} +% \end{pspicture}\\ +% \bslash rput(0.5,1.5)\{\bslash pstPerson[male]\{A\}\} +% \bslash rput(2.5,1.5)\{\bslash pstPerson[female]\{B\}\} +% \bslash rput(1.5,0.5)\{\bslash pstPerson[female]\{C\}\} +% \bslash pstRelationship[descentnode=AB]\{A\}\{B\} +% \bslash ncline\{AB\}\{C\} +% & +% \begin{pspicture}[shift=-1](3,2) +% \rput(0.5,1.5){\pstPerson[male]{A}} +% \rput(2.5,1.5){\pstPerson[female]{B}} +% \rput(1.5,0.5){\pstPerson[female]{C}} +% \pstRelationship[descentnode=AB]{A}{B} +% \ncline{AB}{C} +% \end{pspicture}\\ +% \bslash rput(0.5,1.5)\{\bslash +% pstPerson[male, belowtext=1-1]\{A\}\} +% \bslash rput(2.5,1.5)\{\bslash +% pstPerson[affected, female, belowtext=1-2]\{B\}\} +% \bslash rput(1.5,0.6)\{\bslash pstPerson[male, +% belowtext=2-1]\{C\}\} +% \bslash pstRelationship[descentnode=AB, rellinecmd=ncangle, +% angleA=90, angleB=90, descentnodepos=1.5, +% broken, brokenpos=1.2]\{A\}\{B\} +% \bslash ncline\{AB\}\{C\} +% & +% \begin{pspicture}[shift=-1](3,3) +% \rput(0.5,1.5){\pstPerson[male,belowtext=1-1]{A}} +% \rput(2.5,1.5){\pstPerson[affected,female, belowtext=1-2]{B}} +% \rput(1.5,0.6){\pstPerson[male, belowtext=2-1]{C}} +% \pstRelationship[descentnode=AB, rellinecmd=ncangle, +% angleA=90, angleB=90, descentnodepos=1.5, +% broken, brokenpos=1.2]{A}{B} +% \ncline{AB}{C} +% \end{pspicture}\\ +% \hline +% \end{tabular} +% \caption{Examples of Relationships} +% \label{tab:pstRelationship} +% \end{table} +% +% +%\subsubsection{Descent} +%\label{sec:pstDescent} +% +% The paper~\cite{PedigreeNomenclature95} distinguishes between +% descent line and sibs line. We, however, will call all segments of +% the line, joining a parent (or a descent node) and a child the +% descent line. \DescribeMacro{\pstDescent} The main command for +% showing parent-child relations is +% |\pstDescent|\oarg{options}\marg{Parent}\marg{Child}. It has no +% special options, but the usual |\PSTricks| options for lines are +% valid. The most important option is |armB|: the length of the +% segment between the parent node and the sib line. Note that to make +% the sib line straight the actual direction of the |\ncangle| used by +% |\pstRelationship| internally is \emph{reversed}: from \marg{Child} +% to \marg{Parent}. Examples of this command are shown in +% Table~\ref{tab:pstDescent}. Note the option |linestyle=dashed| used +% to show social parentage in the first example. +% +% +% +% \begin{table} +% \centering +% \def\arraystretch{1.5} +% \begin{tabular}{>{\tt\raggedright\obeylines }b{0.6\textwidth}c} +% \hline +% \multicolumn{1}{l}{Command} & Result\\ +% \hline +% \bslash rput(1.5,2)\{\bslash pstPerson[female]\{A\}\} +% \bslash rput(0.5,0.5)\{\bslash pstPerson[female, adopted]\{B\}\} +% \bslash rput(1.5,0.5)\{\bslash pstPerson[male]\{C\}\} +% \bslash rput(2.5,0.5)\{\bslash pstAbortion[female]\{D\}\} +% \bslash pstDescent[linestyle=dashed]\{A\}\{B\} +% \bslash pstDescent\{A\}\{C\} +% \bslash pstDescent\{A\}\{D\} +% & +% \begin{pspicture}[shift=-1](3,2.5) +% \rput(1.5,2){\pstPerson[female]{A}} +% \rput(0.5,0.5){\pstPerson[female, adopted]{B}} +% \rput(1.5,0.5){\pstPerson[male]{C}} +% \rput(2.5,0.5){\pstAbortion[female]{D}} +% \pstDescent[linestyle=dashed]{A}{B} +% \pstDescent{A}{C} +% \pstDescent{A}{D} +% \end{pspicture}\\ +% \bslash psset\{armB=1\} +% \bslash rput(0.5,2)\{\bslash pstPerson[male, belowtext=Fred]\{A\}\} +% \bslash rput(2.5,2)\{\bslash pstPerson[female, obligatory, belowtext=Ginger]\{B\}\} +% \bslash pstRelationship[descentnode=AB]\{A\}\{B\} +% \bslash rput(0.5,0.5)\{\bslash pstPerson[male,asymptomatic, belowtext=John]\{C1\}\} +% \bslash rput(1.5,0.5)\{\bslash pstPerson[female, belowtext=Mary]\{C2\}\} +% \bslash rput(2.5,0.5)\{\bslash pstAbortion[sab, affected, belowtext=male]\{C3\}\} +% \bslash pstDescent\{AB\}\{C1\} +% \bslash pstDescent\{AB\}\{C2\} +% \bslash pstDescent\{AB\}\{C3\} +% & +% \begin{pspicture}[shift=-1](0,-0.2)(3.5,2.5) +% \psset{armB=1} +% \rput(0.5,2){\pstPerson[male, belowtext=Fred]{A}} +% \rput(2.5,2){\pstPerson[female, obligatory, belowtext=Ginger]{B}} +% \pstRelationship[descentnode=AB]{A}{B} +% \rput(0.5,0.5){\pstPerson[male,asymptomatic, belowtext=John]{C1}} +% \rput(1.5,0.5){\pstPerson[female, belowtext=Mary]{C2}} +% \rput(2.5,0.5){\pstAbortion[sab, affected, belowtext=male]{C3}} +% \pstDescent{AB}{C1} +% \pstDescent{AB}{C2} +% \pstDescent{AB}{C3} +% \end{pspicture}\\ +% \bslash rput(0.5,1.5)\{\bslash pstPerson[male]\{A\}\} +% \bslash rput(2.5,1.5)\{\bslash pstPerson[female]\{B\}\} +% \bslash pstRelationship[descentnode=AB]\{A\}\{B\} +% \bslash rput(1.5,0.5)\{\bslash pstChildless[infertile, belowtext=anospermia]\{C\}\} +% \bslash pstDescent\{AB\}\{C\} +% & +% \begin{pspicture}[shift=-1](0,-0.2)(3,2) +% \rput(0.5,1.5){\pstPerson[male]{A}} +% \rput(2.5,1.5){\pstPerson[female]{B}} +% \pstRelationship[descentnode=AB]{A}{B} +% \rput(1.5,0.5){\pstChildless[belowtext=anospermia, infertile]{C}} +% \pstDescent{AB}{C} +% \end{pspicture}\\ +% \hline +% \end{tabular} +% \caption{Examples of Descent Lines} +% \label{tab:pstDescent} +% \end{table} +% +% +%\subsubsection{Twins} +%\label{sec:pstTwins} +% +% +% +% \DescribeMacro{\pstTwins} A special care is needed when we talk +% about twins. First, the user must define a \emph{twin node}: the +% node which is used as a nexus for twin lines. Then the following +% command draws all the necessary +% lines: \\ +% |\pstTwins|\oarg{options}\marg{Parent}\marg{TwinNode}\marg{LeftTwin}\marg{RightTwin}. +% +% \DescribeOptions{monozygotic,qzygotic,mzlinepos,addtwins} +% The options for this command are listed in +% Table~\ref{tab:twin_opts}. The option |monozygotic| allows to show +% that the twins are monozygotic. The actual position of the +% horizontal line is determined by the option |mzlinepos|. If it is +% unknown, whether the twins are monozygotic or not, |qzygotic| +% options draws a question mark, as recommended +% by~\cite{PedigreeNomenclature95}. Note that |mzlinepos| in this +% situation helps to position the question mark properly. The option +% |addtwin| allows to draw pedigrees with more than two twins. It can +% be repeated several times if necessary. Examples of the usage of +% this command are shown in Table~\ref{tab:pstTwins}. +% +% \begin{table} +% \centering +% \begin{tabular}{l>{\raggedright\obeylines +% }p{0.2\linewidth}lp{0.3\linewidth}} +% \hline +% Option & Values & Default & Description \\ +% \hline +% |monozygotic| & |true|, |false| & |false| & Whether the twins +% are monozygotic\\ +% |qzygotic| & |true|, |false| & |false| & Whether the +% monozygoticity of twins is questionable\\ +% |addtwin| & Twin node & Node & Additional twin node id if +% there are more than two twins (this +% option may be repeated)\\ +% |mzlinepos| & A number & 0.5 & Where to put the horizontal +% line for monozygotic twins (as a factor of the total line length)\\ +% \hline +% \end{tabular} +% \caption{Options for Twins Lines} +% \label{tab:twin_opts} +% \end{table} +% +% +% \begin{table} +% \centering +% \def\arraystretch{1.5} +% \begin{tabular}{>{\tt\raggedright\obeylines }b{0.6\textwidth}c} +% \hline +% \multicolumn{1}{l}{Command} & Result\\ +% \hline +% \bslash rput(1.5,2)\{\bslash pstPerson[female]\{A\}\} +% \bslash rput(1,1.1)\{\bslash pnode\{Twins\}\} +% \bslash rput(0.5,0.5)\{\bslash pstPerson[male]\{B\}\} +% \bslash rput(1.5,0.5)\{\bslash pstPerson[male]\{C\}\} +% \bslash rput(2.5,0.5)\{\bslash pstPerson[female]\{D\}\} +% \bslash pstTwins[monozygotic]\{A\}\{Twins\}\{B\}\{C\} +% \bslash pstDescent\{A\}\{D\} +% & +% \begin{pspicture}(3,2.5) +% \rput(1.5,2){\pstPerson[female]{A}} +% \rput(1,1.1){\pnode{Twins}} +% \rput(0.5,0.5){\pstPerson[male]{B}} +% \rput(1.5,0.5){\pstPerson[male]{C}} +% \rput(2.5,0.5){\pstPerson[female]{D}} +% \pstTwins[monozygotic]{A}{Twins}{B}{C} +% \pstDescent{A}{D} +% \end{pspicture}\\ +% \bslash rput(0.5,2)\{\bslash pstPerson[male]\{A\}\} +% \bslash rput(2.5,2)\{\bslash pstPerson[female]\{B\}\} +% \bslash pstRelationship[descentnode=AB]\{A\}\{B\} +% \bslash rput(1.5,1.2)\{\bslash pnode\{Twins\}\} +% \bslash rput(1,0.5)\{\bslash pstPerson[male]\{C1\}\} +% \bslash rput(2,0.5)\{\bslash pstPerson[male]\{C2\}\} +% \bslash pstTwins[qzygotic, mzlinepos=0.8]\{AB\}\{Twins\}\{C1\}\{C2\} +% & +% \begin{pspicture}(3,2.5) +% \rput(0.5,2){\pstPerson[male]{A}} +% \rput(2.5,2){\pstPerson[female]{B}} +% \pstRelationship[descentnode=AB]{A}{B} +% \rput(1.5,1.2){\pnode{Twins}} +% \rput(1,0.5){\pstPerson[male]{C1}} +% \rput(2,0.5){\pstPerson[male]{C2}} +% \pstTwins[qzygotic, mzlinepos=0.8]{AB}{Twins}{C1}{C2} +% \end{pspicture}\\ +% \bslash rput(1.5,2)\{\bslash pstPerson[male]\{A\}\} +% \bslash rput(1.5,1.5)\{\bslash pnode\{Twins\}\} +% \bslash rput(0.5,0.5)\{\bslash pstPerson[female]\{B\}\} +% \bslash rput(1.2,0.5)\{\bslash pstPerson[female]\{C\}\} +% \bslash rput(1.9,0.5)\{\bslash pstPerson[female]\{D\}\} +% \bslash rput(2.6,0.5)\{\bslash pstPerson[female]\{E\}\} +% \bslash pstTwins[addtwin=C, addtwin=D]\{A\}\{Twins\}\{B\}\{E\} +% & +% \begin{pspicture}(3,2.5) +% \rput(1.5,2){\pstPerson[male]{A}} +% \rput(1.5,1.5){\pnode{Twins}} +% \rput(0.5,0.5){\pstPerson[female]{B}} +% \rput(1.2,0.5){\pstPerson[female]{C}} +% \rput(1.9,0.5){\pstPerson[female]{D}} +% \rput(2.6,0.5){\pstPerson[female]{E}} +% \pstTwins[addtwin=C, addtwin=D]{A}{Twins}{B}{E} +% \end{pspicture}\\ +% \hline +% \end{tabular} +% \caption{Examples of Twins Lines} +% \label{tab:pstTwins} +% \end{table} +% +% +% +%\subsection{Making Trees} +%\label{sec:trees} +% +% As discussed above (Section~\ref{sec:intro}), the medical pedigrees +% are not necessary trees. Even if they are, they are usually not +% simple layered trees. Nevertheless sometimes pedigree can be +% represented as a layered tree. For such cases we provide tree +% drawing commands. See the discussion in~\cite{pedigree-perl} for +% more details. +% +% \DescribeMacro{\TpstPerson} +% \DescribeMacro{\TpstAbortion} +% \DescribeMacro{\TpstChildless} +% The macros |\TpstPerson|, |\TpstAbortion| and |\TpstChildless| have +% the same options and arguments as their ``normal'' counterparts. You +% probably need to use command like +% \begin{verbatim} +% \def\psedge{\pstDescent} +% \psset{armB=1} +% \end{verbatim} +% in your code. An example of us of such commands is shown on +% Figure~\ref{fig:example_tree}. Note that the resulting figure is +% \emph{not} a tree! The corresponding code is shown on +% Figure~\ref{fig:example_tree_code}. +% +% \begin{figure} +% \centering +% \begin{pspicture}(0,1)(7,7) +% \rput(3,4){% +% \pstree{\TpstPerson[female, obligatory, belowtext=Ann]{Ann}}{% +% \def\psedge{\pstDescent}\psset{armB=1} +% \pstree{\TpstPerson[male, affected, belowtext=John]{John}}{% +% \TpstPerson[female, belowtext=Sue]{Sue} +% \TpstPerson[male, belowtext=Paul]{Paul} +% \TpstAbortion[affected, belowtext=male]{A1} +% \pstree[thislevelsep=1.2]{\TpstPerson[male, +% belowtext=Peter, affected, proband]{Peter}}{% +% \def\psedge{\ncline} +% \TpstChildless[infertile]{C1} +% } +% } +% \pstree{\TpstPerson[female, belowtext=Mary]{Mary}}{ +% \TpstPerson[female, belowtext=Joan]{Joan} +% } +% } +% } +% \pstRelationship[consanguinic]{Peter}{Joan} +% \end{pspicture} +% \caption{Example of Using Tree-Making Commands} +% \label{fig:example_tree} +% \end{figure} +% +% \begin{figure} +% \centering +% \begin{verbatim} +% \begin{pspicture}(0,1)(7,7) +% \rput(3,4){% +% \pstree{\TpstPerson[female, obligatory, belowtext=Ann]{Ann}}{% +% \def\psedge{\pstDescent}\psset{armB=1} +% \pstree{\TpstPerson[male, affected, belowtext=John]{John}}{% +% \TpstPerson[female, belowtext=Sue]{Sue} +% \TpstPerson[male, belowtext=Paul]{Paul} +% \TpstAbortion[affected, belowtext=male]{A1} +% \pstree[thislevelsep=1.2]{\TpstPerson[male, +% belowtext=Peter, affected, proband]{Peter}}{% +% \def\psedge{\ncline} +% \TpstChildless[infertile]{C1} +% } +% } +% \pstree{\TpstPerson[female, belowtext=Mary]{Mary}}{ +% \TpstPerson[female, belowtext=Joan]{Joan} +% } +% } +% } +% \pstRelationship[consanguinic]{Peter}{Joan} +% \end{pspicture} +% \end{verbatim} +% \caption{Code Producing Figure~\ref{fig:example_tree}} +% \label{fig:example_tree_code} +% \end{figure} +% +% +% +%\subsection{More Examples} +%\label{sec:examples} +% +% A number of examples were listed above. Here we show even more +% examples of complex pedigrees. +% +% On Figure~\ref{fig:example_PROMM} we show an example of a pedigree +% from~\cite{Harper01:MDBook}. The corresponding code is listed on +% Figure~\ref{fig:example_PROMM_code}. +% +% \begin{figure} +% \centering +% \begin{pspicture}(6,6) +% \psset{belowtextrp=t, armB=1} +% \rput(2.5,5.5){\pstPerson[male, deceased, belowtext=I:1]{I:1}} +% \rput(3.5,5.5){\pstPerson[female, deceased, belowtext=I:2]{I:2}} +% \pstRelationship[descentnode=I:1_2]{I:1}{I:2} +% \rput(1,3.5){\pstPerson[female, affected, belowtext=II:1]{II:1}} +% \pstDescent{I:1_2}{II:1} +% \rput(2,3.5){\pstPerson[male, belowtext=II:2]{II:2}} +% \pstRelationship[descentnode=II:1_2]{II:1}{II:2} +% \rput(3.5,3.5){\pstPerson[male, affected, belowtext=II:3]{II:3}} +% \pstDescent{I:1_2}{II:3} +% \rput(4.5,3.5){\pstPerson[female, belowtext=II:4]{II:4}} +% \pstRelationship[descentnode=II:3_4]{II:3}{II:4} +% \rput(5.5,3.5){\pstPerson[female, affected, deceased, proband, +% belowtext=II:5]{II:5}} +% \pstDescent{I:1_2}{II:5} +% \rput(0.5,1.5){\pstPerson[female, belowtext=III:1]{III:1}} +% \pstDescent{II:1_2}{III:1} +% \rput(1.5,1.5){\pstPerson[female, belowtext=III:2]{III:2}} +% \pstDescent{II:1_2}{III:2} +% \rput(2.5,1.5){\pstPerson[female, deceased, +% belowtext=\parbox{2cm}{\centering III:3\\4/52}]{III:3}} +% \pstDescent{II:1_2}{III:3} +% \rput(3.5,1.5){\pstPerson[female, affected, +% belowtext=III:4]{III:4}} +% \pstDescent{II:3_4}{III:4} +% \rput(4.5,1.5){\pstPerson[male, insidetext=?, +% belowtext=III:5]{III:5}} +% \pstDescent{II:3_4}{III:5} +% \end{pspicture} +% \caption{Example of a Pedigree of a Family With PROMM +% From~\cite[p.~48]{Harper01:MDBook}} +% \label{fig:example_PROMM} +% \end{figure} +% +% +% \begin{figure} +% \centering +% \begin{verbatim} +% \begin{pspicture}(6,6) +% \psset{belowtextrp=t, armB=1} +% \rput(2.5,5.5){\pstPerson[male, deceased, belowtext=I:1]{I:1}} +% \rput(3.5,5.5){\pstPerson[female, deceased, belowtext=I:2]{I:2}} +% \pstRelationship[descentnode=I:1_2]{I:1}{I:2} +% \rput(1,3.5){\pstPerson[female, affected, belowtext=II:1]{II:1}} +% \pstDescent{I:1_2}{II:1} +% \rput(2,3.5){\pstPerson[male, belowtext=II:2]{II:2}} +% \pstRelationship[descentnode=II:1_2]{II:1}{II:2} +% \rput(3.5,3.5){\pstPerson[male, affected, belowtext=II:3]{II:3}} +% \pstDescent{I:1_2}{II:3} +% \rput(4.5,3.5){\pstPerson[female, belowtext=II:4]{II:4}} +% \pstRelationship[descentnode=II:3_4]{II:3}{II:4} +% \rput(5.5,3.5){\pstPerson[female, affected, deceased, proband, +% belowtext=II:5]{II:5}} +% \pstDescent{I:1_2}{II:5} +% \rput(0.5,1.5){\pstPerson[female, belowtext=III:1]{III:1}} +% \pstDescent{II:1_2}{III:1} +% \rput(1.5,1.5){\pstPerson[female, belowtext=III:2]{III:2}} +% \pstDescent{II:1_2}{III:2} +% \rput(2.5,1.5){\pstPerson[female, deceased, +% belowtext=\parbox{2cm}{\centering III:3\\4/52}]{III:3}} +% \pstDescent{II:1_2}{III:3} +% \rput(3.5,1.5){\pstPerson[female, affected, +% belowtext=III:4]{III:4}} +% \pstDescent{II:3_4}{III:4} +% \rput(4.5,1.5){\pstPerson[male, insidetext=?, +% belowtext=III:5]{III:5}} +% \pstDescent{II:3_4}{III:5} +% \end{pspicture} +% \end{verbatim} +% \caption{Code Producing Figure~\ref{fig:example_PROMM}} +% \label{fig:example_PROMM_code} +% \end{figure} +% +% +% A very complex pedigree is used as an example +% in~\cite{PedigreeNomenclature95}. On +% Figure~\ref{fig:complex_example} we reproduce this pedigree. The +% corresponding code is shown on +% Figures~\ref{fig:complex_example_codeI}, +% \ref{fig:complex_example_codeII} and~\ref{fig:complex_example_codeIII}. +% +% \begin{figure} +% \centering +% \rotatebox{90}{ +% \begin{pspicture}(0.7,0)(21.3,9) +% \psset{armB=1.1, hatchsep=1.5pt} +% \rput(3.5,8){Ethnic Background} +% \rput(18.5,8){Ethnic Background} +% \rput(3.5,7.5){\rnode{OType1}{O'Type}} +% \rput(18.5,7.5){\pnode{Origin2}} +% \rput(6.5,7.5){\rnode{Quest1}{?}} +% \rput(1,6.5){\Huge I} +% \rput(1.5,6.5){\pstPerson[male, belowtext=1]{I1}} +% \rput(2.5,6.5){\pstPerson[female, obligatory, belowtext=2]{I2}} +% \rput(3.5,6.5){\pstPerson[male, belowtext=3]{I3}} +% \rput(4.5,6.5){\pstPerson[male, belowtext=4]{I4}} +% \rput(5.5,6.5){\pstPerson[male, belowtext=5]{I5}} +% \rput(6.5,6.5){\pstPerson[female, affected, +% belowtext=6]{I6}} +% \rput(2,7.2){\pnode{Twins1}} +% \rput(4,7.2){\pnode{Twins2}} +% \pstTwins[armB=0]{OType1}{Twins1}{I1}{I2} +% \pstTwins[qzygotic, armB=0, mzlinepos=0.8]{OType1}{Twins2}{I3}{I4} +% \pstDescent[armB=0]{OType1}{I5} +% \pstDescent[armB=0]{Quest1}{I6} +% \pstRelationship[descentnode=I5I6]{I5}{I6} +% \rput(1.5,5.5){\pstChildless{CI1}} +% \ncline{I1}{CI1} +% \rput(13.5,6.5){\pstPerson[male, deceased, belowtextrp=t, +% belowtext=\parbox{2cm}{\centering d. 72 y\\7}]{I7}} +% \rput(15.5,6.5){\pstPerson[female, deceased, belowtextrp=t, +% belowtext=\parbox{2cm}{\centering d. 70 y\\8}]{I8}} +% \pstRelationship[descentnode=I7I8]{I7}{I8} +% \rput(21,6.5){\pstPerson[insidetext=5, belowtext=9--14, +% belowtextrp=rt]{I9}} +% \pstDescent[armB=0]{Origin2}{I8} +% \pstDescent[armB=0]{Origin2}{I9} +% \rput(1,4.5){\Huge II} +% \rput(2.5,4.5){\pstPerson[male, affected, belowtext=1, +% abovetext=Proto, abovetextrp=rB]{II1}} +% \pstDescent{I2}{II1} +% \rput(4.5,4.5){\pstPerson[female, asymptomatic, +% belowtext=\parbox{3cm}{32 y\\ +% $E_3-$\\$E_4+$(45n/18n)\\2}, abovetext={Sterrie}, +% abovetextrp=rB, evaluated]{II2}} +% \pstDescent{I5I6}{II2} +% \pstRelationship[consanguinic, descentnode=II1II2]{II1}{II2} +% \rput(5.5,5.2){\rnode{Quest2}{?}} +% \rput(5.5,4.5){\pstPerson[female, insidetext=D, +% belowtext=3]{II3}} +% \ncline{Quest2}{II3} +% \rput(6.5,5.2){\rnode{Quest3}{?}} +% \rput(6.5,4.5){\pstPerson[male, insidetext=D, +% belowtext=4]{II4}} +% \ncline{Quest3}{II4} +% \rput(7.5,4.5){\pstPerson[female, belowtext=5]{II5}} +% \rput(8.5,4.5){\pstPerson[male, abovetext=Gary, abovetextrp=rB, +% belowtext=\parbox{2cm}{36 y\\$E_3-$\\6}, +% evaluated]{II6}} +% \rput(9.5,4.5){\pstPerson[male, abovetext={Gene}, +% belowtext=\parbox{2cm}{36 y\\$E_3-$\\7}, +% evaluated]{II7}} +% \rput(9,5.2){\pnode{Twins3}} +% \pstTwins[monozygotic]{I5I6}{Twins3}{II6}{II7} +% \pstRelationship{II5}{II6} +% \rput(7.5,5.7){O'Type} +% \rput(11.5,4.5){\pstPerson[female, proband, +% belowtext=\parbox{1cm}{35 y\\8}, abovetext=Feene]{II8}} +% \pstRelationship[descentnode=II7II8]{II7}{II8} +% \rput(13.5,4.5){\pstPerson[male, belowtext=9]{II9}} +% \pstRelationship[broken, descentnode=II8II9, +% descentnodepos=0.85]{II8}{II9} +% \rput(16,4.5){\pstPerson[abovetext=Stacey, female, +% abovetextrp=rB, +% belowtext=\parbox{1cm}{33y\\ 10}]{II10}} +% \def\affectedstyle{fillstyle=crosshatch} +% \rput(17,4.5){\pstPerson[male, affected, abovetext=Sam, +% belowtext=\parbox{3cm}{31 y\\ $E_2+$\\ +% 11}, hatchsep=3pt]{II11}} +% \rput(17,3.5){\pstChildless[infertile]{C2}} +% \ncline{II11}{C2} +% \rput(18,4.5){\pstPerson[male, obligatory, +% abovetext=Donald, +% belowtext=\parbox{3cm}{29 y\\ $E_2+$ \\ +% 12}]{II12}} +% \pstDescent{I7I8}{II8} +% \pstDescent{I7I8}{II10} +% \pstDescent{I7I8}{II11} +% \pstDescent{I7I8}{II12} +% \rput(19,4.5){\pstPerson[female, belowtext=13]{II13}} +% \pstRelationship[descentnode=II12II13]{II12}{II13} +% \rput(20,4.5){\pstPerson[female, insidetext=S, +% belowtext=14]{II14}} +% \rput(21,4.5){\pstPerson[insidetext=n]{II15}} +% \pstDescent{I9}{II15} +% \rput(1,2.5){\Huge III} +% \rput(3,2.5){\pstPerson[male, adopted, belowtext=1]{III1}} +% \rput(4,2.5){\pstPerson[insidetext=P, belowtext=2]{III2}} +% \pstDescent[linestyle=dashed]{II1II2}{III1} +% \pstDescent{II1II2}{III2} +% \ncline{II3}{III2} +% \rput(7.5,2.5){\pstPerson[insidetext=P, +% belowtext=\parbox{2cm}{6 wk\\3}]{III3}} +% \pstDescent{II5}{III3} +% \ncline{II4}{III3} +% \def\affectedstyle{fillstyle=vlines} +% \rput(10,2.5){\pstAbortion[affected, +% belowtext=\parbox{2cm}{\centering +% female\\18wk\\$E_1+$(tri 21)\\4}, +% belowtextrp=t]{III4}} +% \rput(11,2.5){\pstPerson[insidetext=P, +% belowtext=\parbox{1cm}{16wk\\5}]{III5}} +% \pstDescent{II7II8}{III4} +% \pstDescent{II7II8}{III5} +% \rput(12,2.5){\pstAbortion[belowtext=6]{III6}} +% \rput(13,2.5){\pstAbortion[sab, belowtextrp=t, +% belowtext=\parbox{2cm}{\centering female\\19 wk\\ +% 7}]{III7}} +% \rput(14,2.5){\pstPerson[adopted, male, +% belowtext=\parbox{1cm}{10 y\\ 8}]{III8}} +% \pstDescent{II8II9}{III6} +% \pstDescent{II8II9}{III7} +% \pstDescent{II8II9}{III8} +% \ncline[linestyle=dashed]{II10}{III8} +% \rput(15,2.5){\pstAbortion[sab, belowtext=9]{III9}} +% \def\affectedstyle{fillstyle=hlines} +% \rput(16,2.5){\pstAbortion[sab, belowtextrp=t, affected, +% belowtext=\parbox{2cm}{\centering male\\ 20 wk\\ $E_1+$ +% (tri 18)\\ 10}]{III10}} +% \rput(17,2.5){\pstPerson[deceased, female, +% belowtext=\parbox{1cm}{\centering SB\\32 wk\\ +% 11}]{III11}} +% \pstDescent{II10}{III9} +% \pstDescent{II10}{III10} +% \pstDescent{II10}{III11} +% \rput(20,2.5){\pstPerson[insidetext=P, +% belowtext=12]{III12}} +% \pstDescent{II14}{III12} +% \ncline{II12II13}{III12} +% \end{pspicture} +% } +% \caption{A Complex Pedigree From~\cite{PedigreeNomenclature95}} +% \label{fig:complex_example} +% \end{figure} +% +% +% \begin{figure} +% \centering +% \begin{verbatim} +% \psset{armB=1.1, hatchsep=1.5pt} +% \rput(3.5,8){Ethnic Background} +% \rput(18.5,8){Ethnic Background} +% \rput(3.5,7.5){\rnode{OType1}{O'Type}} +% \rput(18.5,7.5){\pnode{Origin2}} +% \rput(6.5,7.5){\rnode{Quest1}{?}} +% \rput(1,6.5){\Huge I} +% \rput(1.5,6.5){\pstPerson[male, belowtext=1]{I1}} +% \rput(2.5,6.5){\pstPerson[female, obligatory, belowtext=2]{I2}} +% \rput(3.5,6.5){\pstPerson[male, belowtext=3]{I3}} +% \rput(4.5,6.5){\pstPerson[male, belowtext=4]{I4}} +% \rput(5.5,6.5){\pstPerson[male, belowtext=5]{I5}} +% \rput(6.5,6.5){\pstPerson[female, affected, +% belowtext=6]{I6}} +% \rput(2,7.2){\pnode{Twins1}} +% \rput(4,7.2){\pnode{Twins2}} +% \pstTwins[armB=0]{OType1}{Twins1}{I1}{I2} +% \pstTwins[qzygotic, armB=0, mzlinepos=0.8]{OType1}{Twins2}{I3}{I4} +% \pstDescent[armB=0]{OType1}{I5} +% \pstDescent[armB=0]{Quest1}{I6} +% \pstRelationship[descentnode=I5I6]{I5}{I6} +% \rput(1.5,5.5){\pstChildless{CI1}} +% \ncline{I1}{CI1} +% \rput(13.5,6.5){\pstPerson[male, deceased, belowtextrp=t, +% belowtext=\parbox{2cm}{\centering d. 72 y\\7}]{I7}} +% \rput(15.5,6.5){\pstPerson[female, deceased, belowtextrp=t, +% belowtext=\parbox{2cm}{\centering d. 70 y\\8}]{I8}} +% \pstRelationship[descentnode=I7I8]{I7}{I8} +% \rput(21,6.5){\pstPerson[insidetext=5, belowtext=9--14, +% belowtextrp=rt]{I9}} +% \pstDescent[armB=0]{Origin2}{I8} +% \pstDescent[armB=0]{Origin2}{I9} +% \end{verbatim} +% \caption{Code for Figure~\ref{fig:complex_example}: Generation I} +% \label{fig:complex_example_codeI} +% \end{figure} +% +% \begin{figure} +% \centering +% \begin{verbatim} +% \rput(1,4.5){\Huge II} +% \rput(2.5,4.5){\pstPerson[male, affected, belowtext=1, +% abovetext=Proto, abovetextrp=rB]{II1}} +% \pstDescent{I2}{II1} +% \rput(4.5,4.5){\pstPerson[female, asymptomatic, +% belowtext=\parbox{3cm}{32 y\\ +% $E_3-$\\$E_4+$(45n/18n)\\2}, abovetext={Sterrie}, +% abovetextrp=rB, evaluated]{II2}} +% \pstDescent{I5I6}{II2} +% \pstRelationship[consanguinic, descentnode=II1II2]{II1}{II2} +% \rput(5.5,5.2){\rnode{Quest2}{?}} +% \rput(5.5,4.5){\pstPerson[female, insidetext=D, +% belowtext=3]{II3}} +% \ncline{Quest2}{II3} +% \rput(6.5,5.2){\rnode{Quest3}{?}} +% \rput(6.5,4.5){\pstPerson[male, insidetext=D, +% belowtext=4]{II4}} +% \ncline{Quest3}{II4} +% \rput(7.5,4.5){\pstPerson[female, belowtext=5]{II5}} +% \rput(8.5,4.5){\pstPerson[male, abovetext=Gary, abovetextrp=rB, +% belowtext=\parbox{2cm}{36 y\\$E_3-$\\6}, +% evaluated]{II6}} +% \rput(9.5,4.5){\pstPerson[male, abovetext={Gene}, +% belowtext=\parbox{2cm}{36 y\\$E_3-$\\7}, +% evaluated]{II7}} +% \rput(9,5.2){\pnode{Twins3}} +% \pstTwins[monozygotic]{I5I6}{Twins3}{II6}{II7} +% \pstRelationship{II5}{II6} +% \rput(7.5,5.7){O'Type} +% \rput(11.5,4.5){\pstPerson[female, proband, +% belowtext=\parbox{1cm}{35 y\\8}, abovetext=Feene]{II8}} +% \pstRelationship[descentnode=II7II8]{II7}{II8} +% \rput(13.5,4.5){\pstPerson[male, belowtext=9]{II9}} +% \pstRelationship[broken, descentnode=II8II9, +% descentnodepos=0.85]{II8}{II9} +% \rput(16,4.5){\pstPerson[abovetext=Stacey, female, +% abovetextrp=rB, +% belowtext=\parbox{1cm}{33y\\ 10}]{II10}} +% \def\affectedstyle{fillstyle=crosshatch} +% \rput(17,4.5){\pstPerson[male, affected, abovetext=Sam, +% belowtext=\parbox{3cm}{31 y\\ $E_2+$\\ +% 11}, hatchsep=3pt]{II11}} +% \rput(17,3.5){\pstChildless[infertile]{C2}} +% \ncline{II11}{C2} +% \rput(18,4.5){\pstPerson[male, obligatory, +% abovetext=Donald, +% belowtext=\parbox{3cm}{29 y\\ $E_2+$ \\ +% 12}]{II12}} +% \pstDescent{I7I8}{II8} +% \pstDescent{I7I8}{II10} +% \pstDescent{I7I8}{II11} +% \pstDescent{I7I8}{II12} +% \rput(19,4.5){\pstPerson[female, belowtext=13]{II13}} +% \pstRelationship[descentnode=II12II13]{II12}{II13} +% \rput(20,4.5){\pstPerson[female, insidetext=S, +% belowtext=14]{II14}} +% \rput(21,4.5){\pstPerson[insidetext=n]{II15}} +% \pstDescent{I9}{II15} +% \end{verbatim} +% \caption{Code for Figure~\ref{fig:complex_example}: Generation II} +% \label{fig:complex_example_codeII} +% \end{figure} +% +% \begin{figure} +% \centering +% \begin{verbatim} +% \rput(1,2.5){\Huge III} +% \rput(3,2.5){\pstPerson[male, adopted, belowtext=1]{III1}} +% \rput(4,2.5){\pstPerson[insidetext=P, belowtext=2]{III2}} +% \pstDescent[linestyle=dashed]{II1II2}{III1} +% \pstDescent{II1II2}{III2} +% \ncline{II3}{III2} +% \rput(7.5,2.5){\pstPerson[insidetext=P, +% belowtext=\parbox{2cm}{6 wk\\3}]{III3}} +% \pstDescent{II5}{III3} +% \ncline{II4}{III3} +% \def\affectedstyle{fillstyle=vlines} +% \rput(10,2.5){\pstAbortion[affected, +% belowtext=\parbox{2cm}{\centering +% female\\18wk\\$E_1+$(tri 21)\\4}, +% belowtextrp=t]{III4}} +% \rput(11,2.5){\pstPerson[insidetext=P, +% belowtext=\parbox{1cm}{16wk\\5}]{III5}} +% \pstDescent{II7II8}{III4} +% \pstDescent{II7II8}{III5} +% \rput(12,2.5){\pstAbortion[belowtext=6]{III6}} +% \rput(13,2.5){\pstAbortion[sab, belowtextrp=t, +% belowtext=\parbox{2cm}{\centering female\\19 wk\\ +% 7}]{III7}} +% \rput(14,2.5){\pstPerson[adopted, male, +% belowtext=\parbox{1cm}{10 y\\ 8}]{III8}} +% \pstDescent{II8II9}{III6} +% \pstDescent{II8II9}{III7} +% \pstDescent{II8II9}{III8} +% \ncline[linestyle=dashed]{II10}{III8} +% \rput(15,2.5){\pstAbortion[sab, belowtext=9]{III9}} +% \def\affectedstyle{fillstyle=hlines} +% \rput(16,2.5){\pstAbortion[sab, belowtextrp=t, affected, +% belowtext=\parbox{2cm}{\centering male\\ 20 wk\\ $E_1+$ +% (tri 18)\\ 10}]{III10}} +% \rput(17,2.5){\pstPerson[deceased, female, +% belowtext=\parbox{1cm}{\centering SB\\32 wk\\ +% 11}]{III11}} +% \pstDescent{II10}{III9} +% \pstDescent{II10}{III10} +% \pstDescent{II10}{III11} +% \rput(20,2.5){\pstPerson[insidetext=P, +% belowtext=12]{III12}} +% \pstDescent{II14}{III12} +% \ncline{II12II13}{III12} +% \end{verbatim} +% \caption{Code for Figure~\ref{fig:complex_example}: Generation III} +% \label{fig:complex_example_codeIII} +% \end{figure} +%\clearpage +% +% +%\StopEventually{} +% +%\section{Implementation} +%\label{sec:implementation} +% +% +% +%\subsection{Identification and Setting Up} +%\label{sec:identification} +% +% +%Traditionally |PSTricks| works in two regimes: the \LaTeX one and +%the plain one. Probably it is a good idea to keep this +%tradition. Therefore we will use a \TeX{} file \path{pst-pdgr.tex} +%and a \LaTeX file \path{pst-pdgr.sty}. They have different means of +%preserving from loading twice and identification. +% +% \begin{macro}{\PSTPedigreeLoaded} +% A \TeX{} guard |\PSTPedigreeLoaded| prevents the double loading +% of the file: +% \begin{macrocode} +%<*tex> +\csname PSTPedigreeLoaded\endcsname +\let\PSTPedigreeLoaded\endinput +% +% \end{macrocode} +% \end{macro} +% +%Now we can start real identification. Note the difference between +%the ways a \LaTeX{} style, a \LaTeX{} configuration file and a \TeX{} +%file announce itself +% \begin{macrocode} +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesPackage{pst-pdgr} +%\ProvidesFile{pst-pdgr.cfg} +%\message{ +[2006/04/18 v0.2a Medical Pedigree with PSTricks] +%} +% \end{macrocode} +% +% The \LaTeX{} style is in fact just a wrapper: it calls the +% configuration file, and then the \TeX file, which does the real +% work: +% \begin{macrocode} +%<*latex> +\InputIfFileExists{pst-pdgr.cfg}{% + \typeout{Loading configuration file pst-pdgr.cfg}}{% + \typeout{Configuration file pst-pdgr.cfg is not found}} +\input{pst-pdgr.tex} +% +% \end{macrocode} +% +% Now we are dealing (almost) exclusively with \TeX. +% \begin{macrocode} +%<*tex> +% \end{macrocode} +% +% Check the packages we use are loaded: +% \begin{macrocode} +\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi +\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi +\ifx\PSTreeLoaded\endinput\else\input pst-tree.tex\fi +\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey.tex\fi +% \end{macrocode} +% +% We set up that |@| symbol: +% \begin{macrocode} +\catcode`\@=11\relax +% \end{macrocode} +% and set up keys for our package +% \begin{macrocode} +\pst@addfams{pst-pdgr} +% \end{macrocode} +% +%\subsection{Global Parameters} +%\label{sec:impl_globals} +% +% These macros define the way affected individuals are drawn +% \begin{macro}{\affectedbgcolor} +% The background color: +% \begin{macrocode} +\def\affectedbgcolor{gray} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\affectedfgcolor} +% The foreground color for the text: +% \begin{macrocode} +\def\affectedfgcolor{white} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\affectedstyle} +% And the style: +% \begin{macrocode} +\def\affectedstyle{fillstyle=solid, fillcolor=\affectedbgcolor} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@intxtcolor} +% Normally the color of the inside text for normal persons is the +% current color: +% \begin{macrocode} +\def\pst@pdgr@instxtcolor{\relax} +% \end{macrocode} +% \end{macro} +% +% +% +%\subsection{Options} +%\label{sec:impl_opts} +% +% Here we define the option for the commands and their action. +% +% +%\subsubsection{Choice Options} +%\label{sec:impl_choice} +% +% This groups of options sets a key from a given set of choices. +% \begin{macro}{\pst@pdgr@sex} +% First, the sex of the person. The numbers 0, 1 and 2 correspond +% to the sequence in the alternatives list +% \begin{macrocode} +\def\pst@pdgr@sex{0} +\define@choicekey[psset]{pst-pdgr}{sex}[\pst@pdgr@temp \pst@pdgr@sex]{% + unknown,male,female}[unknown]{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@condition} +% Next, the condition of the person. The numbers again correspond +% to the sequence in the alternatives list +% \begin{macrocode} +\def\pst@pdgr@condition{0} +\define@choicekey[psset]{pst-pdgr}{% + condition}[\pst@pdgr@temp \pst@pdgr@condition]{% + normal,obligatory,asymptomatic,affected}[normal]{} +% \end{macrocode} +% \end{macro} +% +% A bunch of shortcuts +% \begin{macrocode} +\define@key[psset]{pst-pdgr}{unknown}[]{\psset{sex=unknown}} +\define@key[psset]{pst-pdgr}{male}[]{\psset{sex=male}} +\define@key[psset]{pst-pdgr}{female}[]{\psset{sex=female}} +\define@key[psset]{pst-pdgr}{normal}[]{\psset{condition=normal}} +\define@key[psset]{pst-pdgr}{obligatory}[]{\psset{condition=obligatory}} +\define@key[psset]{pst-pdgr}{asymptomatic}[]{\psset{condition=asymptomatic}} +\define@key[psset]{pst-pdgr}{affected}[]{\psset{condition=affected}} +% \end{macrocode} +% +% +% +%\subsubsection{Boolean Options} +%\label{sec:impl_bool} +% +% True or false options. +% +% +% \begin{macro}{\pst@pdgr@defineboolkey} +% We use use our own version of definition of boolean keys, rather +% than the one provided by |xkeyval|. +% \begin{macrocode} +\def\pst@pdgr@defineboolkey#1{% +\expandafter\newif\csname ifpst@pdgr@#1\endcsname% +\csname pst@pdgr@#1false\endcsname% +\define@key[psset]{pst-pdgr}{#1}[true]{% + \@nameuse{pst@pdgr@#1##1}}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\ifpst@pdgr@deceased} +% Whether the individual is deceased: +% \begin{macrocode} +\pst@pdgr@defineboolkey{deceased} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpst@pdgr@proband} +% Whether the individual is a proband: +% \begin{macrocode} +\pst@pdgr@defineboolkey{proband} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpst@pdgr@adopted} +% Whether the individual is adopted: +% \begin{macrocode} +\pst@pdgr@defineboolkey{adopted} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpst@pdgr@evaluated} +% Whether the individual is evaluated: +% \begin{macrocode} +\pst@pdgr@defineboolkey{evaluated} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpst@pdgr@sab} +% Whether the abortion is SAB: +% \begin{macrocode} +\pst@pdgr@defineboolkey{sab} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpst@pdgr@infertile} +% Whether the individual or relationship is infertile: +% \begin{macrocode} +\pst@pdgr@defineboolkey{infertile} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpst@pdgr@broken} +% Whether the relationship is broken: +% \begin{macrocode} +\pst@pdgr@defineboolkey{broken} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpst@pdgr@consanguinic} +% Whether the relationship is consanguinic: +% \begin{macrocode} +\pst@pdgr@defineboolkey{consanguinic} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpst@pdgr@monozygotic} +% Whether the twins are monozygotic: +% \begin{macrocode} +\pst@pdgr@defineboolkey{monozygotic} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpst@pdgr@qzygotic} +% Whether the are questionably monozygotic: +% \begin{macrocode} +\pst@pdgr@defineboolkey{qzygotic} +% \end{macrocode} +% \end{macro} +% +% +% +% +%\subsubsection{String Options} +%\label{sec:impl_string} +% +% Options setting up strings. +% +% +% \begin{macro}{\pst@pdgr@insidetext} +% Text inside the symbol +% \begin{macrocode} +\def\pst@pdgr@insidetext{}% +\define@key[psset]{pst-pdgr}{insidetext}{% + \def\pst@pdgr@insidetext{#1}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@belowtext} +% Text below the symbol +% \begin{macrocode} +\def\pst@pdgr@belowtext{}% +\define@key[psset]{pst-pdgr}{belowtext}{% + \def\pst@pdgr@belowtext{#1}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@abovetext} +% Text above the symbol +% \begin{macrocode} +\def\pst@pdgr@abovetext{}% +\define@key[psset]{pst-pdgr}{abovetext}{% + \def\pst@pdgr@abovetext{#1}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@lefttext} +% Text to the left of the symbol +% \begin{macrocode} +\def\pst@pdgr@lefttext{}% +\define@key[psset]{pst-pdgr}{lefttext}{% + \def\pst@pdgr@lefttext{#1}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@righttext} +% Text to the right of the symbol +% \begin{macrocode} +\def\pst@pdgr@righttext{}% +\define@key[psset]{pst-pdgr}{righttext}{% + \def\pst@pdgr@righttext{#1}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@descentnode} +% Name of the descent node +% \begin{macrocode} +\def\pst@pdgr@descentnode{}% +\define@key[psset]{pst-pdgr}{descentnode}{% + \def\pst@pdgr@descentnode{#1}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@rellinecmd} +% Command to draw relationship lines: +% \begin{macrocode} +\def\pst@pdgr@rellinecmd{\ncline}% +\define@key[psset]{pst-pdgr}{rellinecmd}{% + \def\pst@pdgr@rellinecmd{\@nameuse{#1}}}% +% \end{macrocode} +% \end{macro} +% +% A number of text positioning commands. +% \begin{macro}{\pst@pdgr@abovetextrp} +% The command to set the reference position for the text above the +% symbol. +% \begin{macrocode} +\def\pst@pdgr@abovetextrp{lB}% +\define@key[psset]{pst-pdgr}{abovetextrp}{% + \def\pst@pdgr@abovetextrp{#1}}% +% \end{macrocode} +% \changes{v0.2}{2006/04/18}{Added the command} +% \end{macro} +% \begin{macro}{\pst@pdgr@belowtextrp} +% The command to set the reference position for the text below the +% symbol. +% \begin{macrocode} +\def\pst@pdgr@belowtextrp{lt}% +\define@key[psset]{pst-pdgr}{belowtextrp}{% + \def\pst@pdgr@belowtextrp{#1}}% +% \end{macrocode} +% \changes{v0.2}{2006/04/18}{Added the command} +% \end{macro} +% \begin{macro}{\pst@pdgr@lefttextrp} +% The command to set the reference position for the text to the left +% of the symbol. +% \begin{macrocode} +\def\pst@pdgr@lefttextrp{r}% +\define@key[psset]{pst-pdgr}{lefttextrp}{% + \def\pst@pdgr@lefttextrp{#1}}% +% \end{macrocode} +% \changes{v0.2}{2006/04/18}{Added the command} +% \end{macro} +% \begin{macro}{\pst@pdgr@righttextrp} +% The command to set the reference position for the text to the right +% of the symbol. +% \begin{macrocode} +\def\pst@pdgr@righttextrp{l}% +\define@key[psset]{pst-pdgr}{righttextrp}{% + \def\pst@pdgr@righttextrp{#1}}% +% \end{macrocode} +% \changes{v0.2}{2006/04/18}{Added the command} +% \end{macro} +% +% The option |addtwin| for |\pstTwin| command is special. Since it +% can be repeated, we want it to be executed immediately. We store +% the name of the descentnode in |\pst@pdgr@tempnode| +% \begin{macrocode} +\define@key[psset]{pst-pdgr}{addtwin}{\ncline{\pst@pdgr@tempnode}{#1}}% +\define@key[psset]{pst-pdgr}{descentnode}{% + \def\pst@pdgr@descentnode{#1}}% +% \end{macrocode} +% +% +% +%\subsubsection{Numerical Options} +%\label{sec:impl_opts_num} +% +% The options to set up numerical values. +% +% \begin{macro}{\pst@pdgr@descentnodepos} +% The position of the descent node on the relationship line +% \begin{macrocode} +\def\pst@pdgr@descentnodepos{0.5} +\define@key[psset]{pst-pdgr}{descentnodepos}{% + \pst@checknum{#1}\pst@pdgr@descentnodepos% + \ifdim\pst@pdgr@descentnodepos \p@<\z@ + \def\pst@pdgr@descentnodepos{0.5}% + \@pstrickserr{Bad `descentnodepos' value: `#1'. Must be >0}\@ehpa% + \fi}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@brokenpos} +% The position of the broken line symbol on the relationship line +% \begin{macrocode} +\def\pst@pdgr@brokenpos{0.3} +\define@key[psset]{pst-pdgr}{brokenpos}{% + \pst@checknum{#1}\pst@pdgr@brokenpos% + \ifdim\pst@pdgr@brokenpos \p@<\z@ + \def\pst@pdgr@brokenpos{0.3}% + \@pstrickserr{Bad `brokenpos' value: `#1'. Must be >0}\@ehpa% + \fi}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pst@pdgr@mzlinepos} +% The position of the monozygotic line or question mark on the twins +% line: +% \begin{macrocode} +\def\pst@pdgr@mzlinepos{0.5} +\define@key[psset]{pst-pdgr}{mzlinepos}{% + \pst@checknum{#1}\pst@pdgr@mzlinepos% + \ifdim\pst@pdgr@mzlinepos \p@<\z@% + \def\pst@pdgr@mzlinepos{0.5}% + \@pstrickserr{Bad `mzlinepos' value: `#1'. Must be >0}\@ehpa% + \fi% + \ifdim\pst@pdgr@mzlinepos \p@>\p@\relax% + \def\pst@pdgr@mzlinepos{0.5}% + \@pstrickserr{Bad `mzlinepos' value: `#1'. Must be <1}\@ehpa% + \fi}% +% \end{macrocode} +% \end{macro} +% +% +% +% +%\subsection{Drawing A Person} +%\label{sec:impl_pstPerson} +% +% And now the main macro. +% +% \begin{macro}{\pstPerson} +% First, the standard processing of optional parameter +% \begin{macrocode} +\def\pstPerson{\@ifnextchar[{\pstPerson@i}{\pstPerson@i[]}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pstPerson@i} +% And now we are ready for a real work. Actually we create a +% |rnode| and put everything inside. We add a |\pspicture| for the +% node to have non-zero size. +% \begin{macrocode} +\def\pstPerson@i[#1]#2{% + \rnode{#2}{% + \psset{arrows=-, linestyle=solid}% + \psset{#1}% + \pspicture[shift=-0.25](-0.25,-0.25)(0.25,0.25)% +% \end{macrocode} +% Condition processing. +% \begin{macrocode} + \ifcase\pst@pdgr@condition\relax % Nothing to do if normal + \or % obligatory + \psdot(0,0)% + \or % asymptomatic + \qline(0,0.25)(0,-0.25)% + \or % affected + \expandafter\psset\expandafter{\affectedstyle}% + \def\pst@pdgr@instxtcolor{\csname\affectedfgcolor\endcsname}% + \fi% +% \end{macrocode} +% The actual drawing +% \begin{macrocode} + \ifcase\pst@pdgr@sex\relax % First, unknown sex. A diamond + \pspolygon(0,0.25)(0.25,0)(0,-0.25)(-0.25,0)% + \or % Male. A square with side 0.5 + \pspolygon(-0.25,-0.25)(-0.25,0.25)(0.25,0.25)(0.25,-0.25)% + \or % Female. A circle with radius 0.25 + \pscircle{0.25}% + \fi% +% \end{macrocode} +% Necessary for next +% \begin{macrocode} + \psset{fillstyle=none}% +% \end{macrocode} +% +% Deceased or not? +% \begin{macrocode} + \ifpst@pdgr@deceased% + \qline(-0.33,-0.33)(0.33,0.33)% + \fi% +% \end{macrocode} +% Proband or not? +% \begin{macrocode} + \ifpst@pdgr@proband% + \psline[arrows=->](-0.55,-0.55)(-0.29,-0.29)% + \fi% +% \end{macrocode} +% Adopted or not? +% \begin{macrocode} + \ifpst@pdgr@adopted% + \psline(-0.25,-0.35)(-0.35,-0.35)(-0.35,0.35)(-0.25,0.35)% + \psline(0.25,-0.35)(0.35,-0.35)(0.35,0.35)(0.25,0.35)% + \fi% +% \end{macrocode} +% \changes{v0.2}{2006/04/18}{Slightly increased brackets for the ``adopted'' +% symbol} +% Evaluated or not? +% \begin{macrocode} + \ifpst@pdgr@evaluated% + \rput(0.4,-0.4){$\ast$}% + \fi% +% \end{macrocode} +% +% Now a bunch of text putting commands +% \begin{macrocode} + \ifx\pst@pdgr@abovetext\@empty\relax\else% + \rput[\pst@pdgr@abovetextrp](0,0.4){% + \kern2\pslinewidth\pst@pdgr@abovetext\kern2\pslinewidth}% + \fi% + \ifx\pst@pdgr@belowtext\@empty\relax\else% + \rput[\pst@pdgr@belowtextrp](0,-0.4){% + \kern2\pslinewidth\pst@pdgr@belowtext\kern2\pslinewidth}% + \fi% + \ifx\pst@pdgr@righttext\@empty\relax\else% + \rput[\pst@pdgr@righttextrp](0.4,0){\pst@pdgr@righttext}% + \fi% + \ifx\pst@pdgr@lefttext\@empty\relax\else% + \rput[\pst@pdgr@lefttextrp](-0.4,0){\pst@pdgr@lefttext}% + \fi% +% \end{macrocode} +% Inside text is a bit more difficult since we want to be able to +% do reverse video if necessary +% \begin{macrocode} + \ifx\pst@pdgr@insidetext\@empty\relax\else% + \rput(0,0){\pst@pdgr@instxtcolor\pst@pdgr@insidetext}% + \fi% + \endpspicture% +}}% +% \end{macrocode} +% \changes{v0.2}{2006/04/18}{Changed text positioning} +% \end{macro} +% +% +%\subsection{Drawing A Terminated Pregnancy} +%\label{sec:impl_pstAbortion} +% +% \begin{macro}{\pstAbortion} +% First, the standard processing of optional parameter +% \begin{macrocode} +\def\pstAbortion{\@ifnextchar[{\pstAbortion@i}{\pstAbortion@i[]}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pstAbortion@i} +% And the actual macro: +% \begin{macrocode} +\def\pstAbortion@i[#1]#2{% + \rnode{#2}{% + \psset{arrows=-, linestyle=solid}% + \psset{#1}% +% \end{macrocode} +% +% The standard~\cite{PedigreeNomenclature95} requires the lines for +% the terminated pregnancies to be shorter than for the normal ones. +% A way to do this is to make the node \emph{higher}: +% \begin{macrocode} + \pspicture[shift=-0.25](-0.25,-0.25)(0.25,0.5)% +% \end{macrocode} +% +% +% Condition processing: +% \begin{macrocode} + \ifcase\pst@pdgr@condition\relax % Nothing to do if normal + \or \relax % Nothing to do if obligatory + \or \relax % Nothing to do if asymptomatic + \or % affected + \expandafter\psset\expandafter{\affectedstyle}% + \fi% +% \end{macrocode} +% +% If this is a terminated pregnancy, we use the same symbol as for +% |deceased|: +% \begin{macrocode} + \ifpst@pdgr@sab\relax\else% + \qline(-0.25,0.1)(0.25,0.6)% + \fi% +% \end{macrocode} +% +% The actual drawing +% \begin{macrocode} + \pspolygon(-0.25,0.25)(0,0.5)(0.25,0.25) +% \end{macrocode} +% +% And text putting commands +% \begin{macrocode} + \ifx\pst@pdgr@abovetext\@empty\relax\else% + \rput[\pst@pdgr@abovetextrp](0,0.65){% + \kern2\pslinewidth\pst@pdgr@abovetext\kern2\pslinewidth}% + \fi% + \ifx\pst@pdgr@belowtext\@empty\relax\else% + \rput[\pst@pdgr@belowtextrp](0,0.1){% + \kern2\pslinewidth\pst@pdgr@belowtext\kern2\pslinewidth}% + \fi% + \ifx\pst@pdgr@righttext\@empty\relax\else% + \rput[\pst@pdgr@righttextrp](0.4,0.35){\pst@pdgr@righttext}% + \fi% + \ifx\pst@pdgr@lefttext\@empty\relax\else% + \rput[\pst@pdgr@lefttextrp](-0.4,0.35){\pst@pdgr@lefttext}% + \fi% + \endpspicture% +}}% +% \end{macrocode} +% \changes{v0.2}{2006/04/18}{Changed text positioning} +% \end{macro} +% +% +%\subsection{Drawing A Childlessness Symbol} +%\label{sec:impl_childless} +% +% \begin{macro}{\pstChildless} +% Again, the standard processing of optional parameter +% \begin{macrocode} +\def\pstChildless{\@ifnextchar[{\pstChildless@i}{\pstChildless@i[]}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pstChildless@i} +% And the actual macro: +% \begin{macrocode} +\def\pstChildless@i[#1]#2{% + \rnode{#2}{% + \psset{arrows=-, linestyle=solid}% + \psset{#1}% +% \end{macrocode} +% The actual drawing depends on the |infertile| option. If it is +% true, we want a double line (an non-zero height). Otherwise this is +% a single line with zero height: +% \begin{macrocode} + \ifpst@pdgr@infertile % double line + \pspicture[shift=-0.05](-0.2,-0.05)(0.2,0.05)% + \qline(-0.2,-0.05)(0.2,-0.05)% + \qline(-0.2,0.05)(0.2,0.05)% + \endpspicture% + \else % single line + \qline(-0.2,0)(0.2,0)% + \fi% +% \end{macrocode} +% And the text below the symbol: +% \begin{macrocode} + \ifx\pst@pdgr@belowtext\@empty\relax\else% + \rput[t](0,-0.2){\pst@pdgr@belowtext}% + \fi% +}}% +% \end{macrocode} +% +% \end{macro} +% +%\subsection{Drawing A Relationship Line} +%\label{sec:impl_pstRelationship} +% +% \begin{macro}{\pstRelationship} +% The |\pstRelationship| command can have both optional and +% non-optional parameters: +% \begin{macrocode} +\def\pstRelationship{\@ifnextchar[{% + \pstRelationship@i}{\pstRelationship@i[]}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pstRelationship@i} +% The actual macro: +% \begin{macrocode} +\def\pstRelationship@i[#1]#2#3{% + \begingroup% + \psset{arrows=-, linestyle=solid, nodesep=0.7\pslinewidth}% + \psset{#1}% +% \end{macrocode} +% A consanguinic relationship is shown by a double line: +% \begin{macrocode} + \ifpst@pdgr@consanguinic% + \psset{doubleline=true}% + \else% + \psset{doubleline=false}% + \fi% +% \end{macrocode} +% The actual drawing +% \begin{macrocode} + \pst@pdgr@rellinecmd{#2}{#3}% +% \end{macrocode} +% The broken relationships are shown using //: +% \begin{macrocode} + \ifpst@pdgr@broken% + \lput(\pst@pdgr@brokenpos){/\kern-0.7ex/}% + \fi% +% \end{macrocode} +% And the descent node +% \begin{macrocode} + \ifx\pst@pdgr@descentnode\@empty\relax% + \else% + \lput(\pst@pdgr@descentnodepos){\pnode{\pst@pdgr@descentnode}}% + \fi% + \endgroup% +}% +% \end{macrocode} +% +% \end{macro} +% +%\subsection{Drawing a Descent Line} +%\label{sec:impl_pstDescent} +% +% \begin{macro}{\pstDescent} +% The standard option processing command: +% \begin{macrocode} +\def\pstDescent{\@ifnextchar[{\pstDescent@i}{\pstDescent@i[]}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pstDescent@i} +% The actual macro. Note the ``reverse'' direction of the line: +% this is because for |\ncangle| only |armB| is constant, and we +% want the sib line to be straight +% \begin{macrocode} +\def\pstDescent@i[#1]#2#3{% + \begingroup% + \psset{arrows=-, linestyle=solid, angleA=90, % + angleB=-90}% + \psset{#1}% + \ncangle{#3}{#2}% + \endgroup}% +% \end{macrocode} +% \end{macro} +% +% +% +%\subsection{Drawing Twins} +%\label{sec:impl_pstTwins} +% +% \begin{macro}{\pstTwins} +% The standard option processing command: +% \begin{macrocode} +\def\pstTwins{\@ifnextchar[{\pstTwins@i}{\pstTwins@i[]}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pstTwins@i} +% The actual macro. Note that we need to keep the twin node in +% |\pst@pdgr@tempnode| to correctly process |addtwin|. +% \begin{macrocode} +\def\pstTwins@i[#1]#2#3#4#5{% + \begingroup% + \def\pst@pdgr@tempnode{#3} + \psset{arrows=-, linestyle=solid, angleA=90, % + angleB=-90}% + \psset{#1}% +% \end{macrocode} +% The descent line from the parent to the twin node +% \begin{macrocode} + \pstDescent{#2}{#3}% +% \end{macrocode} +% And the twin lines and nodes +% \begin{macrocode} + \ncline{#3}{#4}% + \lput(\pst@pdgr@mzlinepos){\pnode{pst@pdgr@tempnodeA}}% + \ncline{#3}{#5}% + \lput(\pst@pdgr@mzlinepos){\pnode{pst@pdgr@tempnodeB}}% +% \end{macrocode} +% The monozygotic or qzygotic line +% \begin{macrocode} + \ifpst@pdgr@monozygotic% + \ncline{pst@pdgr@tempnodeA}{pst@pdgr@tempnodeB}% + \else% + \ifpst@pdgr@qzygotic% + \ncline[linestyle=none]{pst@pdgr@tempnodeA}{pst@pdgr@tempnodeB}% + \lput(0.5){?}% + \fi% + \fi% + \endgroup}% +% \end{macrocode} +% +% +% \end{macro} +% +% +%\subsection{Tree Making Commands} +%\label{sec:impl_trees} +% +% \begin{macro}{\pst@pdgr@makeTcommand} +% The general macro to create a tree command from the normal command +% \begin{macrocode} +\def\pst@pdgr@makeTcommand#1{% + \@namedef{T#1}{% + \@ifnextchar[{\@nameuse{T#1@i}}{\@nameuse{T#1@i}[]}}% + \@namedef{T#1@i}[##1]##2{% + \Tr{\@nameuse{#1@i}[##1]{##2}}}}% +% \end{macrocode} +% \end{macro} +% +% And the macros +% \begin{macro}{\TpstPerson} +% Drawing a person +% \begin{macrocode} +\pst@pdgr@makeTcommand{pstPerson}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\TpstAbortion} +% Drawing an abortion +% \begin{macrocode} +\pst@pdgr@makeTcommand{pstAbortion}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\TpstChildless} +% Drawing a childlessness symbol +% \begin{macrocode} +\pst@pdgr@makeTcommand{pstChildless}% +% \end{macrocode} +% \end{macro} +% +%\subsection{Finishing Touch} +%\label{sec:finish} +% +% +% \begin{macrocode} +% +% \end{macrocode} +%\Finale +%\clearpage +% +%\iffalse\bibliography{genetics,neurology,tex}\fi +%\bibliography{pst-pdgr} +%\bibliographystyle{plain} +% +%\PrintChanges +%\clearpage +%\PrintIndex +% +\endinput diff --git a/texmf/tex/latex/pst-pdgr/pst-pdgr.ins b/texmf/tex/latex/pst-pdgr/pst-pdgr.ins new file mode 100644 index 0000000..544dcde --- /dev/null +++ b/texmf/tex/latex/pst-pdgr/pst-pdgr.ins @@ -0,0 +1,48 @@ +% +% Doctrip file for pst-pedigree +% This file is in public domain +% $Id: pst-pdgr.ins,v 1.6 2006/04/19 20:30:09 boris Exp $ +% +\def\batchfile{pst-pdgr.ins} +\input docstrip +\keepsilent +\showprogress + +\declarepreamble\cfg + +You are allowed and encouraged to modify THIS file. + +Good luck + +\endpreamble + +% This should be deleted in the final version +\askforoverwritefalse + +\generate{% + \file{pst-pdgr.tex}{\from{pst-pdgr.dtx}{tex}} + \file{pst-pdgr.sty}{\from{pst-pdgr.dtx}{latex}} + \usepreamble\empty\usepreamble\cfg\file{pst-pdgr.cfg}{\from{pst-pdgr.dtx}{cfg}}} + +\obeyspaces +\Msg{*********************************************************}% +\Msg{* Congratulations! You successfully generated the *}% +\Msg{* pst-pdgr package. *}% +\Msg{* *}% +\Msg{* Please move the files pst-pdgr.sty & pst-pdgr.cfg to *}% +\Msg{* the place where LaTeX files are kept in your system; *}% +\Msg{* e. g. /usr/share/texmf/tex/latex/pst-pdgr/. Please *}% +\Msg{* move the file pst-pdgr.tex to the place where generic *}% +\Msg{* TeX files are kept in your system, for example *}% +\Msg{* /usr/share/texmf/tex/generic/pstricks/pst-pdgr/. *}% +\Msg{* *}% +\Msg{* You may customize your settings by changing the file *}% +\Msg{* pst-pdgr.cfg. *}% +\Msg{* *}% +\Msg{* The documentation is in the file pst-pdgr.pdf. You *}% +\Msg{* may use the provided Makefile to re-typeset it. *}% +\Msg{* *}% +\Msg{* The package is released under LPPL *}% +\Msg{* *}% +\Msg{* Happy TeXing! *}% +\Msg{*********************************************************}% \ No newline at end of file -- 2.39.5