diff --git a/doc/tools/PamhyrDoc.cls b/doc/tools/PamhyrDoc.cls index 3e50140f6013813da3199ec0e7ef2e5ed30b43cb..9c617f8f1f7f2a247be7d0533d411ee323090bb2 100644 --- a/doc/tools/PamhyrDoc.cls +++ b/doc/tools/PamhyrDoc.cls @@ -100,13 +100,34 @@ } } + +%% +%% Texttt +%% + +\usepackage[htt]{hyphenat} % Make texttt split at end of line + %% %% Verbatim %% \AtBeginEnvironment{verbatim}{\footnotesize} +%% Add box arrond of verbatim +\BeforeBeginEnvironment{verbatim}{\begin{tcolorbox}[boxsep=0pt, left=0.1cm, right=0.1cm, arc=0pt, boxrule=0.5pt, colback=white]}% +\AfterEndEnvironment{verbatim}{\end{tcolorbox}}% + +\makeatletter +\AtBeginEnvironment{verbatim}{\dontdofcolorbox} + +\def\dontdofcolorbox{\renewcommand\fcolorbox[4][]{##4}} +\makeatother + +%% %% Source code blocks +%% + +%% Use minted \usepackage{minted} \usemintedstyle{emacs} \setminted[c]{fontsize=\footnotesize,encoding=utf8,linenos} @@ -118,6 +139,7 @@ \setminted[text]{breaklines,fontsize=\footnotesize,encoding=utf8} \setminted[llvm]{breaklines,fontsize=\footnotesize,encoding=utf8} +%% Add box arrond of minted \BeforeBeginEnvironment{minted}{\begin{tcolorbox}[boxsep=0pt, left=0.1cm, right=0.1cm, arc=0pt, boxrule=0.5pt, colback=white]}% \AfterEndEnvironment{minted}{\end{tcolorbox}}% @@ -126,12 +148,3 @@ \def\dontdofcolorbox{\renewcommand\fcolorbox[4][]{##4}} \makeatother - -\BeforeBeginEnvironment{verbatim}{\begin{tcolorbox}[boxsep=0pt, left=0.1cm, right=0.1cm, arc=0pt, boxrule=0.5pt, colback=white]}% -\AfterEndEnvironment{verbatim}{\end{tcolorbox}}% - -\makeatletter -\AtBeginEnvironment{verbatim}{\dontdofcolorbox} - -\def\dontdofcolorbox{\renewcommand\fcolorbox[4][]{##4}} -\makeatother