diff options
author | Karl Berry <karl@freefriends.org> | 2010-11-04 17:50:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-11-04 17:50:22 +0000 |
commit | 0d5d57c86ee7cff21b2bb96d34606564353c973c (patch) | |
tree | bb5678300c7939a76597983919d936460d12b9f6 /Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex | |
parent | 986ef687106ef0f32cac4ab33f0af366bbee72dd (diff) |
tex-overview (3nov10)
git-svn-id: svn://tug.org/texlive/trunk@20305 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 | 198 |
1 files changed, 153 insertions, 45 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 index 903489fc6fa..e9c63bb3997 100644 --- a/Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex +++ b/Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex @@ -1,3 +1,6 @@ +%% This document is part of the package tex-overview and is only useable with the main file tex-overview.tex. +%% author: Arno Trautmann + % !TeX root = tex-overview.tex %% (for the TeXworks-users.) @@ -13,17 +16,20 @@ xcolor, xparse } - %% circumventing a bug in cooltooltips \makeatletter \let\topdfescapestring\pdf@escapestring -% \let\toanywherehook\@empty -% \def\toAtEndDocument{\g@addto@macro\toanywherehook} \makeatother +\ExplSyntaxNamesOn + + +%% define the look-and-feel of the document \setmainfont{TeX Gyre Pagella} \setsansfont{TeX Gyre Pagella} + +%% setup the style of hyperlinks. \hypersetup{ colorlinks=true, linkcolor=blue, @@ -31,14 +37,12 @@ pdfborder=0 0 0 %% don’t like these boxes } -\date{\today} +%% page layout, headings \pagestyle{empty} - -%% use LaTeX3 syntax from here on: -\ExplSyntaxNamesOn - -\tl_set:Nn\settextviews{} -\cs_set:Nn\addtotextviews:n{\tl_gput_right:Nn\settextviews{#1}} +\addtokomafont{disposition}{\color[rgb]{.4 0 0}} +\addtokomafont{section}{\Huge} +\addtokomafont{subsection}{\LARGE} +\addtokomafont{subsubsection}{\Large} %% some missing definitions for \TeX-like things \tl_set:Nn\XeT{X\kern -.1667em\lower .5ex\hbox {E}\kern -.125emT\@} @@ -48,6 +52,7 @@ \tl_set:Nn\vip{red} \tl_set:Nn\normalimportant{blue} \tl_set:Nn\experimental{yellow} +\tl_set:Nn\fonttechnology{pink} \tl_set:Nn\program{black} \tl_set:Nn\package{green} \tl_set:Nn\distro{orange} @@ -62,8 +67,37 @@ \dim_set:Nn\fboxrule{-1mm} %% to separate important from not-so-important nodes -\bool_new:N\short -\bool_gset_true:N\short +\bool_new:N\to_short + +%% the token list to save all the textviews. When set once, it is reset. May be useful anyhow +\tl_set:Nn\to_textviews{} +\NewDocumentCommand\settextviews{}{ + \to_textviews + \tl_set:Nn\to_textviews{} +} +\cs_gset:Nn\addtotextviews:f{\tl_gput_right:No\to_textviews{#1}} + +%% environment to set the graphs +\NewDocumentCommand\tograph{sD(){}+m} +{ + \IfBooleanT{#1}{ + \ExplSyntaxNamesOn + \bool_gset_true:N\to_short + \ExplSyntaxNamesOff + #2 + \begin{tikzpicture} + #3 + \end{tikzpicture} + \clearpage + } + \ExplSyntaxNamesOn + \bool_gset_false:N\to_short + \ExplSyntaxNamesOff + #2 + \begin{tikzpicture} + #3 + \end{tikzpicture} +} %% Style of the nodes: shade from a light \tikzstyle{coolnode} = [ @@ -81,8 +115,8 @@ \tl_set:No\tonodecontent{\topdfescapestring{#4}} %% test if we are in the short or full view - \gdef\nodecolor{#1} - \bool_if:NTF\short{ + \tl_gset:Nn\nodecolor{#1} + \bool_if:NTF\to_short{ %% short view \tl_if_eq:NNT#1{\vip}{ %% then check if this is an important node \node[coolnode] @@ -96,7 +130,7 @@ \cooltooltip{#2}{\tonodecontent}{\tonodecontent}{}{#5\strut} }; %% and the text view, to be added only once! - \addtotextviews:n{\subsubsection*{\color{blue}#5}\parbox{\textwidth}{#4}} + \addtotextviews:f{\subsubsection*{\color{blue}#5}\parbox{\columnwidth}{#4}} } } @@ -108,26 +142,13 @@ %% 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 in the case that: either a * is given (always draw) or (' is given and \to_short) or nothing is given + \bool_if:nT{#1 || (#2 && \to_short) || !(#2 || \to_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} -} - +%% a nice way to control the vertical position of nodes \NewDocumentCommand{\setlayer}{m}{ \fp_set:Nn\layer{#1} } @@ -135,25 +156,112 @@ \fp_add:Nn\layer{#1} } -\addtokomafont{section}{\LARGE} -\addtokomafont{subsection}{\large} +\NewDocumentCommand\topart{m}{ + \clearpage + \dim_set:Nn\pdfpagewidth{9cm} %% make a smaller paper so the header won’t feel so alone on the big, cold paper + \dim_set:Nn\pdfpageheight{4cm} + \newgeometry{margin=1cm} + \part{#1} + \newpage + \restoregeometry + \dim_set:Nn\pdfpagewidth{21cm} %% back to a4 + \dim_set:Nn\pdfpageheight{29.7cm} +} +%% the following code is made to avoid code doubling on cost of readability. It is more an experiment of mine. This code is neither stable nor exemplary … +%% the first argument, given in (), determines the level of the d +\NewDocumentCommand\tostruct{D(){0}omO{\tonodestyle}}{ + \tl_set:Nn\to_disp{section} + \int_compare:nT{#1 > 0}{\tl_put_left:Nn\to_disp{sub}} + \int_compare:nT{#1 > 1}{\tl_put_left:Nn\to_disp{sub}} + \bool_if:NTF\to_short + { + \int_compare:nT{#1 = 0}{\stepcounter{section}} + \tl_gset:cn{\to_disp mand}{\cs:w the\to_disp\cs_end:.\hspace{.175em} #3\newline short view} + \IfNoValueTF{#2}{\tl_gset:cn{\to_disp opt}{\tl_use:c{\to_disp mand}}}{\tl_gset:cn{\to_disp opt}{#2, short view}} + \cs:w \to_disp \cs_end:*{\cs:w\to_disp mand\cs_end:} + \int_compare:nT{#1 = 0}{\addtocounter{section}{-1}} + } + { + \tl_gset:cn{\to_disp mand}{#3} + \IfNoValueTF{#2}{\tl_gset:cn{\to_disp opt}{\cs:w \to_disp mand\cs_end:}}{\tl_gset:cn{\to_disp opt}{#2}} + \addtotextviews:f{\cs:w \to_disp\cs_end:[#2]{#3}} + \cs:w \to_disp\cs_end:[\cs:w \to_disp opt\cs_end:]{\cs:w \to_disp mand\cs_end:} + } + \cs_gset_eq:NN\tonodestyle#4 +} -\NewDocumentCommand{\overviewsection}{omO{\tonodestyle}}{ - \clearpage +\NewDocumentCommand\overviewsection{omO{\tonodestyle}}{ + \bool_if:NTF\to_short + { + \stepcounter{section} + \tl_gset:Nn\to_mandsect{\thesection.\hspace{.2em} #2\newline short view} + \IfNoValueTF{#1}{\tl_gset:Nn\to_optsect{\to_mandsect}}{\tl_gset:Nn\to_optsect{#1, short view}} + \section*{\to_mandsect} + \addtocounter{section}{-1} + } + { + \tl_gset:Nn\to_mandsect{#2} + \IfNoValueTF{#1}{\tl_gset:Nn\to_optsect{\to_mandsect}}{\tl_gset:Nn\to_optsect{#1}} + \addtotextviews:f{\section[#1]{#2}} + \section[\to_optsect]{\to_mandsect} + } \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}}{ + \tl_set:Nn\to_mandsubsect{#2} + \bool_if:NTF\to_short + { + \IfNoValueTF{#1}{\tl_set:Nn\to_optsubsect{\to_mandsubsect}}{\tl_set:Nn\to_optsubsect{#1, short view}} + \subsection*{\to_mandsubsect} + } + { + \IfNoValueTF{#1}{\tl_set:Nn\to_optsubsect{\to_mandsubsect}}{\tl_set:Nn\to_optsubsect{#1}} + \addtotextviews:f{\subsection[#1]{#2}} %% there should be \to_opt[]sec in the first arg, but I’m too dumb to get it right + \subsection[\to_optsubsect]{\to_mandsubsect} + } + \cs_gset_eq:NN\tonodestyle#3 +} + +\NewDocumentCommand{\overviewsubsubsection}{omO{\tonodestyle}}{ + \tl_set:Nn\to_mandsubsubsect{#2} + \bool_if:NTF\to_short + { + \IfNoValueTF{#1}{\tl_set:Nn\to_optsubsubsect{\to_mandsubsubsect}}{\tl_set:Nn\to_optsubsubsect{#1, short view}} + } + { + \IfNoValueTF{#1}{\tl_set:Nn\to_optsubsubsect{\to_mandsubsubsect}}{\tl_set:Nn\to_optsubsubsect{#1}} + \addtotextviews:f{\subsubsection[#1]{#2}} %% there should be \to_opt[]sec in the first arg, but I’m too dumb to get it right + } + + \subsubsection[\to_optsubsubsect]{\to_mandsubsubsect} \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 +%% 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 + \large #1\normalsize\\ \hspace*{1em} \parbox{\textwidth-1.5em}{\url{#2} #3} +\end{minipage} +} + +\ExplSyntaxNamesOff + +\AtBeginDocument{ + { + \centering + \huge\bfseries An overview of \TeX, its children\\ and their friends~\dots\par + \flushright\parbox{4cm}{ + \Large \color[rgb]{.4 0 0} Arno Trautmann\\ \fontsize{9.85}{10}\selectfont arno.trautmann@gmx.de} + \hspace*{2cm}\par + } + \vspace*{1cm} +}
\ No newline at end of file |