Guest User

Untitled

a guest
Jul 21st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. documentclass{article}
  2.  
  3. usepackage[utf8]{inputenc}
  4. usepackage[T1]{fontenc}
  5. usepackage{fancyhdr}
  6. usepackage[spanish]{babel}
  7.  
  8. newcommandopstyle{bfseriescolor{red}}
  9. makeatletter
  10. usepackage{xcolor,textcomp}
  11. usepackage{enumitem}
  12.  
  13. usepackage{textcomp}
  14. usepackage{listings}
  15. usepackage{accsupp}
  16. usepackage{lmodern}
  17.  
  18. definecolor{backcolour}{rgb}{0.95,0.95,0.92}
  19.  
  20. lstset { %
  21. language=C++,
  22. alsoletter=0123456789,
  23. upquote=true,
  24. columns=fullflexible,
  25. keepspaces=true,
  26. backgroundcolor=color{backcolour},
  27. breakatwhitespace=false,
  28. breaklines=true,
  29. captionpos=b,
  30. keepspaces=true,
  31. showspaces=false,
  32. showstringspaces=false,
  33. showtabs=false,
  34. tabsize=2
  35. }
  36.  
  37. lst@AddToHook{OutputOther}{ProcessOther@silmeth}
  38.  
  39. newcommandProcessOther@silmeth
  40. {%
  41. ifnumlst@mode=lst@Pmode% % If we're in `Processing' mode...
  42. deflst@thestyle{opstyle}% % ... redefine the style locally
  43. fi%
  44. }
  45.  
  46. makeatother
  47.  
  48. %========================== Taken from https://tex.stackexchange.com/a/442600/152550
  49. newcommand{noncopynumber}[1]{%
  50. BeginAccSupp{method=escape,ActualText={}}%
  51. #1%
  52. EndAccSupp{}%
  53. }
  54.  
  55. makeatletter %================= Taken from https://tex.stackexchange.com/a/19978/152550
  56. deflst@outputspace{{ifxlst@bkgcoloremptycolor{white}elselst@bkgcolorfilst@visiblespace}}
  57. makeatother
  58.  
  59.  
  60. begin{document}
  61.  
  62. begin{lstlisting}
  63. Example with no tabulation
  64.  
  65. With one tabulation
  66.  
  67. With one space
  68. end{lstlisting}
  69.  
  70. end{document}
Add Comment
Please, Sign In to add comment