[Python-modules-team] Bug#643990: python-docutils: inconsistent names of rst2*tex scripts

Guenter Milde milde at users.sf.net
Thu Oct 20 22:23:21 UTC 2011


> When I see command name "rst2latex", I understand immediately, that it
> takes RST-code and outputs LaTeX-code.
... 
> And that's fine: rst2latex really works exactly as its name suggests.

Actually, it expects LaTeX2e and a pdfTeX engine in a version not earlier
than 2005-02-04 (see [1]). On a not too old Debian rst2latex output can
be converted with either ``pdflatex`` or ``latex`` or one of the many
front ends like ``rubber`` or via any decent text editor.

[1] http://docutils.sourceforge.net/docs/user/latex.html#error-illegal-unit-px

> Then comes command line program called "rst2xetex". That name
> suggests, it takes RST-code as its input and outputs Plain TeX -code
> suitable for TeX-engine called XeTeX.

Sorry for the confusion. 
 
> rst2xetex - convert reST documents to XeLateX

Is the typo (...teX) in the man page or the citation from it?
The help string does not have it: ``rst2xetex --help`` ::

  Generates XeLaTeX documents from standalone reStructuredText sources.
 
> What the hell? If it outputs LaTeX-code suitable for XeLaTeX, why its
> name is "rst2xetex" and not "rst2xelatex", then?

Just because the first one is shorter. 

Like the LyX document processor ("PDF (dvips)" vs. "PDF (pdflatex)" vs
"PDF (XeTeX)"), Docutils uses short distinguishing names following the
"Zen of Python":

  practicality beats purity.

> If I write LaTeX-code that is compiled with TeX-engine called XeTeX,
> then I compile it with command xelatex, and not xetex.

One can also use ``xetex %&latex``, ``lualatex``, ``luatex &latex`` or
one of the many available front ends to compile documents generated with
the rst2xetex script.

> That is totally stupid inconsistency.

I agree that "latex" for "TeX with LaTeX macro package to be compiled by
the pdftex engine" vs. "xetex" for "TeX with LaTeX macro package to be
compiled by either the xetex or luatex engine" may contribute to further
confusion of the concepts of "TeX macro packages" (formats)the language"
vs. "modified TeX executables" (engines).

Also, the name does not convey that the main distinction to the "latex2e"
writer is the use of the fontenc and polyglossia packages.

But I am not sure it is worth changing this to "rst2xetelatexorlualatex" as
this breaks everything expecting the inconsistent but short name.

Günter 





More information about the Python-modules-team mailing list