-
Notifications
You must be signed in to change notification settings - Fork 0
/
preamble.sty
44 lines (38 loc) · 863 Bytes
/
preamble.sty
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
\usepackage[utf8]{inputenc}
\usepackage[a4paper,top=2cm,bottom=2cm]{geometry}
\usepackage{parskip}
\usepackage{hyperref}
\usepackage{enumitem}
\usepackage{listings}
\lstset{%
basicstyle=\small\ttfamily,
language=[LaTeX]{TeX},
commentstyle=\small\ttfamily
}
% \usepackage{graphicx}
% \usepackage{lcg}
% \usepackage{xargs}
% \usepackage{float}
% Use \listinline in item description.
% Answer by Martin Scharrer, taken from
% https://tex.stackexchange.com/questions/93944/using-lstinline-inside-a-item
\makeatletter
\let\orig@item\item
\def\item{%
\@ifnextchar{[}%
{\lstinline@item}%
{\orig@item}%
}
\begingroup
\catcode`\]=\active
\gdef\lstinline@item[{%
\setbox0\hbox\bgroup
\catcode`\]=\active
\let]\lstinline@item@end
}
\endgroup
\def\lstinline@item@end{%
\egroup
\orig@item[\usebox0]%
}
\makeatother