Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uppercased section titles produce hyperref warning when tagging is active. #787

Open
John02139 opened this issue Jan 29, 2025 · 0 comments
Labels
area: headings bug Something isn't working in code we maintain (directly)

Comments

@John02139
Copy link

Section titles can be made uppercase by adding \MakeUppercase to the 6th argument of \@startsection (noted in source2e, pg. 901). The following does this, but if tagging is active, a warning results.

\DocumentMetadata 
{
	testphase = {phase-III,firstaid},
	pdfstandard = ua-2,
	pdfversion  = 2.0,
	lang = en-US,
}
\documentclass{article}

\usepackage{etoolbox}
\patchcmd{\section}{\bfseries}{\bfseries\MakeUppercase}{}{}

%% same result this way, as expected
%\makeatletter
%\renewcommand\section{\@startsection {section}{1}{\z@}%
%                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
%                                   {2.3ex \@plus.2ex}%
%                                   {\normalfont\Large\bfseries\MakeUppercase}}
%\makeatother

\usepackage{hyperref}

\begin{document}
\section{A short section}\label{sec:1}
Text in Sect.~\ref{sec:1}.
\end{document}

With tagging, the following appears

Package hyperref Warning: Counter 'SECTION' or the representation '\theHSECTION`
(hyperref)                don't exist. No target created. on input line 23.
@u-fischer u-fischer added the bug Something isn't working in code we maintain (directly) label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: headings bug Something isn't working in code we maintain (directly)
Projects
None yet
Development

No branches or pull requests

3 participants