-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheatsheet.sty
More file actions
59 lines (50 loc) · 1.56 KB
/
cheatsheet.sty
File metadata and controls
59 lines (50 loc) · 1.56 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
% vim: autowrite
\ProvidesPackage{cheatsheet}
\usepackage[margin=0pt]{geometry} % Page margins and orientation
\usepackage{hanging}
\usepackage{environ}
\setlength{\unitlength}{1mm} % Set the length that numerical units are measured in
\setlength{\parindent}{0pt} % Stop paragraph indentation
% Custom command for subsection titles
\newcommand{\sectiontitle}[1]{\paragraph{#1} \ \\}
% Custom command for adding a shortcut
\newcommand{\cmdleft}[1]{#1} % renew to customize
\newcommand{\cmdright}[1]{#1} % renew to customize
\newcommand{\command}[2]{\cmdleft{#1}~\dotfill{}~\cmdright{#2}\\}
\newenvironment{cheatsheet}[1]{
\begin{picture}(297,210) % Create a container for the page content
\put(10,200){% Position on the page to put the title
\begin{minipage}[t]{210mm} % The size and alignment of the title
\section*{#1} % Title
\end{minipage}
}
}{
\end{picture} % End the container for the entire page
}
\NewEnviron{col1}{%
\put(10,180){% Divide the page
\begin{minipage}[t]{85mm} % Create a box to house text
\BODY
\end{minipage} % End the first column of text
} % End the first division of the page
}
\NewEnviron{col2}{%
\put(105,180){% Divide the page
\begin{minipage}[t]{85mm} % Create a box to house text
\BODY
\end{minipage} % End the second column of text
} % End the second division of the page
}
\NewEnviron{col3}{%
\put(200,180){% Divide the page
\begin{minipage}[t]{85mm} % Create a box to house tex
\BODY
\end{minipage} % End the third column of text
} % End the third division of the page
}
\newenvironment{cheatnote}[1]{
\begin{hangparas}{1em}{1}
#1
}{
\end{hangparas}
}