-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.tex
More file actions
104 lines (87 loc) · 2.33 KB
/
template.tex
File metadata and controls
104 lines (87 loc) · 2.33 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
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
97
98
99
100
101
102
103
104
% set page size
\documentclass[a4paper]{article}
% use fontspec package for selecting a font with Unicode symbols
\usepackage{fontspec}
\setmainfont{DejaVu Sans}
% use geometry package to set margins
\usepackage[margin=2cm]{geometry}
% use soul package for strike-through
\usepackage{soul}
% use xcolor package for section backgrounds
\usepackage{xcolor}
% use titlesec package for custom sections
\usepackage{titlesec}
% use hyperref for URLs
\usepackage[hidelinks]{hyperref}
% do not indent paragraphs
\setlength{\parindent}{0pt}
% do not show page numbers
\pagestyle{empty}
% customize sections: white font on black background
\titleformat{name=\section}[block]
{\sffamily\bfseries\large}
{}
{0pt}
{\colorsection}
\titlespacing*{\section}{0pt}{\baselineskip}{\baselineskip}
\newcommand{\colorsection}[1]{%
\colorbox{black}{\parbox{\dimexpr\textwidth-2\fboxsep}{\color{white}\ #1}}}
% create environment for extra spacing
\newdimen\origiwspc
\newdimen\origiwstr
\newenvironment{fontspace}[2]
{\par
\origiwspc=\fontdimen2\font
\origiwstr=\fontdimen3\font
\fontdimen2\font=#1\origiwspc
\fontdimen3\font=#2\origiwstr
}
{\par
\fontdimen2\font=\origiwspc
\fontdimen3\font=\origiwstr
}
% define partial mark
\newcommand*{\partialMark}{☯}
% define complete mark
\newcommand*{\completeMark}{☠}
% display previous episodes with strike-through
\newcommand*{\previous}[1]{\st{#1}}
\begin{document}
<! for section in sections !>
<! if section.name !>
\section*{<< section.name >>}
<! endif !>
<! for queue in section.queues !>
\begin{minipage}{1.0\textwidth}
<! if queue.url !>
\href{<< queue.url >>}{\bfseries <<queue.name>>}\hfill
<! else !>
\textbf{<< queue.name >>}\hfill
<! endif !>
<< queue.date >><! if queue.tag_partial !> \partialMark<! endif !><! if queue.tag_complete !> \completeMark<! endif !>\\
\vspace{-1em}
\hrule
\vspace{0.2em}
\begin{fontspace}{1.5}{2}
<! if queue.prev_item !>
<! if queue.prev_item.url !>
\href{<< queue.prev_item.url >>}{\previous{<< queue.previtem.name >>}}
<! else !>
\previous{<< queue.prev_item.name >>}
<! endif !>
<! else !>
<! for item in queue.next_items !>
<! if item.url !>
\href{<< item.url >>}{<< item.name >>}
<! else !>
<< item.name >>
<! endif !>
<! if queue.tag_split !>\\<! endif !>
<! endfor !>
<! endif !>
\end{fontspace}
\end{minipage}
\vspace{2em}
<! endfor !>
<! endfor !>
\end{document}