From the XeTeX mailing list: [XeTeX] Greek XeLaTeX
Hans,
here's a challenging question from the XeTeX mailing list. Somebody
gave a challenge of how one writes units or rather: if it is possible
to get rid of latin keyboard entirely, for example if one is able to
retype \includegraphics[width=10cm,scale=5]{...} in arabic/possibly
greek interface without using the latin keyboard)?
In either case I think that one should convince the author to take
ConTeXt instead of LaTeX to rewrite the commands ...
Mojca
2010/10/12 Alexandros Gotsis
Dear friends,
I am trying to "greekify" XeLaTex in order to make it easier for greek writers to use. I have translated almost all the commands (e.g., instead of \begin{document} I can use \αρχή{κειμένου}, etc.) that I could think of and made new article, book etc. classes with the greek commands. These new classes just renew the commands etc. and they work rather well. There are a few errors still that I try to figure out, but there are also a couple of things that I do not know how to do and, therefore, ask your advise/help.
1. I could replace almost all commands of (Xe)LaTeX, but I can do nothing with the very first one: \documentclass{}! Is there a way to change the name of this command so that the XeLaTeX engine still understands it? I am looking for solutions that will not include any extra (latin) text in the source file, as this would defy the purpose.
2. While I have changed the names for "Chapter", "Figure", the dates, the numbers, capitalisation etc. (thanks for all this go to the work of Syropoylos in Xanthi), I do not know how to change things as, e.g., [c] (center) to [κ] (κέντρο), the length units (from mm το χ etc.). For the time being I would not change anything in the math environments.
3. I do not know how to change the alphabetical order in "makeindex". Usually the accented vowels follow the corresponding unaccented ones in a greek index,. This is not the case for "makeindex", as it follows the unicode listing. which is defined differently, and the result looks wrong in a greek index list (ευρετήριο).
The idea behind the changes is that a writer of greek text (or arab, chinese etc.) should not be obliged to change his/her computer keyboard to latin for the commands and back again for the text. Also the names of the commands would be more transparent for non-english speakers.
followed by: On Tue, Oct 12, 2010 at 13:54, Ulrike Fischer wrote:
Am Tue, 12 Oct 2010 11:13:41 +0200 schrieb Khaled Hosny:
The idea behind the changes is that a writer of greek text (or arab, chinese etc.) should not be obliged to change his/her computer keyboard to latin for the commands and back again for the text. Also the names of the commands would be more transparent for non-english speakers.
Well I don't know much about ConTeXt, but at first ConTeXt is a rather monolitic and selfcontained format. It doesn't have to handle lots of packages. Also I have some doubts that this localised formats translates really everything down to units like mm or numbers to other scripts. Or is their an completly arabic counterpart to \includegraphics[width=10cm,scale=5]{...}?
... Mojca
On 12-10-2010 9:24, Mojca Miklavec wrote:
here's a challenging question from the XeTeX mailing list. Somebody gave a challenge of how one writes units or rather: if it is possible to get rid of latin keyboard entirely, for example if one is able to retype \includegraphics[width=10cm,scale=5]{...} in arabic/possibly greek interface without using the latin keyboard)?
In either case I think that one should convince the author to take ConTeXt instead of LaTeX to rewrite the commands ...
Just take a look at mult-def.lua and you will see that there is already a persian interface ... defining commands in any language is possible already right from the start of mkiv. Anyhow, I just tested it and found out that in the process of adapting code to some new luatex functionality I didn't set some catcodes right, so you need the beta that I uploaded a minute ago. Attached is a file from the test suite. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, 13 Oct 2010, Hans Hagen wrote:
On 12-10-2010 9:24, Mojca Miklavec wrote:
here's a challenging question from the XeTeX mailing list. Somebody gave a challenge of how one writes units or rather: if it is possible to get rid of latin keyboard entirely, for example if one is able to retype \includegraphics[width=10cm,scale=5]{...} in arabic/possibly greek interface without using the latin keyboard)?
In either case I think that one should convince the author to take ConTeXt instead of LaTeX to rewrite the commands ...
Just take a look at mult-def.lua and you will see that there is already a persian interface ... defining commands in any language is possible already right from the start of mkiv.
I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek). Aditya
On 13-10-2010 1:01, Aditya Mahajan wrote:
I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek).
hm, but why units if not the rest too? I think that dealing with units in arbitrary characters is somewhat tricky (an a callback woudl slow down luatex a lot) aren't units like mm sort of standard? ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, 13 Oct 2010, Hans Hagen wrote:
On 13-10-2010 1:01, Aditya Mahajan wrote:
I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek).
hmm, but why units if not the rest too?
The translation of the macros is definitely needed. But along with that, the OP was also looking for translation of units. I think that the use case is someone who uses a greek keyboard cannot key in latin characters easily. A partial translation (that only converts the macro commands) is not sufficient, because the user has to switch to the latin keyboard to enter units and then switch back to greek keyboard for the rest of the text.
I think that dealing with units in arbitrary characters is somewhat tricky (an a callback woudl slow down luatex a lot)
Or perhaps something like 10\UNITmm (in Greek, of course). Similar to how metapost defines units.
aren't units like mm sort of standard?
I don't know how Greeks enter greek, so I have no idea how easy it is to enter latin using greek keyboards. Aditya
On 13-10-2010 1:40, Aditya Mahajan wrote:
Or perhaps something like 10\UNITmm (in Greek, of course). Similar to how metapost defines units.
something like that is always possible, or maybe \dim{...} in context in many places we can intercept it but of course not in dimexpr and so
I don't know how Greeks enter greek, so I have no idea how easy it is to enter latin using greek keyboards.
in any case, the amount of units in a document is rather small, only in the style part and then we can offer \<greek mu>greek mu> == mm Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 13.10.2010 um 01:01 schrieb Aditya Mahajan:
I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek).
\usemodule[translate] \translateinput[μμ][mm] \enableinputtranslation \starttext\tt \scratchdimen=2mm 2mm: \the\scratchdimen\crlf \scratchdimen=1μμ 1μμ: \the\scratchdimen \stoptext Wolfgang
On Wed, 13 Oct 2010, Wolfgang Schuster wrote:
Am 13.10.2010 um 01:01 schrieb Aditya Mahajan:
I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek).
\usemodule[translate]
\translateinput[μμ][mm]
\enableinputtranslation
\starttext\tt \scratchdimen=2mm 2mm: \the\scratchdimen\crlf \scratchdimen=1μμ 1μμ: \the\scratchdimen \stoptext
On 2010.10.13 beta I get ! LuaTeX error <main ctx instance>:32: attempt to call field 'install_text_filter' (a nil value) stack traceback: <main ctx instance>:32: in function 'enable' <main ctx instance>:1: in main chunk. system > error on line 5 in file test.tex: LuaTeX error ... 1 \usemodule[translate] 2 3 \translateinput[μμ][mm] 4 5 >> \enableinputtranslation 6 7 \starttext\tt 8 \scratchdimen=2mm 2mm: \the\scratchdimen\crlf 9 \scratchdimen=1μμ 1μμ: \the\scratchdimen 10 \stoptext 11 This works fine in TL ConTeXt. Aditya
On Fri, 15 Oct 2010, Aditya Mahajan wrote:
On Wed, 13 Oct 2010, Wolfgang Schuster wrote:
Am 13.10.2010 um 01:01 schrieb Aditya Mahajan:
I thought that Mojca was asking if we can also specify units in Greek. For example, 1μμ instead of 1mm (Although, I am not sure what are the corresponding units in Greek).
\usemodule[translate]
\translateinput[μμ][mm]
\enableinputtranslation
\starttext\tt \scratchdimen=2mm 2mm: \the\scratchdimen\crlf \scratchdimen=1μμ 1μμ: \the\scratchdimen \stoptext
On 2010.10.13 beta I get
! LuaTeX error <main ctx instance>:32: attempt to call field 'install_text_filter' (a nil value)
The three lines with resolvers.install_text_filter should be changed to resolvers.filters.install Aditya
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Mojca Miklavec
-
Wolfgang Schuster