diff --git a/src/preamble/packages/minted.tex b/src/preamble/packages/minted.tex index ded4458568b3c702bf9885698fbb591f79b30b46..e0dc01c1932fda977fbb1dad127816d52f6570ac 100644 --- a/src/preamble/packages/minted.tex +++ b/src/preamble/packages/minted.tex @@ -1,23 +1,19 @@ %! Author = lorenzo -%! Date = 13/02/22 +%! Date = 13/08/22 -% from http://tex.stackexchange.com/questions/57151/how-do-i-prevent-conflicts-between-accsupp-and-hyperref +% some fix from https://tex.stackexchange.com/questions/83204/how-can-i-make-source-code-included-with-minted-copyable \usepackage{accsupp} -\newcommand\emptyaccsupp[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}} +\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} +\setminted{linenos,breaklines,bgcolor=bg,breakanywheresymbolpre={},breakaftersymbolpre={},breakbeforesymbolpre={},autogobble,breaksymbolleft = \emptyaccsupp{\tiny\ensuremath{\hookrightarrow}}} \setmintedinline{bgcolor={}} -\renewcommand{\theFancyVerbLine}{% - \textcolor[rgb]{0.5,0.5,1.0}{% - \scriptsize - \emptyaccsupp{% - \arabic{FancyVerbLine}% - }% - }% -} +\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