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
|
% Author: CatInCosmicSpace
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{20-IU8-listing}[2021/03/21 v1.0 Листинги]
\RequirePackage{listings}
\RequirePackage{xcolor}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{IU8}{
% backgroundcolor=\color{backcolour},
% commentstyle=\color{codegreen},
% keywordstyle=\color{magenta},
numberstyle=\tiny\color{black},
% stringstyle=\color{codepurple},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=tl,
xleftmargin=0.5\parindent,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
}
\lstset{style=IU8}
\DeclareCaptionFormat{listing}{#1#2#3}
\captionsetup[lstlisting]{
format=listing,
singlelinecheck=false,
labelsep=endash,
}
\newcommand{\listing}[2][]{%
\lstinputlisting[caption={\texttt{\detokenize{#2}}},#1]{#2}%
}
|