-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhead.tex
96 lines (77 loc) · 2.35 KB
/
head.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[\MODE]{beamer}
\usepackage{listings}
\usepackage{pstricks, pst-node}
\usepackage{xifthen}
\mode<presentation>{
\definecolor{accentcolor}{rgb}{0.94, 0.31, 0.22}
\definecolor{codecolor}{rgb}{0.95, 0.95, 0.95}
\setbeamercolor{synopsiscolor}{fg=accentcolor, bg=codecolor}
}
\mode<handout>{
\definecolor{accentcolor}{rgb}{0, 0, 0}
\definecolor{codecolor}{rgb}{1, 1, 1}
\setbeamercolor{synopsiscolor}{fg=black, bg=white}
}
\setbeamercolor{item}{fg=accentcolor}
\setbeamercolor*{frametitle}{fg=accentcolor}
\setbeamertemplate{navigation symbols}{}
\newcommand{\code}[1]{\colorbox{codecolor}{\lstinline{#1}}}
\lstset{
language=,
columns=fullflexible,
basicstyle=\sffamily,
showstringspaces=false,
backgroundcolor=\color{codecolor},
escapechar=\%,
}
% enable to remove psgrid output
%\let\psgrid\relax
\psset{xunit=1cm, yunit=1cm, gridlabels=6pt, gridcolor=gray, griddots=10, subgriddiv=1, gridlabelcolor=gray}
% FIXME: should define set of standard colours to use with pstricks illustrations
% FIXME: should define macro to center and open pspicture environment
\newcommand{\pipe}{$|$}
\newcommand{\debugpsgrid}{}
%\newcommand{\debugpsgrid}{\psgrid}
\newrgbcolor{gitdefault}{0.89 0.43 0.20}
\newrgbcolor{gitshaded}{0.6 0.6 0.6}
% [display-name]{x}{y}{name}
\newcommand{\gitcommit}[4][]{%
\ifthenelse{\isempty{#1}}{%
\cnode[fillstyle=solid, fillcolor=gitdefault](#2, #3){0.3}{#4}%
\rput(#2, #3){#4}
}{%
\cnode[fillstyle=solid, fillcolor=gitdefault](#2, #3){0.3}{#4}%
\rput(#2, #3){#1}
}
}
% [display-name]{x}{y}{name}
\newcommand{\gitcommitshaded}[4][]{%
\ifthenelse{\isempty{#1}}{%
\cnode[linecolor=gitshaded](#2, #3){0.3}{#4}%
\rput(#2, #3){{\gitshaded #4}}
}{%
\cnode[linecolor=gitshaded](#2, #3){0.3}{#4}%
\rput(#2, #3){{\gitshaded #1}}
}
}
\newcommand{\gitparent}[2]{%
\ncline{->}{#1}{#2}
}
\newcommand{\gitparentshaded}[2]{%
\ncline[linecolor=gitshaded]{->}{#1}{#2}
}
\newcommand{\gitbranch}[2]{%
\ncarc[arcangle=16]{->}{#1}{#2}
}
\newcommand{\gitbranchshaded}[2]{%
\ncarc[arcangle=16, linecolor=gitshaded]{->}{#1}{#2}
}
\newcommand{\gittag}[4]{%
\rput(#1, #2){\rnode{tag#3}{\psframebox{#3}}}%
\ncline[nodesep=0.4mm]{tag#3}{#4}
}
\newcommand{\gittagshaded}[4]{%
\rput(#1, #2){\rnode{tagshaded#3}{\psframebox[linecolor=gitshaded]{{\gitshaded #3}}}}%
\ncline[nodesep=0.4mm, linecolor=gitshaded]{tagshaded#3}{#4}
}
\begin{document}