[tex-live] OT2 vs. T2A; compilation by apache user issues

Zdenek Wagner zdenek.wagner at gmail.com
Sun Feb 16 16:53:14 CET 2014

2014-02-15 19:03 GMT+01:00 mario chiari <ml at mariochiari.net>:
> Hi
> my first post to a tex list after ages.
> I have been using now and then a 2010 install of texlive (on a Linux -
> Fedora 17 machine) without a issue.
> Now I have a issue and I am back.
> I need to type cyrillic within a italian/english text.
> I use
> \usepackage[OT2,T1]{fontenc}
> \usepackage[american,russian,italian]{babel}
> and define:
> \newcommand\cyrillic{%
> \renewcommand\rmdefault{wncyr}%
> \renewcommand\sfdefault{wncyss}%
> \renewcommand\encodingdefault{OT2}%
> \normalfont
> \selectfont}
> \DeclareTextFontCommand{\textcyr}{\cyrillic}
> Everything works fine, but when I need something like
> \section{\textcyr{}}.
> So, my first question, how do I fix that?
WHAT do you want to fix? How can we help without seeing the log?

> I have hacked from a forum a different setting:
> \usepackage[T2A,T1]{fontenc}
> \DeclareRobustCommand{\textcyr}[1]{\foreignlanguage{russian}{#1}}
> The latter works fine too, as long as I run pdflatex from my command
> line as user root.
> However I need to create and compile a .tex file from within a php
> script, and then compilation partly fails, cyrillic characters are not
> rendered.
> I understand that that is because the apache user launches the process:
Where is the environment defined and how? Apache does not know the
complete PATH, see the setting of PassEnv and SetEnv directives in the
Apache manual.

How do you handle conversion of cyrillic to a latin transliteration in
PHP? Are you sure the bug is not in the PHP script? shouldn't it be
better to require direct entry of cyrillic in UTF-8 and pass it
directly without any conversion to XeLaTeX? You can then either change
the font per language using Polyglossia or per Unicode block by

> apache  /usr/local/texlive/2010/bin/i386-linux/pdflatex --interaction
> batchmode  myfile.tex
> I am a newbie about this kind of issues, so my second question is: how do I fix that user issue?
Again, without seeing the log no one can guess what happens on your computer.
> Thanks a lot
> regards
> mario

Zdeněk Wagner

More information about the tex-live mailing list