Skip to content
Snippets Groups Projects
Commit d5ac48ea authored by Lorenzo Ferron's avatar Lorenzo Ferron
Browse files

Migliorato supporto a minted.

parent ab327116
No related branches found
No related tags found
No related merge requests found
%! 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment