diff options
author | Karl Berry <karl@freefriends.org> | 2010-10-24 23:38:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-10-24 23:38:06 +0000 |
commit | 9f51c4bf2ea5f8118fb4bac9c2eaf833ee17bec9 (patch) | |
tree | d6ff942f7e3c5f4b57586fe001b8fe6fc29208b9 /Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex | |
parent | 9e2770a473f440628f782f2af002bb98475d61e1 (diff) |
tex-overview (19oct10)
git-svn-id: svn://tug.org/texlive/trunk@20174 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex b/Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex new file mode 100644 index 00000000000..903489fc6fa --- /dev/null +++ b/Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex @@ -0,0 +1,159 @@ +% !TeX root = tex-overview.tex +%% (for the TeXworks-users.) + +\usepackage{ + bookmark, + cooltooltips, + dtklogos, %% for \NTS etc. + fontspec, + geometry, + hyperref, + pdftexcmds, + tikz, + xcolor, + xparse +} + +%% circumventing a bug in cooltooltips +\makeatletter + \let\topdfescapestring\pdf@escapestring +% \let\toanywherehook\@empty +% \def\toAtEndDocument{\g@addto@macro\toanywherehook} +\makeatother + +\setmainfont{TeX Gyre Pagella} +\setsansfont{TeX Gyre Pagella} + +\hypersetup{ + colorlinks=true, + linkcolor=blue, + urlcolor=blue, + pdfborder=0 0 0 %% don’t like these boxes +} + +\date{\today} +\pagestyle{empty} + +%% use LaTeX3 syntax from here on: +\ExplSyntaxNamesOn + +\tl_set:Nn\settextviews{} +\cs_set:Nn\addtotextviews:n{\tl_gput_right:Nn\settextviews{#1}} + +%% some missing definitions for \TeX-like things +\tl_set:Nn\XeT{X\kern -.1667em\lower .5ex\hbox {E}\kern -.125emT\@} +\tl_set:Nn\ConTeXt{Con\TeX{}t} + +%% constants for the colors. Might change from time to time … +\tl_set:Nn\vip{red} +\tl_set:Nn\normalimportant{blue} +\tl_set:Nn\experimental{yellow} +\tl_set:Nn\program{black} +\tl_set:Nn\package{green} +\tl_set:Nn\distro{orange} + +%% shorthand to keep a good structure of the node positions +\fp_new:N\layer +\fp_new:N\layerdist +\fp_set:Nn\layer{0} +\fp_set:Nn\layerdist{-1} + +%% width of the tooltip-boxes (negative value to make them disappear at all) +\dim_set:Nn\fboxrule{-1mm} + +%% to separate important from not-so-important nodes +\bool_new:N\short +\bool_gset_true:N\short + +%% Style of the nodes: shade from a light +\tikzstyle{coolnode} = [ + draw=\nodecolor!50!black!70, + top color=\nodecolor!10!white!105, + bottom color= \nodecolor!50!black!50 +] + +%% set the first default node style (will change to \distro or \program in the document) +\cs_set_eq:NN\tonodestyle\normalimportant + +%% tonode ⇒ tex-overview node, now with better argument specifier +\NewDocumentCommand\tonode{O{\tonodestyle}D(){no label given}D(){no position given}D<>{no description given}m}{ +%% save the content pdfescaped + \tl_set:No\tonodecontent{\topdfescapestring{#4}} + +%% test if we are in the short or full view + \gdef\nodecolor{#1} + \bool_if:NTF\short{ + %% short view + \tl_if_eq:NNT#1{\vip}{ %% then check if this is an important node + \node[coolnode] + (#2) at (#3) { + \cooltooltip{#2}{\tonodecontent}{\tonodecontent}{}{#5\strut} + }; + } + }{ + %% long view + \node[coolnode] (#2) at (#3) { + \cooltooltip{#2}{\tonodecontent}{\tonodecontent}{}{#5\strut} + }; + %% and the text view, to be added only once! + \addtotextviews:n{\subsubsection*{\color{blue}#5}\parbox{\textwidth}{#4}} + } +} + +%% we want to make use of two pdf layers: the upper (main) one for the nodes +%% and the lower (background) one for the lines. That way, the lines will not cross the nodes +\pgfdeclarelayer{background} +\pgfsetlayers{background,main} + +%% the command to draw from one node to the other one. Fine tuning is possible via optional argument #3 +\NewDocumentCommand{\todraw}{st{'}t{.}t{-}O{}d()d()}{ + \begin{pgfonlayer}{background} + %% draw in the case that: either a * is given (always draw) or (' is given and \short) or nothing is given + \bool_if:nT{#1 || (#2 && \short) || !(#2 || \short)} + {\draw [thick,gray,\IfBooleanT{#3}{dotted},\IfBooleanT{#4}{dashed},#5] (#6) to (#7);} %% I’m just loooving expl3! + \end{pgfonlayer} +} + +%% a command for creation of bib-items. +\NewDocumentCommand\tobibsection{m}{ + \subsection*{#1} +} +\NewDocumentCommand\tobibsubsection{m}{ + \subsection*{#1} +} +\NewDocumentCommand\tobib{mD<>{}O{}}{ + \vspace*{1.5ex} +\begin{minipage}{\textwidth} %% to prevent page breaks + #1\\ \quad \url{#2} #3 +\end{minipage} +} + +\NewDocumentCommand{\setlayer}{m}{ + \fp_set:Nn\layer{#1} +} +\NewDocumentCommand{\steplayer}{O{\layerdist}}{ + \fp_add:Nn\layer{#1} +} + +\addtokomafont{section}{\LARGE} +\addtokomafont{subsection}{\large} + + +\NewDocumentCommand{\overviewsection}{omO{\tonodestyle}}{ + \clearpage + \cs_gset_eq:NN\tonodestyle#3 +%% \dim_set:Nn\pdfpagewidth{9cm} %% make a smaller paper so the header won’t feel so alone on the big, big paper +%% \dim_set:Nn\pdfpageheight{2.5cm} + \IfNoValueTF{#1}{\section{#2}}{\section[#1]{#2}} + \bool_if:NF\short{\addtotextviews:n{\IfNoValueTF{#1}{\section{#2}}{\section[#1]{#2}}}} + +%% \dim_set:Nn\pdfpagewidth{21cm} %% back to a4 +%% \dim_set:Nn\pdfpageheight{29.7cm} +} +\NewDocumentCommand{\overviewsubsection}{omO{\tonodestyle}}{ + \cs_gset_eq:NN\tonodestyle#3 + \IfNoValueTF{#1}{\subsection{#2}}{\subsection[#1]{#2}} + \bool_if:NF\short{\addtotextviews:n{\IfNoValueTF{#1}{\subsection{#2}}{\subsection[#1]{#2}}}} +} + +\ExplSyntaxNamesOff
\ No newline at end of file |