From bf0400429a18f9b3fe35248548ee69c127d1fa2a Mon Sep 17 00:00:00 2001 From: Parsa Mohammadian Date: Sun, 23 Aug 2026 13:06:11 -0400 Subject: [PATCH] Fix underfull hbox in banking subsection dotted rules Add \hss glue to the 0.35em leader slot, matching \dotfill, and \kern0pt so \hfill is not discarded. Fixes #307. Co-authored-by: Cursor --- CHANGELOG | 2 ++ moderncvbodyiii.sty | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7ad5b52..78a5598 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ version next - Upgrade to Fontawesome 7 (#270) +- Fix "Underfull \hbox (badness 10000)" warning in banking \subsection dotted + rules by adding \hss glue as in \dotfill (#307) version 2.6.1 (24 Jun 2026) - Allow the customisation of the contemporary style (#297) diff --git a/moderncvbodyiii.sty b/moderncvbodyiii.sty index 76349ad..ab77f1d 100644 --- a/moderncvbodyiii.sty +++ b/moderncvbodyiii.sty @@ -139,13 +139,13 @@ \newcommand*{\subsectionrule}{} \if@fullrules% \renewcommand*{\sectionrule}{\par\nobreak\vspace*{-.7\baselineskip}\leavevmode{\color{bodyrulecolor}\leaders\hbox{\rule{1pt}{0.4pt}}\hfill\kern0pt}} - \renewcommand*{\subsectionrule}{\par\nobreak\vspace*{-.7\baselineskip}\leavevmode{\color{bodyrulecolor}\xleaders\hbox to 0.35em{\scriptsize.}\hfill}}\fi% different subsectionrules will not be perfectly aligned, but remaining space at the end of the fill will be distributed evenly between leaders, so it will be barely visible} + \renewcommand*{\subsectionrule}{\par\nobreak\vspace*{-.7\baselineskip}\leavevmode{\color{bodyrulecolor}\xleaders\hbox to 0.35em{\hss\scriptsize.\hss}\hfill\kern0pt}}\fi% different subsectionrules will not be perfectly aligned, but remaining space at the end of the fill will be distributed evenly between leaders, so it will be barely visible} \if@shortrules% \renewcommand*{\sectionrule}{\leavevmode{\color{bodyrulecolor}\leaders\hbox{\rule{1pt}{0.4pt}}\hfill\kern0pt}} - \renewcommand*{\subsectionrule}{\leavevmode{\color{bodyrulecolor}\xleaders\hbox to 0.35em{\scriptsize.}\hfill}}\fi% different subsectionrules will not be perfectly aligned, but remaining space at the end of the fill will be distributed evenly between leaders, so it will be barely visible}} + \renewcommand*{\subsectionrule}{\leavevmode{\color{bodyrulecolor}\xleaders\hbox to 0.35em{\hss\scriptsize.\hss}\hfill\kern0pt}}\fi% different subsectionrules will not be perfectly aligned, but remaining space at the end of the fill will be distributed evenly between leaders, so it will be barely visible}} \if@mixedrules% \renewcommand*{\sectionrule}{\par\nobreak\vspace*{-.7\baselineskip}\leavevmode{\color{bodyrulecolor}\leaders\hbox{\rule{1pt}{0.4pt}}\hfill\kern0pt}} - \renewcommand*{\subsectionrule}{\leavevmode{\color{bodyrulecolor}\xleaders\hbox to 0.35em{\scriptsize.}\hfill}}\fi% different subsectionrules will not be perfectly aligned, but remaining space at the end of the fill will be distributed evenly between leaders, so it will be barely visible}} + \renewcommand*{\subsectionrule}{\leavevmode{\color{bodyrulecolor}\xleaders\hbox to 0.35em{\hss\scriptsize.\hss}\hfill\kern0pt}}\fi% different subsectionrules will not be perfectly aligned, but remaining space at the end of the fill will be distributed evenly between leaders, so it will be barely visible}} \if@norules% \renewcommand*{\sectionrule}{} \renewcommand*{\subsectionrule}{}\fi