latex3 / latex3/hyperref

Problem with \href and active characters of babel-french

Open
#149 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
205
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Hello!

With that example:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt,french,a4paper,twoside]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{lmodern}
\frenchsetup{og=«,fg=»}
\usepackage{hyperref}
\hypersetup{colorlinks,linkcolor=blue,urlcolor=blue}
\usepackage{xcolor}
\begin{document}
\href{http://url}{Test: bla bla} \textcolor{red}{incorrect} (Test: bla bla)

\href{http://url}{Test; bla bla} \textcolor{red}{incorrect} (Test; bla bla)

\href{http://url}{Test! bla bla} \textcolor{red}{incorrect} (Test! bla bla)

\href{http://url}{Test? bla bla} \textcolor{red}{incorrect} (Test? bla bla)

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

you can see than the espacement between Test and : or ; or ! or ? is not correct (in French, of course). Into the parens, the espacement is correct.

Best regards.

François

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by compiling the minimal document in the issue with babel, the french option, and hyperref, comparing spacing inside \href with the parenthesized text. Trace how the French active characters interact with hyperref link text and check whether the existing hyperref or babel integration handles these punctuation characters. Done means the example produces correct French spacing for :, ;, !, and ? inside links without regressing ordinary links.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex
Domain
internationalization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.