From 77c0dddee3184d9e7a1bda375bda8941cb64ddf3 Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Mon, 18 Sep 2023 14:19:18 +0200
Subject: [PATCH] doc: tools: LaTeX class minor change.

---
 doc/tools/PamhyrDoc.cls | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

diff --git a/doc/tools/PamhyrDoc.cls b/doc/tools/PamhyrDoc.cls
index 3e50140f..9c617f8f 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
-- 
GitLab