PhelypeOleinik / lipsum

150 paragraphs of Lorem ipsum dummy text for LaTeX
12 stars 7 forks source link

\lipsum inactives active characters #14

Open petiard opened 1 year ago

petiard commented 1 year ago

Hello!

With [french]babel in pdflatex, there are four active characters which are ?;:!

If I type \lipsum, these characters become inactive %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[french]{book} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{lipsum} \begin{document} a?\par a;\par a:\par a!\par

\lipsum[1]

a?\par a;\par a:\par a!\par \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Best regards

François

PhelypeOleinik commented 1 year ago

The issue boils down to:

\documentclass[french]{book}
\usepackage[T1]{fontenc}
\usepackage{babel}
\begin{document}
a:\par
\hyphenrules{latin}
a:\par
\hyphenrules{french}
a:\par
\end{document}

When lipsum uses \hyphenrules{latin}, it deactivates the French chars, but \hyphenrules{french} does not activate them back. I don't know if this is lipsum misusing babel, or if there is something wrong with \hyphenrules...

petiard commented 1 year ago

Thank you for your answer.

It seems there is no problem with \selectlanguage:

\usepackage[T1]{fontenc}
\usepackage{babel}
\begin{document}
a:\par
\selectlanguage{latin}
\verb+\selectlanguage{latin}+ a:\par
\selectlanguage{french}
\verb+\selectlanguage{french}+ a:\par
\hyphenrules{latin}
\verb+\hyphenrules{latin}+ a:\par
\hyphenrules{french}
\verb+\hyphenrules{french}+ a:\par
\selectlanguage{french}
\verb+\selectlanguage{french}+ a:\par
\hyphenrules{latin}
\verb+\hyphenrules{latin}+ a:\par
\selectlanguage{french}
\verb+\selectlanguage{french}+ a:\par
\end{document}

Maybe it's \hyphenrules ...? François

petiard commented 1 year ago

And it seems there is no problem with hyphenrules as environment:

\documentclass[french]{book}
\usepackage[T1]{fontenc}
\usepackage{babel}
\begin{document}
a:\par
\begin{hyphenrules}{latin}
a:\par
\end{hyphenrules}
a:\par
\end{document}

Best regards François

PhelypeOleinik commented 1 year ago

Hm... So it's indeed a misuse of \hyphenrules. I am using \hyphenrules as a command because I don't want it to form a group (see #1). I'll come up with something...