% Author: CatInCosmicSpace \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{20-IU8-listing}[2021/03/21 v1.2 Листинги] \RequirePackage{listings} \RequirePackage{xcolor} % http://latexcolor.com/ \definecolor{seashell}{rgb}{1.0, 0.96, 0.93} \lstdefinestyle{IU8}{ frame=single, backgroundcolor=\color{seashell}, commentstyle=\color{blue}, keywordstyle=\color{magenta}, basicstyle=\ttfamily\footnotesize, breakatwhitespace=false, breaklines=true, captionpos=tl, keepspaces=false, showspaces=false, showstringspaces=false, showtabs=false, extendedchars=\true, 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}% }