-
Notifications
You must be signed in to change notification settings - Fork 1
/
macros.tex
65 lines (60 loc) · 1.11 KB
/
macros.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
%%% two column signature.
\def\myadvisorsig#1{%
\vbox{\hsize=6cm
\textbf{#1}\\
\addvspace{2cm}%
\hbox to \hsize{%
\strut\hfil%
\myadvisorname%
\hfil%
}
\hrule\kern1ex
\hbox to \hsize{%
\strut\hfil%
NIP\hspace{1ex}\myadvisorid%
\hfil%
}
}
}
%%% one column signature.
\def\mysignature#1#2#3{%
\vbox{
\textbf{#1}\\
\addvspace{2cm}%
\hbox to \hsize{%
\strut\hfil%
{#2}%
\hfil%
}
\makebox[6cm][c]{
\hrulefill
}
\hbox to \hsize{%
\strut\hfil%
NIP\hspace{1ex}{#3}%
\hfil%
}
}
}
%%% source code listing
\newcommand{\includecodego}[2][c]{
\lstinputlisting[caption=#2,escapechar=,style=go]
{/home/ms/go/work/src/github.com/shuLhan/#2}
}
%%% data listing
\newcommand{\includedata}[2][c]{
\lstinputlisting[caption=#2,style=data,linerange={1-10}]
{/home/ms/go/work/src/github.com/shuLhan/#2}
}
%% Caption for algorithm
\DeclareCaptionFormat{algor}{%
\hrulefill
\par
\offinterlineskip
\vskip1pt
\textbf{#1#2}#3
\offinterlineskip
\hrulefill
}
\DeclareCaptionStyle{algori}{singlelinecheck=off,format=algor,labelsep=space}
\captionsetup[algorithm]{style=algori}