I am new to LaTeX. Recently I have taken it up to do some math note taking on my laptop. I have found a template which seems quite useful for this. Nonetheless, after some time spent doing the set up, there seems to be a problem with constant overfulls in certain parts of my text.
This template I am using includes some custom sections like \thm for theorems or \prop for propositions. However, whenever I use \ex or \rmkb for examples and remarks respectively, I always run across overfull hbox. It seems like those are not set up for breaking lines, somehow? I have had no problems with other parts but rather just these two. Could you help me figure out how can I modify them in order to avoid this problem? Below you can find the code where it is defined (sorry for my major lack of knowledge in LaTeX terminology, I have just discovered it a few days ago and I am still learning a lot).
% Remark
\NewDocumentCommand{\rmk}{+m}{
{\it \color{blue!50!white}#1}
}
\newenvironment{remark}{
\par
\vspace{5pt}
\begin{minipage}{\textwidth}
{\par\noindent{\textbf{Observación.}}}
\tcolorbox[blanker,breakable,left=5mm,
before skip=10pt,after skip=10pt,
borderline west={1mm}{0pt}{cyan!10!white}]
}{
\endtcolorbox
\end{minipage}
\vspace{5pt}
}
\NewDocumentCommand{\rmkb}{+m}{
\begin{remark}
#1
\end{remark}
}
Similarly here is how \ex is defined,
% Example
\newenvironment{example}{%
\par
\vspace{5pt}
\begin{minipage}{\textwidth}
\noindent\textbf{Example.}
\tcolorbox[blanker,breakable,left=5mm,parbox=false,
before upper={\parindent15pt},
after skip=10pt,
borderline west={1mm}{0pt}{cyan!10!white}]
}{%
\endtcolorbox
\end{minipage}
\vspace{5pt}
}
\NewDocumentCommand{\ex}{+m}{
\begin{example}
#1
\end{example}
}
Any help is greatly appreciated! Thank you.
Edit. Here is an image that represents what my problem is.
Another example. This seems to happen consistently with all 'Remark' boxes.
\noindent
needs to precede the remark, i.e., before theminipage
. Unless you have set\parindent=0pt
, there will be an indent applied before anything that shifts into horizontal mode, likeminipage
.