Pomax / ucharclasses

A XeLaTeX package that lets you insert arbitrary code between characters from different unicode blocks
15 stars 5 forks source link

Unbalanced to/from transitions #30

Open bunder opened 4 years ago

bunder commented 4 years ago

Test

\documentclass{article}
\usepackage[Russian,Latin]{ucharclasses}
\setTransitionsForLatin{\message{to}}{\message{from}}
\pagenumbering{gobble} % To suppress extra transitions due to page number
\begin{document}
я»;
\end{document}

Output

(./test.tex ... to from from ... )

Expected behaviour

As » is in Latin-1 Supplement block, just one to and one from is expected (which is true for я";).

Pomax commented 4 years ago

I'm not sure any from makes sense here: we start on я then transition to » (which should be in the Latin collection because that includes basic, extended A, etc). Then we do not transition to ; because that's basic latin, and then we should not transition because there's nothing left (certainly, bytecode wise there's a newline, but that should really get ignored, and might not be the case right now so that might be a second bug).

Unfortunately, with the rewrite by Enrico I am just as unfamiliar with this code as anyone else (my original version was much easier to understand but also far more amateurish, I am by no means good at plain TeX)

So: help wanted!