-
Notifications
You must be signed in to change notification settings - Fork 3
/
the-collection.tex
96 lines (79 loc) · 3.09 KB
/
the-collection.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[main=english]{babel}
\usepackage[a4paper,left=1.25cm,right=1.25cm,top=2cm,bottom=2cm]{geometry}
\usepackage{multicol,microtype,tocloft}
\usepackage[hidelinks]{hyperref}
\usepackage{image-base}
\setlength{\cftsubsecnumwidth}{2.75em}
\let\pc\%\let\dm\$
\immediate\write18{bash ./collect.sh > \jobname-col.txt}
\makeatletter
\newread\image@file
\newcounter{image@file@linec}
\def\IncludeAllsrcimgFrom#1{
% init:
\def\image@cl{}
\immediate\openin\image@file=#1\relax
\ifeof\image@file\else% exists
\typeout{Parsing #1}
\loop%
\read\image@file to \image@cl \relax
\unless\ifeof\image@file
\stepcounter{image@file@linec}
% \theimage@file@linec:
\typeout{In Line: \theimage@file@linec (\image@cl)}
\ignorespaces\image@parse@line{\image@cl}% ~\\
\repeat
\fi
\immediate\closein\image@file% always close afterwards :D
}
\def\image@parse@line#1{%
\expandafter\ifx\expandafter\\#1\\\else% only if line is not empty:
\expandafter\ifx#1\par\else% only if line is no paragraph
\expandafter\image@parse@@line#1\@nil%
\fi\fi
}
\def\image@cmdinit@char{:}
\def\image@parse@@line#1#2\@nil{%
\def\tmp@a{#1}%
\ifx\image@cmdinit@char\tmp@a \relax% is command
\edef\@tmp{\noexpand\image@parse@@line@folder#2 \noexpand\@nil}\@tmp
\else \edef\@tmp{\noexpand\image@parse@@line@file#1#2 \noexpand\@nil}\@tmp
\fi
}
\def\image@parse@@line@folder#1\@nil{\section{Folder: #1}}
\def\image@parse@@line@file#1 #2\@nil{\showcase{#1}{#2}}
\makeatother
\newcommand{\DefaultBox}[3]{%
\begin{minipage}[t]{.45\linewidth}
\centering\fcolorbox{lightgray}{white}{\resizebox{.91\linewidth}{!}{\input{#1}}}\medskip\\
\emph{\strut#3}
\end{minipage}}
\newcommand{\showcase}[2]{%
\subsection{Graphic: #2}%
% randomize current rndPalette via rndP
\begin{center}
{\UsePalette{GreenWater}\DefaultBox{#1}{#2}{\CurrentPalette{} palette}}
{\UsePalette{BoringElegance}\DefaultBox{#1}{#2}{\CurrentPalette{} palette}}\\[1.5em]
{\rndP\UsePalette{\rndPalette}\DefaultBox{#1}{#2}{\CurrentPalette{} palette (random)}}
{\UsePalette{GrayPrint}\DefaultBox{#1}{#2}{\CurrentPalette{} palette}}
\UsePalette{GreenWater}% reset
\end{center}
The file can be found here: \href{#1}{#1}.
}
\let\oldhref\href
\def\href#1#2{\emph{\oldhref{#1}{#2}}}
\title{Overview of all src-img}
\author{Florian Sihler}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
This document lists all images (tikz-codes) contained in this repository.
All given paths are relative to \texttt{src-img/}. Text written in \href{./src-img/general/devil.tikz}{this font} can by clicked and links to a file. Please note, that all of those links do \textbf{not embed} the file so they will work only if the repository is cloned as well and they are positioned properly (embedding would create an unnecessary large PDF-file\ldots). Colors are defined by the \paletteD{\href{https://github.com/EagleoutIce/color-palettes}{color-palettes}}\,-Package.
\end{abstract}
\tableofcontents
\IncludeAllsrcimgFrom{\jobname-col.txt}
\end{document}