Hello all! I'm stuck: I have to get at least my ConTeXt to typeset Russian. No ifs or buts, it has to compile a file where the text is in Russian. Getting my ConTeXt to do it can involve installing a font or updating or something, as long as I get it to work in my XP. Preferably I should need a fairly out-of-box to remotely set up a working system on a reasonably computer-literate customers XP. All the computers than can be used for the job run Windows XP and the stand-alone distribution. My own XP has a fairly old distribution without Lua, the test computer has the newest possible standalone version with updated ConTeXt (I ran the script that seemed to do the trick). Happened this far: - I figured out that I can get SciTe to show cyrillics if I put a set.character=204 in the user.properties - I deducted that I can get the updated ConTeXt to run MkIV "out-of-the-box" if I dig up the console and command texexec --lua filename - on the up-to-date ConTeXt I've tried all the tricks I found for Russian on the garden (http://wiki.contextgarden.net/Russian) and on the mailing list (a thread from December last year). No luck. (Note. Testing has mostly involved cutting and pasting the full example code into a blank .tex and compiling that into pdf in the way that's appropriate for the instructions.) One of my problems seems to be that the input is not UTF, i.e. I have configured SciTe badly. Or Windows XP just doesn't like UTF, in which case I'm in trouble. It seems to me that if this problem is solved, MkIV would work. I'm not terribly used to working with encodings in general, so UTF is unknown terrain to me and this doesn't make things easier. The other problem is that if I'm running MkII, it seems that I need to install some fonts, but typescripts seem to be of the "email me and you can get a typescript" way. Or then I just can't understand what the text says; since postscript started working by default a few years ago, I've avoided the font department altogether. :/ The third, and very minor problem, is to get the stand-alone to run MkIV/luatex by default. I'm sure there's a switch I can use to tell it to always use luatex instead of pdftex, I'm just too stupid to figure it out myself. And of course I'll only need this if MkIV is the best solution to my problem... If that will solve the problem and if it can be done with minor changes (like adding something to path or something), I'm willing to switch to a different editor for Russian (or, rather, Cyrillic) - especially if that will happily coexist with SciTe. Any hints on what to do next? Mari (Tip of the day: never promise anything to a customer before you've checked that it is doable in reality, not just in specs.)
Am 04.02.2009 um 13:51 schrieb Mari Voipio:
I'm stuck: I have to get at least my ConTeXt to typeset Russian. No ifs or buts, it has to compile a file where the text is in Russian. Getting my ConTeXt to do it can involve installing a font or updating or something, as long as I get it to work in my XP.
[...]
Any hints on what to do next?
I tried just a moment ago to typeset russian in a machine where I have only Hans standalone for Windows (mswincontext) and had no problem to get a correct output. 1. I started scite (cscite.bat) 2. Opened a new tab 3. Select "UTF-8" in menu File/Encoding 4. Inserted the Russian example [1] for MkIV example from wiki in my tab 5. Added "% engine=luatex" at the begin of the file 6. Saved the file on my disk 7. Choose the "Process TeX file" from the Tools menu. 8. Got a pdf file with russian text. [1] http://wiki.contextgarden.net/Russian#Using_cyrillic_with_ConTeXt_MkIV The only thing I think in the standalone was to update to the last current and used a newer LuaTeX version (0.30.3). Wolfgang
Wolfgang Schuster wrote:
I tried just a moment ago to typeset russian in a machine where I have only Hans standalone for Windows (mswincontext) and had no problem to get a correct output.
With your instructions, neither do I! I'm very, very thankful for this list...
1. I started scite (cscite.bat) 2. Opened a new tab 3. Select "UTF-8" in menu File/Encoding
This solved problem number 1: how to do UTF in SciTe.
4. Inserted the Russian example [1] for MkIV example from wiki in my tab 5. Added "% engine=luatex" at the begin of the file
This solved problem number 2: how to force SciTe to always use MkIV.
6. Saved the file on my disk 7. Choose the "Process TeX file" from the Tools menu. 8. Got a pdf file with russian text.
So did I. The best thing here is that this is simple enough that once I'm sure my filestructure and everything else works, I think my user will manage to get a compiling system going on. Hmm... Smells badly like I need to upgrade my own computer. I guess it's about time to migrate anyway. Luatex, here I come! Thanks a million, Mari
Am 04.02.2009 um 16:18 schrieb Mari Voipio:
5. Added "% engine=luatex" at the begin of the file
This solved problem number 2: how to force SciTe to always use MkIV.
To use XeTeX add "% engine=xetex" at the top of your file, for most languages it's unimportant which engine you use as long as you don't use on of the MkIV only features. Wolfgang
On Wed, Feb 4, 2009 at 4:18 PM, Mari Voipio wrote:
Wolfgang Schuster wrote:
3. Select "UTF-8" in menu File/Encoding
This solved problem number 1: how to do UTF in SciTe.
The problem is that you need to do that every time. There is some file with user settings that you can access through menu. Do not ask me where it is since I cannot try it now, but it's very handy since you only do it once and then UTF-8 will always work out-of-the-box. Mojca
Mojca Miklavec wrote:
On Wed, Feb 4, 2009 at 4:18 PM, Mari Voipio wrote:
Wolfgang Schuster wrote:
3. Select "UTF-8" in menu File/Encoding This solved problem number 1: how to do UTF in SciTe.
The problem is that you need to do that every time. There is some file with user settings that you can access through menu. Do not ask me where it is since I cannot try it now, but it's very handy since you only do it once and then UTF-8 will always work out-of-the-box.
Agreed. However, once I knew I should be looking for this, I found one solution to this problem at http://www.nabble.com/default-encoding-to-utf-8-cookie-td5946114.html The thing to do is to open the SciTe global properties (Options | Open Global Properties) and to find the spot that says # Internationalisation # Japanese input code page 932 and ShiftJIS character set 128 #code.page=932 #character.set=128 # Unicode #code.page=65001 code.page=0 #character.set=204 # Required for Unicode to work on GTK+: #LC_CTYPE=en_US.UTF-8 #output.code.page=65001 Then uncomment the line code.page=65001 and comment the line code.page=0 (for us Windows dummies: move the hash mark # down by one line). After this change everything opened in Scite in Windows is handled as UTF-8 (GTK+ users will take note of the second comment). Remember to save the properties file before closing it. Caveat: This is advisable if you use Scite only with UTF-8 encoded files. If you use SciTe for files with other encoding, it is not a good idea. Why, you ask? Because in the Encoding menu under File there's no way of switching a tab back to for example Windows Iso-Latin1 or whatever else your files are. I know SciTe menus are adjustable so if somebody knows of a way to adding 'switch tab to code.page 0' or 'windows default encoding' or something similar to the Encoding menu, that'd be very much appreciated. Until then, I probably have to give up using SciTe as my html editor or some other people will be veerryyy annoyed... Mari (...who's next job is to convert a pile of files into UTF-8...)
luigi scarso wrote:
Maybe you can consider (under linux,I dont'know about windows) recode iconv
sometimes they are useful .
I have Cygwin installed to give me some command line tools and we already figured out iconv is probably a useful tool. Recode, on the other hand, doesn't seem to exist ("man recode" give 'No manual entry for recode' while 'man iconv' is very informative). One of my problems is that sometimes the files go out for editing to people who are only used to Windows. However, it turns out that even Word 2000 reads and saves UTF, if the open/save format is set to 'encoded text' and utf-8 is selected from the encoding type list. I just don't terribly fancy doing this for 5 x 15 files or something like that, so iconv is definitely high on the list of tools I'm going to try out. Thank you, everybody, for your help - now I know a lot better what to do and I even think my Russian contact will manage to install a working system on his XP. I'll wikify the stuff somehow once I'm sure I remember all the steps correctly (probably I'll just hog yet another XP for installation test...). Mari
On Thu, Feb 5, 2009 at 1:21 PM, Mari Voipio
I have Cygwin installed to give me some command line tools and we already figured out iconv is probably a useful tool. Recode, on the other hand, doesn't seem to exist ("man recode" give 'No manual entry for recode' while 'man iconv' is very informative).
Here is another tool for windows. http://www.kalytta.com/tools.php -> Character Set Converter Wolfgang
On Thu, Feb 5, 2009 at 1:21 PM, Mari Voipio wrote:
luigi scarso wrote:
Maybe you can consider (under linux,I dont'know about windows) recode iconv
sometimes they are useful .
I have Cygwin installed to give me some command line tools and we already figured out iconv is probably a useful tool. Recode, on the other hand, doesn't seem to exist ("man recode" give 'No manual entry for recode' while 'man iconv' is very informative).
You don't need cygwin (though if you already have it installed, I would double check cygwin pacagkes, maybe you just need to install a new package). This is a nice collection of useful tools (= swiss-knife for poor windows users) that work natively or at leat they did when I last used Windows: http://downloads.sourceforge.net/unxutils/UnxUtils.zip Mojca
For iconv and other gnu world tools, please refer to gnuwin32.
gnuwin32.sourceforge.net
On Fri, Feb 6, 2009 at 10:41 PM, Mojca Miklavec
On Thu, Feb 5, 2009 at 1:21 PM, Mari Voipio wrote:
luigi scarso wrote:
Maybe you can consider (under linux,I dont'know about windows) recode iconv
sometimes they are useful .
I have Cygwin installed to give me some command line tools and we already figured out iconv is probably a useful tool. Recode, on the other hand, doesn't seem to exist ("man recode" give 'No manual entry for recode' while 'man iconv' is very informative).
You don't need cygwin (though if you already have it installed, I would double check cygwin pacagkes, maybe you just need to install a new package).
This is a nice collection of useful tools (= swiss-knife for poor windows users) that work natively or at leat they did when I last used Windows: http://downloads.sourceforge.net/unxutils/UnxUtils.zip
Mojca ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Thu, Feb 5, 2009 at 11:34 AM, Mari Voipio wrote:
Mojca Miklavec wrote: Caveat: This is advisable if you use Scite only with UTF-8 encoded files. If you use SciTe for files with other encoding, it is not a good idea. Why, you ask? Because in the Encoding menu under File there's no way of switching a tab back to for example Windows Iso-Latin1 or whatever else your files are.
I know SciTe menus are adjustable so if somebody knows of a way to adding 'switch tab to code.page 0' or 'windows default encoding' or something similar to the Encoding menu, that'd be very much appreciated. Until then, I probably have to give up using SciTe as my html editor or some other people will be veerryyy annoyed...
Unless web pages are in ASCII, I never even dare to use anything but UTF-8. In the long run you will probably want to or have to switch ... the sooner you do that the better. I don't know what you use your web pages for, but if you allow user input (for example asking visitors for name), you discriminate users for not being able to enter their name properly. Lots of people that use ISO Latin 1 don't bother to specify encoding since the web pages seem to "just work". If you try to open those files (or see the web page) on some machine where Latin 2 in the default, you'll run into problems anyway. Mojca
participants (5)
-
luigi scarso
-
Mari Voipio
-
Mojca Miklavec
-
Wolfgang Schuster
-
Yue Wang