You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

38 lines
1.2 KiB

  1. % language
  2. \usepackage[english,german]{babel}
  3. \usepackage{iflang}
  4. \babeltags{de = german}
  5. \newcommand{\ifger}[2]{\IfLanguageName{german}{#1}{#2}}
  6. % color definition
  7. \definecolor{solarized}{HTML}{002B36}
  8. \definecolor{mygreen}{HTML}{009900}
  9. \definecolor{myblue}{HTML}{0000FF}
  10. \definecolor{mygrey}{rgb}{0.95,0.95,0.95}
  11. % minted
  12. %% fix the minted@colorbg environment
  13. \makeatletter
  14. \renewenvironment{minted@colorbg}[1]
  15. {\def\minted@bgcol{#1}%
  16. \noindent
  17. \begin{lrbox}{\minted@bgbox}
  18. \begin{minipage}{\linewidth-2\fboxsep}}
  19. {\end{minipage}%
  20. \end{lrbox}%
  21. \setlength{\topsep}{\smallskipamount}% set the vertical space
  22. \trivlist\item\relax % ensure going to a new line
  23. \colorbox{\minted@bgcol}{\usebox{\minted@bgbox}}%
  24. \endtrivlist % close the trivlist
  25. }
  26. \makeatother
  27. \usemintedstyle{friendly}
  28. \newminted{haskell}{bgcolor=mygrey,frame=single,numbers=left}
  29. \newminted{cpp}{bgcolor=mygrey,frame=single,numbers=left}
  30. \newminted{c}{bgcolor=mygrey,frame=single,numbers=left}
  31. \newcommand{\hinline}[1]{\mintinline{haskell}{#1}}
  32. \newcommand{\cinline}[1]{\mintinline{c}{#1}}
  33. \newcommand{\cppinline}[1]{\mintinline{cpp}{#1}}
  34. \renewcommand{\theFancyVerbLine}{\ttfamily
  35. \textcolor[rgb]{0.0,0.0,0.0}{\footnotesize
  36. \oldstylenums{\arabic{FancyVerbLine}}}}