Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage[utf8]{inputenc}
- usepackage[T1]{fontenc}
- usepackage{fancyhdr}
- usepackage[spanish]{babel}
- newcommandopstyle{bfseriescolor{red}}
- makeatletter
- usepackage{xcolor,textcomp}
- usepackage{enumitem}
- usepackage{textcomp}
- usepackage{listings}
- usepackage{accsupp}
- usepackage{lmodern}
- definecolor{backcolour}{rgb}{0.95,0.95,0.92}
- lstset { %
- language=C++,
- alsoletter=0123456789,
- upquote=true,
- columns=fullflexible,
- keepspaces=true,
- backgroundcolor=color{backcolour},
- breakatwhitespace=false,
- breaklines=true,
- captionpos=b,
- keepspaces=true,
- showspaces=false,
- showstringspaces=false,
- showtabs=false,
- tabsize=2
- }
- lst@AddToHook{OutputOther}{ProcessOther@silmeth}
- newcommandProcessOther@silmeth
- {%
- ifnumlst@mode=lst@Pmode% % If we're in `Processing' mode...
- deflst@thestyle{opstyle}% % ... redefine the style locally
- fi%
- }
- makeatother
- %========================== Taken from https://tex.stackexchange.com/a/442600/152550
- newcommand{noncopynumber}[1]{%
- BeginAccSupp{method=escape,ActualText={}}%
- #1%
- EndAccSupp{}%
- }
- makeatletter %================= Taken from https://tex.stackexchange.com/a/19978/152550
- deflst@outputspace{{ifxlst@bkgcoloremptycolor{white}elselst@bkgcolorfilst@visiblespace}}
- makeatother
- begin{document}
- begin{lstlisting}
- Example with no tabulation
- With one tabulation
- With one space
- end{lstlisting}
- end{document}
Add Comment
Please, Sign In to add comment