jbezos / babel-spanish

Spanish support for babel
2 stars 1 forks source link

deactivating shorthands via \shorthandsspanish does not work #11

Open Udi-Fogiel opened 1 year ago

Udi-Fogiel commented 1 year ago

The documentation claims that to deactivate a shorthand globally we can simply add a \spanishdeactivate deceleration to \shorthandsspanish. Did I encounter a bug or did I miss anything?

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\addto\shorthandsspanish{\spanishdeactivate{>}}

\begin{document}
\showthe\catcode`\>
\show>
\shorthandsspanish
\showthe\catcode`\>
\show>
\stop

Result:

> 13.
l.8 \showthe\catcode`\>

> >=macro:
->\active@prefix >\active@char> .
l.9 \show>

> 12.
l.11 \showthe\catcode`\>

> the character >.
l.12 \show>
Udi-Fogiel commented 1 year ago

It does work for ~, should I use es-noquoting to deactivate < and >?

Udi-Fogiel commented 1 year ago

Ok, reading the source code it looks like es-noquoting is the correct way of doing things, perhaps the documentation should be clearer about that. I will keep this ticket open just for confirmation.

Udi-Fogiel commented 1 year ago

If I would like to deactivate < and > by default, but still keep the possibility to activate them for the user, is the following the best method?

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\deactivatequoting

\begin{document}
...
\end{document}