Newer
Older
% some fix from https://tex.stackexchange.com/questions/83204/how-can-i-make-source-code-included-with-minted-copyable
\newcommand\emptyaccsupp[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}} % https://github.com/mozilla/pdf.js/issues/12237
\let\theHFancyVerbLine\theFancyVerbLine% don't apply our patch to hyperref's version
\usepackage[
%chapter, % uncomment if listings to be counted by chapter
]{minted}
\setminted{linenos,breaklines,bgcolor=bg,breakanywheresymbolpre={},breakaftersymbolpre={},breakbeforesymbolpre={},autogobble,breaksymbolleft = \emptyaccsupp{\tiny\ensuremath{\hookrightarrow}}}
\renewcommand{\theFancyVerbLine}{\sffamily
\textcolor[rgb]{0.5,0.5,1.0}{\scriptsize
\emptyaccsupp{\arabic{FancyVerbLine}}}}
%\let\IWANTTHISlisting=\listing % uncomment if you use minted inside listing env. See below.
%\AtBeginDocument{ % uncomment if you use minted inside listing env. See above.
% \let\listing=\IWANTTHISlisting
% \Crefname{listing}{\listingscaption}{Listati}
%}
%\renewcommand{\listingscaption}{Listato} % uncomment if you use minted inside listing env. See above.