4

MWE (test.tex):

\input miniltx
\input url.sty

\url{http://www.google.com}

\bye

Commands:

pdftex -fmt=csplain test.tex -- fails

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=csplain)
 restricted \write18 enabled.
entering extended mode
 encTeX v. Jun. 2004, reencoding enabled.
(./test.tex The format: csplain <Nov. 2013>.
The cs-fonts are preloaded and A4 size implicitly defined.
The utf8->iso8859-2 re-encoding of Czech+Slovak alphabet activated by encTeX
(/usr/local/texlive/2014/texmf-dist/tex/plain/graphics-pln/miniltx.tex)
(/usr/local/texlive/2014/texmf-dist/tex/latex/url/url.sty)
! Improper alphabetic constant.
<to be read again> 
                   \warntwobytes 
\do #1#2->\mathcode `#1
                       =32768 \begingroup \lccode `\~`#1\lowercase {\endgrou...

\UrlEncSpecials ...char 27 }\do \warntwobytes ^^df
                                                  {\mathchar 25 }\do \~{\low...

\Url@MathSetup ...ct \UrlSpecials \UrlEncSpecials 
                                                  \let \do \set@mathnolig \v...

\Url@FormatString ->\UrlFont \Url@MathSetup 
                                            $\fam \z@ \textfont \z@ \font \e...

\Url@z ...rcent \Url@HyperHook {\Url@FormatString 
                                                  }\endgroup 
l.4 \url{http://www.google.com}

? 

pdftex -fmt=pdfcsplain test.tex -- fails with similar message

xetex -fmt=pdfcsplain test.tex -- succeeds

luatex -fmt=pdfcsplain test.tex -- succeeds!

Any thoughts on a fix?

p.s. I am aware of the url support in OPmac, but would like the option of using eplain/url with csplain as well.

5

csplain is (by default) sensitive to non UTF-8 codes in input. It uses encTeX for this in pdftex engine. The url.sty manipulates with non UTF-8 codes, encTeX is sensive to this more than we need and this yields this error.

You can write \input utf8off at beginning of the document. After this, the pdftex treats its input normally as 8bit.

If you are using pdftex and you need to keep active UTF-8 input then you can deactivate it only when macro url.sty is scanned. This means:

\mubytein=0
\input miniltx
\input url.sty
\mubytein=1

\url{http://www.google.com}

\bye
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.