I'm using the mfirstuc
package for sentence case formatting and encountering two problems:
- Capitalizing Phrases with Apostrophes: I need phrases with apostrophes to be correctly capitalized, where words after the apostrophe are also capitalized. For example,
jardins fabuleux d'atlas
should becomeJardins Fabuleux d'Atlas
. - Mixed-Case Sentence Capitalization: I want to capitalize the first letter of each word in a mixed-case sentence, making the rest of the letters lowercase. For instance,
sOmE mIxEd cAsE sEnTeNcE
should transform intoSome Mixed Case Sentence
. My attempt to use\ecapitalisewords
with\MakeLowercase
like this:
\ecapitalisewords{\MakeLowercase{sOmE mIxEd cAsE sEnTeNcE}}
results in the entire sentence being lowercase. It seems like the \ecapitalisewords
command is never executed on the output of \MakeLowercase
.
Here's a MWE demonstrating both issues:
\documentclass{article}
\usepackage{mfirstuc}
\gMFUnocap{d'}
\begin{document}
% Issue 1
% Desired output: Jardins Fabuleux d'Atlas
\capitalisewords{jardins fabuleux d'atlas}
% Issue 2
% Desired output: Some Mixed Case Sentence
\ecapitalisewords{\MakeLowercase{sOmE mIxEd cAsE sEnTeNcE}}
% Combined issues
% Desired output: Jardins Fabuleux d'Atlas
\capitalisewords{jArDiNs fAbUlEuX d'atLaS}
\end{document}
I'm specifically using the mfirstuc
package because it provides the \gMFUnocap{⟨word⟩}
command to exclude certain words from being case-changed, which I need for other parts of my document. However, if there are alternative packages that can solve these issues while also providing similar functionality to \MFUnocap{⟨word⟩}
, I'm open to suggestions.
I would greatly appreciate any help in resolving these capitalization issues. Thank you in advance for your assistance.