On 16-12-2011, at 23:48, Allin Cottrell wrote:
Hello all,
We have a problem with internationalization of gretl's TeX output
(mostly on Windows) and I'd like to ask for your views.
The current situation is as described in chapter 32 of the Gretl
User's Guide. That is:
(a) If the "system" encoding is UTF-8 we output TeX in UTF-8 and put
appropriate \usepackage{} lines into the TeX header. That's OK.
(b) Otherwise we output TeX in the locale encoding and put
\usepackage[latin1]{inputenc} into the header. That might have been
OK in the days when the only translations of gretl were into West
European languages, but it's not OK any more.
My proposed fix is that we always output TeX in UTF-8, regardless of
the platform and the system text encoding. This means that when we
output "complete" TeX files (with a header) they will include:
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
Does anyone see a problem with this? Or have an alternative
solution?
An alternative solution could be to use a template file.
The template would contain the fixed preamble such as
\documentclass[11pt]{article}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
(Note: generated on Mac OS X).
A user can change the template to fit their needs. Gretl itself doesn't need to make
complex decisions and doesn't need to change when the preamble needs changing.
Gretl copies the template and appends its stuff.
Gretl could also generate a template based on system settings when no template is
available and inform the user that it has done so.
Berend