summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tex-overview/tex-overview-aux.tex
diff options
context:
space:
mode:
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.tex106
1 files changed, 90 insertions, 16 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 f13cd90e28a..9af03281d34 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,4 +1,4 @@
-%% This document is part of the document tex-overview. It contains the formatting and definitions for typesetting. Please do *not* consider anything here as an example of good TeX coding style. It is not.
+%% This document is part of the document tex-overview. It contains the formatting and definitions for typesetting. Please do *not* consider anything here as an example of good TeX coding style – it's not.
%% author: Arno Trautmann
% !TeX root = tex-overview.tex
@@ -7,15 +7,21 @@
\usepackage[svgnames]{xcolor}
\usepackage{
+ array,
bookmark,
+ booktabs,
cooltooltips,
+ colortbl,
dtklogos, %% for \NTS etc. ⇒  what about metalogo?
fontspec,
geometry,
hyperref,
+ longtable,
+ luacode,
multicol,
microtype,
pdftexcmds,
+ tabu,
tikz,
xparse
}
@@ -69,10 +75,12 @@
\tl_set:Nn\histdistro{purple}
%% 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}
+\fp_new:N\layer_num
+\fp_new:N\layerdist_num
+\fp_set:Nn\layer_num{0}
+\fp_set:Nn\layerdist_num{-1}
+
+\cs_new:Npn\layer{\fp_use:N\layer_num}
%% width of the tooltip-boxes (negative value to make them disappear at all)
\dim_set:Nn\fboxrule{-1mm}
@@ -90,7 +98,7 @@
\cs_gset:Nn\addtotextviews:f{\tl_gput_right:No\to_textviews{#1}}
%% environment to set the graphs
-\NewDocumentCommand\tograph{sD(){}+m}
+\NewDocumentCommand\tograph{s+D(){}+m}
{
\IfBooleanT{#1}{
\ExplSyntaxNamesOn
@@ -162,10 +170,10 @@
%% a nice way to control the vertical position of nodes
\NewDocumentCommand{\setlayer}{m}{
- \fp_set:Nn\layer{#1}
+ \fp_set:Nn\layer_num{#1}
}
-\NewDocumentCommand{\steplayer}{O{\layerdist}}{
- \fp_add:Nn\layer{#1}
+\NewDocumentCommand{\steplayer}{O{\layerdist_num}}{
+ \fp_add:Nn\layer_num{#1}
}
\NewDocumentCommand\topart{m}{
@@ -203,6 +211,13 @@
\cs_gset_eq:NN\tonodestyle#4
}
+%% the sectioning of the names table
+\NewDocumentCommand\totablesec{m}{
+~ \\[-2ex]
+ \rowcolor[gray]{0.9}\hspace*{2em}\Large \strut \large\rmfamily #1 \\
+ ~ \\[-2ex]
+}
+
%% a command for creation of bib-items.
\NewDocumentCommand\tobibsection{m}{
\subsection*{#1}
@@ -211,9 +226,10 @@
\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}
+ \medskip
+\begin{minipage}{\textwidth} %% to prevent page breaks within bib-items
+ \large #1\normalsize\\ \hspace*{1em} \parbox{.95\textwidth}
+{\url{#2} #3}
\end{minipage}
}
@@ -222,11 +238,69 @@
\AtBeginDocument{
{
\centering
- \huge\bfseries An overview of \TeX, its children\\ and their friends~\dots\par
+ \huge\bfseries An overview of \TeX, its children\\
+ and their friends~\dots
+ \vspace*{-.2cm}
\flushright\parbox{4cm}{
- \Large \color[rgb]{.4 0 0} Arno Trautmann\\ \fontsize{9.85}{10}\selectfont arno.trautmann@gmx.de
+ \large \color[rgb]{.4 0 0} Arno Trautmann\\
+ \fontsize{8.25}{10}\selectfont arno.trautmann@gmx.de
}
- \hspace*{2cm}\par
+ \hspace*{.7cm}\par
}
\vspace*{1cm}
-} \ No newline at end of file
+}
+
+%% ok, now something just for fun, but I wanted to use this in a "real life" document:
+% we first define some Lua functions for drawing and then use them to colorize the corners of the document.
+\begin{luacode}
+function pdf_print (...)
+ for _, str in ipairs({...}) do
+ pdf.print(str .. " ")
+ end
+ pdf.print("\string\n")
+end
+
+function move (p)
+ pdf_print(p[1],p[2],"m")
+end
+
+function line (p)
+ pdf_print(p[1],p[2],"l")
+end
+
+function curve(p1,p2,p3)
+ pdf_print(p1[1], p1[2],
+ p2[1], p2[2],
+ p3[1], p3[2], "c")
+end
+
+function linewidth (w)
+ pdf_print(w,"w")
+end
+
+function disturb_point(point,strength)
+ if strength then else strength = 5 end
+ return {point[1] + math.random()*2*strength - strength,
+ point[2] + math.random()*2*strength - strength}
+end
+
+function sloppyline(start,stop)
+ local start_line = disturb_point(start,10)
+ local stop_line = disturb_point(stop,10)
+ move(start) curve(start_line,stop_line,stop)
+ pdf_print("S") -- stroke
+end
+\end{luacode}
+
+\AtBeginShipout{%
+ \AtBeginShipoutUpperLeft{%
+ \color[rgb]{.6 0 0}
+ \luatexlatelua{
+ linewidth(40)
+ sloppyline({-30,-30},{30,30})
+ sloppyline({620,-30},{560,30})
+ sloppyline({-30,-800},{30,-860})
+ sloppyline({620,-800},{560,-860})
+ }
+ }%
+}