Skip to content

Allow escaped characters in IEEEtran DOI note - #24

Merged
s-heppner merged 1 commit into
mainfrom
ieeetran-escaped-doi-note
Oct 9, 2026
Merged

s-heppner merged 1 commit into
mainfrom
ieeetran-escaped-doi-note

Conversation

@s-heppner

Copy link
Copy Markdown
Owner

Previously, the DOI form of note required the link text of \href to be identical to the DOI in the URL. For DOIs containing _, such as 10.1007/11574620_45, this forced a bare _ into the link text, which is typeset as normal text and makes LaTeX fail with Missing $ inserted unless the underscore package is loaded. Escaping it as \_ fixed the compilation, but the linter then reported the note as malformed.

With this change, check_url_field unescapes the link text before comparing it to the DOI in the URL. This covers \_, \#, \%, \&, \$ as well as \textasciitilde{} and \~{} for ~. Tests for escaped and mismatching link texts are added.

Fixes #23

Previously, the DOI form of `note` required the link text of `\href`
to be identical to the DOI in the URL. For DOIs containing `_`, such
as `10.1007/11574620_45`, this forced a bare `_` into the link text,
which is typeset as normal text and makes LaTeX fail with `Missing $
inserted` unless the `underscore` package is loaded. Escaping it as
`\_` fixed the compilation, but the linter then reported the `note`
as malformed.

With this change, `check_url_field` unescapes the link text before
comparing it to the DOI in the URL. This covers `\_`, `\#`, `\%`,
`\&`, `\$` as well as `\textasciitilde{}` and `\~{}` for `~`. Tests
for escaped and mismatching link texts are added.

Fixes #23
@s-heppner
s-heppner merged commit 3f96363 into main Oct 9, 2026
2 checks passed
@s-heppner
s-heppner deleted the ieeetran-escaped-doi-note branch October 9, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow escaped special characters in the link text of the IEEEtran DOI note form

1 participant