diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-qtree/README | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-qtree/test.pdf | bin | 6035 -> 0 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-qtree/test.tex | 45 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.pdf | bin | 128672 -> 128106 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.tex | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-qtree/pgfsubpic.tex | 39 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-qtree/pgftree.tex | 44 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-qtree/tikz-qtree.tex | 18 |
8 files changed, 77 insertions, 88 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-qtree/README b/Master/texmf-dist/doc/latex/tikz-qtree/README index ac07f36ac05..6950707eb89 100644 --- a/Master/texmf-dist/doc/latex/tikz-qtree/README +++ b/Master/texmf-dist/doc/latex/tikz-qtree/README @@ -1,6 +1,6 @@ tikz-qtree David Chiang <chiang at isi dot edu> -Version 1.1 (Christmas 2009) +Version 1.11 (Christmas 2010) This package provides a macro for drawing trees with TikZ using the easy syntax of Alexis Dimitriadis' Qtree. It improves on TikZ's @@ -13,6 +13,9 @@ Please see tikztree-manual.pdf for instructions and examples. Version history: +1.11 (2010/12/25): + - options don't break options for standard TikZ trees + 1.1 (2009/12/25): - much deeper trees can be typeset without exceeding capacity - sideways trees diff --git a/Master/texmf-dist/doc/latex/tikz-qtree/test.pdf b/Master/texmf-dist/doc/latex/tikz-qtree/test.pdf Binary files differdeleted file mode 100644 index ca86b5ba74e..00000000000 --- a/Master/texmf-dist/doc/latex/tikz-qtree/test.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/tikz-qtree/test.tex b/Master/texmf-dist/doc/latex/tikz-qtree/test.tex deleted file mode 100644 index 77220a844db..00000000000 --- a/Master/texmf-dist/doc/latex/tikz-qtree/test.tex +++ /dev/null @@ -1,45 +0,0 @@ -\documentclass{article} - -\usepackage{tikz,tikz-qtree} -\usepackage{pgf,pgfsubpic} - -\begin{document} - -\fbox{% -\begin{pgfpicture} -\pgfnode{rectangle}{center}{Hello}{hellonode}{\pgfusepath{stroke}} -\begin{pgfsubpicture} -\pgfpathcircle{\pgfpointorigin}{4pt}\pgfusepath{stroke} -\pgfnode{rectangle}{center}{there}{therenode}{\pgfusepath{stroke}} -\end{pgfsubpicture} -\pgftransformshift{\pgfpoint{1in}{-1in}} -\pgftransformscale{2} -\pgftransformrotate{45} -\pgfpathcircle{\pgfpointorigin}{2pt}\pgfusepath{fill} -\pgfplacesubpicture - -\pgfmoveto{\pgfpointanchor{hellonode}{south}} -\pgflineto{\pgfpointanchor{therenode}{north}} -\pgfusepath{stroke} - -\end{pgfpicture}% -} - -\begin{tikzpicture} -\begin{pgfscope} -\begin{pgfsubpicture} -\draw (-1in,0)--(2in,0)--(2in,2in)--(0,2in)--cycle; -\end{pgfsubpicture} -\pgffitsubpicture{\pgfpointorigin}{\pgfpoint{1in}{1in}} -\pgfplacesubpicture -\end{pgfscope} - -\draw (0,0)--(1in,0)--(1in,1in)--(0,1in)--cycle; - - -\end{tikzpicture} - - - - -\end{document} diff --git a/Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.pdf b/Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.pdf Binary files differindex 9d4d073d0bc..a8381bd46e0 100644 --- a/Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.pdf +++ b/Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.pdf diff --git a/Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.tex b/Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.tex index 88f91b7d2eb..7a0432bc577 100644 --- a/Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.tex +++ b/Master/texmf-dist/doc/latex/tikz-qtree/tikz-qtree-manual.tex @@ -1,12 +1,24 @@ \documentclass{article} \usepackage{xltxtra,fontspec} + +\iffalse \setmainfont[Mapping=tex-text]{DejaVu Serif} \setmonofont[Scale=0.95]{DejaVu Sans Mono} \newfontfamily\verbfont[Scale=0.8]{DejaVu Sans Mono} \newfontfamily\ar[Script=Arabic]{DejaVu Sans} \newfontfamily\ja{VL Gothic} \newfontfamily\javerbfont[Scale=0.85,LetterSpace=5.0]{VL Gothic} +\fi + +\iftrue +\setmainfont[Mapping=tex-text]{DejaVu Serif} +\setmonofont[Scale=0.95]{DejaVu Sans Mono} +\newfontfamily\verbfont[Scale=0.8]{DejaVu Sans Mono} +\newfontfamily\ar[Script=Arabic]{DejaVu Sans} +\newfontfamily\ja{Hiragino Maru Gothic Pro} +\newfontfamily\javerbfont[Scale=0.85,LetterSpace=5.0]{Hiragino Maru Gothic Pro} +\fi \usepackage{tikz} \usepackage{tikz-qtree} @@ -23,7 +35,7 @@ \title{\tikztree: better trees with TikZ} \author{David Chiang} -\date{Version 1.1 (Christmas 2009)} +\date{Version 1.11 (Christmas 2010)} \begin{document} diff --git a/Master/texmf-dist/tex/latex/tikz-qtree/pgfsubpic.tex b/Master/texmf-dist/tex/latex/tikz-qtree/pgfsubpic.tex index 4acd7d57b28..baa35846ff0 100644 --- a/Master/texmf-dist/tex/latex/tikz-qtree/pgfsubpic.tex +++ b/Master/texmf-dist/tex/latex/tikz-qtree/pgfsubpic.tex @@ -22,9 +22,6 @@ % - nodes in subpictures are tracked if the subpicture is placed with arbitrary transforms % - new \pgffitsubpicture macro to transform a subpicture (preserving aspect) to fit in a desired box -% To do: -% - speed up interpictureshift hook by promoting subsubpictures - \newdimen\pgf@subpicminx \newdimen\pgf@subpicminy \newdimen\pgf@subpicmaxx @@ -70,32 +67,54 @@ % saved subpictures are local to the current group \def\pgfsavesubpicture#1{% -\expandafter\setbox\csname pgf@subpic@hbox@#1\endcsname\copy\pgf@hbox +\expandafter\setbox\csname pgf@subpic@hbox@#1\endcsname\box\pgf@hbox +\csname pgf@subpic@minx@#1\endcsname\pgf@subpicminx +\csname pgf@subpic@miny@#1\endcsname\pgf@subpicminy +\csname pgf@subpic@maxx@#1\endcsname\pgf@subpicmaxx +\csname pgf@subpic@maxy@#1\endcsname\pgf@subpicmaxy +\expandafter\edef\csname pgf@subpic@id@#1\endcsname{\subpictureid}% +} + +% place current subpicture into named subpicture +\def\pgfmergesubpicture#1{% +\begin{pgfsubpicture} +% place current subpicture +\pgfplacesubpicture +% override containing picture +\expandafter\xdef\csname pgf@sh@pi@\subpictureid\endcsname{\csname pgf@subpic@id@#1\endcsname}% +% copy contents of #1 +\pgfrestoresubpicture{#1} +\pgflowlevelobj{\pgftransformshift{\pgfqpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}}{\pgfqbox\pgf@hbox} +\pgfpathrectanglecorners{\pgfqpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}{\pgfqpoint{\the\pgf@subpicmaxx}{\the\pgf@subpicmaxy}}% +\pgfusepath{use as bounding box}% +% +\end{pgfsubpicture} +\expandafter\setbox\csname pgf@subpic@hbox@#1\endcsname\box\pgf@hbox \csname pgf@subpic@minx@#1\endcsname\pgf@subpicminx \csname pgf@subpic@miny@#1\endcsname\pgf@subpicminy \csname pgf@subpic@maxx@#1\endcsname\pgf@subpicmaxx \csname pgf@subpic@maxy@#1\endcsname\pgf@subpicmaxy -\expandafter\edef\csname pgf@subpic@id@#1\endcsname{\subpictureid} +% but don't save the new picture id, keep the existing one } \def\pgfrestoresubpicture#1{% -\edef\act{\global\noexpand\setbox\pgf@hbox\noexpand\copy\csname pgf@subpic@hbox@#1\endcsname}\act +\edef\act{\global\noexpand\setbox\pgf@hbox\noexpand\box\csname pgf@subpic@hbox@#1\endcsname}\act \expandafter\global\expandafter\pgf@subpicminx\csname pgf@subpic@minx@#1\endcsname \expandafter\global\expandafter\pgf@subpicminy\csname pgf@subpic@miny@#1\endcsname \expandafter\global\expandafter\pgf@subpicmaxx\csname pgf@subpic@maxx@#1\endcsname \expandafter\global\expandafter\pgf@subpicmaxy\csname pgf@subpic@maxy@#1\endcsname -\xdef\subpictureid{\csname pgf@subpic@id@#1\endcsname} +\xdef\subpictureid{\csname pgf@subpic@id@#1\endcsname}% } % Place a previously-created subpicture, lining up its origin with the current origin \def\pgfplacesubpicture{ \pgfscope % expand current bounding box to accommodate subpicture -\pgfpathrectanglecorners{\pgfpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}{\pgfpoint{\the\pgf@subpicmaxx}{\the\pgf@subpicmaxy}}% +\pgfpathrectanglecorners{\pgfqpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}{\pgfqpoint{\the\pgf@subpicmaxx}{\the\pgf@subpicmaxy}}% \pgfusepath{use as bounding box}% % % make the subpicture a node in the containing picture -\expandafter\gdef\csname pgf@sh@ns@\subpictureid\endcsname{rectangle} +\expandafter\gdef\csname pgf@sh@ns@\subpictureid\endcsname{rectangle}% \expandafter\xdef\csname pgf@sh@np@\subpictureid\endcsname{% \noexpand\def\noexpand\southwest{\noexpand\pgfqpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}% \noexpand\def\noexpand\northeast{\noexpand\pgfqpoint{\the\pgf@subpicmaxx}{\the\pgf@subpicmaxy}}% @@ -105,7 +124,7 @@ \expandafter\xdef\csname pgf@sh@pi@\subpictureid\endcsname{\pgfpictureid}% % % align origin of subpicture with origin -\pgftransformshift{\pgfpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}% +\pgftransformshift{\pgfqpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}% \pgfqboxsynced{\pgf@hbox}% \endpgfscope } diff --git a/Master/texmf-dist/tex/latex/tikz-qtree/pgftree.tex b/Master/texmf-dist/tex/latex/tikz-qtree/pgftree.tex index a3fca8b0b48..8173ed13cb8 100644 --- a/Master/texmf-dist/tex/latex/tikz-qtree/pgftree.tex +++ b/Master/texmf-dist/tex/latex/tikz-qtree/pgftree.tex @@ -87,7 +87,7 @@ \def\pgftree#1{% \def\nodename{r}% -#1 +#1% \pgfplacesubpicture } @@ -100,7 +100,6 @@ % Token 2n in the sequence draws the nth subtree. Its root must be named \nodename. \pgfnewsubpicture{children} -\pgfnewsubpicture{child} \newdimen\pgftree@lastchildx \newdimen\pgftree@lastchildy @@ -109,30 +108,26 @@ \pgftree@savechildx=\pgftree@childx \pgftree@savechildy=\pgftree@childy \pgftree@savechildi=\pgftree@childi -% Build subpicture with all the children and their subtrees. Save it in "children" +% Build subpicture with all the children and their subtrees {\pgftree@childx=0pt% \pgftree@childy=0pt% \pgftree@childi=0% \process@children #2}% -\ifnum\pgftree@childi>0% \begin{pgfsubpicture}% -% Create root node -#1 +% Create node +#1% +\ifnum\pgftree@childi>0% % Place children % move down \levelsep {\pgftransformshift{\pgftree@levelshift}% % center so that parent is midway between origins of first and last children -\pgftransformshift{\pgfpointscale{-0.5}{\pgfpoint{\the\pgftree@childx}{\the\pgftree@childy}}}% -\pgfplacesubpicture} +\pgftransformshift{\pgfpointscale{-0.5}{\pgfqpoint{\the\pgftree@childx}{\the\pgftree@childy}}}% +\pgfplacesubpicture}% % Draw the edges {\pgftree@childi=0% \process@edges #2}% -\end{pgfsubpicture}% -\else % leaf node -\begin{pgfsubpicture}% -#1 -\end{pgfsubpicture}% \fi +\end{pgfsubpicture}% \global\pgftree@childi=\pgftree@savechildi \global\pgftree@childx=\pgftree@savechildx \global\pgftree@childy=\pgftree@savechildy @@ -144,34 +139,33 @@ \global\pgftree@childx\pgftree@lastchildx \global\pgftree@childy\pgftree@lastchildy \global\pgftree@childi\pgftree@childi +\ifnum\pgftree@childi>0% \pgfrestoresubpicture{children}% pass children back to caller +\fi }% {\@process@children}% } \def\@process@children#1#2{% #1 is the edge, #2 is the child -% Build the current child and save it as "child" +% Build the current child {\edef\nodename{\parentnodename-\the\pgftree@childi}% #2}% -\pgfsavesubpicture{child}% -\begin{pgfsubpicture} -% Place previous children (if any) -\ifnum\pgftree@childi>0% -\pgfrestoresubpicture{children}% -\pgfplacesubpicture -\fi +\begin{pgfsubpicture}% % Place current child -\pgfrestoresubpicture{child}% \ifnum\pgftree@childi>0% the first child is always at 0 \pgftree@presiblingshift \global\advance\pgftree@childx\pgf@x \global\advance\pgftree@childy\pgf@y \fi +{\pgftransformshift{\pgfqpoint{\the\pgftree@childx}{\the\pgftree@childy}}% +\pgfplacesubpicture}% \global\pgftree@lastchildx\pgftree@childx \global\pgftree@lastchildy\pgftree@childy -{\pgftransformshift{\pgfpoint{\the\pgftree@childx}{\the\pgftree@childy}}% -\pgfplacesubpicture}% \pgftree@postsiblingshift \global\advance\pgftree@childx\pgf@x \global\advance\pgftree@childy\pgf@y -\end{pgfsubpicture}% % Save the augmented row of children back into "children" +\end{pgfsubpicture} +\ifnum\pgftree@childi>0% +\pgfmergesubpicture{children} +\else \pgfsavesubpicture{children}% +\fi \advance\pgftree@childi by 1% \process@children } diff --git a/Master/texmf-dist/tex/latex/tikz-qtree/tikz-qtree.tex b/Master/texmf-dist/tex/latex/tikz-qtree/tikz-qtree.tex index 09282e63e09..8e8d09f2c47 100644 --- a/Master/texmf-dist/tex/latex/tikz-qtree/tikz-qtree.tex +++ b/Master/texmf-dist/tex/latex/tikz-qtree/tikz-qtree.tex @@ -1,5 +1,5 @@ % tikz-qtree.tex -% Version 1.1, 25 Dec 2009 +% Version 1.11, 25 Dec 2010 % Copyright (C) 2002, 2009 by David Chiang @@ -17,6 +17,9 @@ % with this program; if not, write to the Free Software Foundation, Inc., % 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +% New in version 1.11: +% - make options compatible with standard tikz trees + % New in version 1.1: % - sideways trees @@ -148,13 +151,16 @@ \def\roof@edge@right#1#2{(#1.east) -- (#2.north west) -- (#2.south west) -- cycle} %%% Options - -\tikzoption{level distance}{\pgfmathsetlength\levelsep{#1}} -\tikzoption{sibling distance}{\pgfmathsetlength\subtreesep{#1}} % different semantics +\pgfkeysgetvalue{/tikz/level distance/.@cmd}{\orig@leveldistance} +\tikzoption{level distance}{\pgfmathsetlength\levelsep{#1}\orig@leveldistance#1\pgfeov} +\pgfkeysgetvalue{/tikz/sibling distance/.@cmd}{\orig@siblingdistance} +\tikzoption{sibling distance}{\pgfmathsetlength\subtreesep{#1}\orig@siblingdistance#1\pgfeov} % different semantics % I don't really like this scheme -\tikzoption{grow}{\csname grow@#1\endcsname} -\tikzoption{grow'}{\csname growprime@#1\endcsname} +\pgfkeysgetvalue{/tikz/grow/.@cmd}{\orig@grow} +\tikzoption{grow}{\csname grow@#1\endcsname\orig@grow#1\pgfeov} +\pgfkeysgetvalue{/tikz/grow'/.@cmd}{\orig@growprime} +\tikzoption{grow'}{\csname growprime@#1\endcsname\orig@growprime#1\pgfeov} \def\grow@up{\def\leveldirection{up}\def\siblingdirection{left}} \def\grow@down{\def\leveldirection{down}\def\siblingdirection{right}} \def\growprime@up{\def\leveldirection{up}\def\siblingdirection{right}} |