Bug Tracker
I’m currently working on a major new version of the datatool package. This may take a while. Please be patient. (Experimental version available for testing.)
ID | 276🔗 |
---|---|
Date: | 2024-07-31 17:36:11 |
Last update: | 2024-08-02 18:45:47 |
Status | Closed (Not a Bug) |
Category | mfirstuc |
Version | 2.08 |
Summary | output no longer the same as in manual |
Sign in to subscribe to notifications about this report.
Description
The output of\MFUsentencecase
is no longer the same as in the manual. For example,
\MFUblocker{\nameref} \makefirstuc{\nameref{sec:sentencecase} section} / \MFUsentencecase{\nameref{sec:sentencecase} section}now gives Sentence-Case section / Sentence-Case section, i.e. the output of
\makefirstuc
and \MFUsentencecase
are the same. There was an update to the \text_titlecase...
commands since the last release of this package, which may be the cause of the change in output.MWE
Download (290B)
\documentclass{article} \usepackage{mfirstuc} \usepackage{nameref} \begin{document} \section{Sentence-Case} \label{sec:sentencecase} \MFUblocker{\nameref} \makefirstuc{\nameref{sec:sentencecase} section} / \MFUsentencecase{\nameref{sec:sentencecase} section} \end{document}
Evaluation
\MFUsentencecase
is simply defined as:
\newcommand{\MFUsentencecase}[1]{\text_titlecase_first:n{#1}}Any change in its behaviour is an issue with
\text_titlecase_first:n
so I'll have to close this as not a bug in mfirstuc.
\MFUblocker
automatically implements \MFUexcl
so your MWE without the mfirstuc package is essentially doing:
\documentclass{article} \usepackage{nameref} \ExplSyntaxOn \newcommand{\MFUsentencecase}[1]{\text_titlecase_first:n{#1}} \newcommand{\MFUexcl}[1]{ \tl_if_empty:nF { #1 } { \tl_if_in:NnF \l_text_case_exclude_arg_tl {#1} { \tl_put_right:Nn \l_text_case_exclude_arg_tl {#1} } } } \ExplSyntaxOff \begin{document} \section{Sentence-Case} \label{sec:sentencecase} \MFUexcl{\nameref} \MFUsentencecase{\nameref{sec:sentencecase} section} \end{document}This does indeed produce "Sentence-Case section" with TeXLive 2024. Replacing
\l_text_case_exclude_arg_tl
with \l_text_expand_exclude_tl
results in the warning:
Reference `Sec:sentencecase' on page 1 undefinedI think you would need to query this with the LaTeX3 team.
Comments
2 comments.
Replying to Comment #142:
🔗Comment from Nicola Talbot 🦜
Date: 2024-08-02 18:45:47
Repying to: Matthew Bertucci 2024-08-02 16:21:08
Date: 2024-08-02 18:45:47
Repying to: Matthew Bertucci 2024-08-02 16:21:08
Okay, sorry for misunderstanding. I'll add a note to the manual. Thank you for pointing out the problem.
Replying to Comment #143:
Add Comment
Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=276
Date: 2024-08-02 16:21:08
Sorry, I didn't mean to imply this was a problem with the mfirstuc code. I just meant that the manual could be updated so the user reading it isn't confused when their output doesn't match that in the manual (like I was).
I think the change in the kernel titlecase commands happened with this commit: [Link]. There was a brief mention of it in ltnews38: [Link]