-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.tex
More file actions
67 lines (60 loc) · 1.63 KB
/
Copy pathcode.tex
File metadata and controls
67 lines (60 loc) · 1.63 KB
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
%% This tex file reads files.lst and generates the pdf from the files listed
%% in there, don't run this directly instead run the Makefile
\documentclass{article}
\usepackage[landscape,twocolumn,nomarginpar,height=7in,width=10in,top=1in,bottom=0.5in,columnsep=0.5in,headsep=.1in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{listings}
\usepackage{caption}
\usepackage{color}
\usepackage{pdfpages}
\usepackage{tikz}
\usepackage{amsmath}
\pagestyle{fancy}
\lhead[University of Wisconsin - Madison]{University of Wisconsin - Madison}
\rhead[\thepage]{\thepage}
\lfoot[]{}
\cfoot[]{}
\rfoot[]{}
\def\cleanws#1 {#1}
\def\stripslash#1#2\ssend{#2}
\def\makesane[#1]{\expandafter\expandafter\expandafter\stripslash\expandafter\string\csname#1\endcsname\ssend}
\lstloadlanguages{[GNU]C++,Java}
\lstset{
basicstyle=\fontsize{7pt}{8.1pt}\ttfamily,
keywordstyle=\color{blue}\bfseries,
language=[GNU]C++,
columns=fixed,
numbers=left,numberstyle=\tiny,
linewidth=5in,
breaklines=true,
basewidth={0.6em,0.45em},
frame=lines,
}
\renewcommand\listfigurename{Entries}
\begin{document}
\lstlistoflistings
\newread\fstream
\openin\fstream=files.lst
\loop
\def\test{a}
\ifeof\fstream
\def\test{\relax}
\fi
\if a\test
\read\fstream to \fname
\if\fname\par
\relax
\else
\edef\fname{\expandafter\cleanws\fname}
\edef\fname{\makesane[\fname]}
\edef\fname{\noexpand\detokenize{\fname}}
\lstinputlisting[caption={[\noexpand\noexpand\noexpand\detokenize{\fname}]},title={\fname},name=\fname]{\fname}
\fi
\repeat
\newpage
\input{cheatsheet_improved.tex}
\onecolumn
%{\center \includegraphics[angle=270,scale=.82]{geom_cheatsheet.pdf}}
\end{document}