2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

added pstricks family-tree example

This commit is contained in:
Martin Thoma 2013-05-31 09:49:23 +02:00
parent f087df39be
commit 3e03f1097a
3 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,37 @@
SOURCE = family-tree
DELAY = 80
DENSITY = 300
WIDTH = 512
make:
latex $(SOURCE).tex -output-format=pdf
dvips -D600 $(SOURCE).dvi -o $(SOURCE).ps
ps2pdf $(SOURCE).ps $(SOURCE).pdf
make clean
clean:
rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot *.dvi *.ps
gif:
pdfcrop $(SOURCE).pdf
convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
make clean
png:
make
make svg
inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
transparentGif:
convert $(SOURCE).pdf -transparent white result.gif
make clean
svg:
make
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
pdf2svg $(SOURCE).pdf $(SOURCE).svg
# Necessary, as pdf2svg does not always create valid svgs:
inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg
rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg
inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg
rm $(SOURCE)2.svg

View file

@ -0,0 +1,7 @@
Credits
--------
Example from [www.ursoswald.ch](http://www.ursoswald.ch/LaTeXGraphics/pstricks/pstricks.html)
Compiled example
----------------
![Example](3d-cmos-loss-diagram.png)

View file

@ -0,0 +1,18 @@
\documentclass{standalone}
\usepackage{pstricks, pstcol, pst-node, pst-tree}
\renewcommand\psedge{\nccurve}
\newcommand{\Female}[2][]{{\psset{linecolor=lightgray}\TR[#1]{\emph{#2}}}}
\newcommand{\Male}[2][]{{\psset{linecolor=black}\TR[#1]{#2}}}
\psset{nodesep=2pt, angleA=90, angleB=-90}
\begin{document}
\pstree[treemode=U]{\Female{{\bfseries Matilde}}}{%
\pstree{\Male{Sebastian}}{%
\pstree{\Male[name=P]{Philip}}{\Male{Frederick}\Female{Ethel}}
\pstree{\Female[name=W]{Mary}}{\Male{Lionel}\Female{Agnes}}}
\pstree{\Female{Leonor}}{%
\pstree{\Male[name=R]{Ra\'ul}}{\Male{Joaquim}\Female{J\'ulia}}
\pstree{\Female[name=A]{Am\'elia}}{\Male{\'Alvaro}\Female{Augusta}}}}
\psset{doubleline=true, linestyle=dotted}
\ncline{P}{W}\nbput{1940}
\ncline{R}{A}\nbput{1954}
\end{document}