TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

MWE (test.tex):

\input miniltx
\input url.sty




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
! Improper alphabetic constant.
<to be read again> 
\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 
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.

share|improve this question
up vote 6 down vote accepted

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:

\input miniltx
\input url.sty


share|improve this answer
Thank you. Works perfectly. – acarlow Jul 11 '14 at 13:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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