[identity profile] aciel.livejournal.com posting in [community profile] learn_russian
This post is only going to be of interest to a very small number of people. =P Sorry.

I was wondering if any of you scientist types in this community could tell me something about scientific and mathematical typesetting in Russian. For English, we use ТеХ, but it only works on 7-bit ASCII files and as far as I knew, most Russian characters are stored in the eighth bit (to which ТеХ doesn't pay attention).

Date: 2006-03-16 01:34 am (UTC)
From: [identity profile] apollotiger.livejournal.com

I think that LATEX can be made to support Russian with some sort of package. Supposedly, it'll support Unicode if you get it working properly …

I've been intending to ask the people over at [livejournal.com profile] tex_latex about that. I'll do that now.

Date: 2006-03-16 01:42 am (UTC)
From: [identity profile] khathi.livejournal.com
Don't know WHAT TeX are you using, but all versions used in Russia works with 8-bit symbols. And some even with 16-bit. ^_^ Because, you know, symbol size is not a TeX feature -- it's an OS feature. And 7-bit symbols became obsolete, IIRC, with early EBCDIC encodings -- ASCII was 8-bit from the start, actually.
Common misconception that ASCII is a 7-bit encoding cames from the fact, that base standard defines values of only HALF of the table, which is indeed can be packed into 7 bits. But eighth bit was not absent there, but simply disregarded and intended for localisation and some other uses.
Indeed, most of Russian codepages (defining upper half of ASCII table) replaces some of math symbols which were defined by Latin-1 codepage. But no one in his right mind would type a math text in a plain text, and most text processors use either names or escape sequencies for formulas, so absence of plain text symbols is hardly a problem.

Date: 2006-03-16 02:46 am (UTC)
From: [identity profile] khathi.livejournal.com
Well, it seems that we're speaking about the same in different ways. If one's sticking to the letter, than he can include into ASCII only the #00-#7F codes, LOWER part of the code table, defined in initial standard, which indeed is 7-bit. But IIRC, the ANSI defined later that UPPER half, with codes #F0-#FF, is also part of the same standard. Maybe you professor just calls in ANSI, not ASCII?
And for the second question -- the most widely used TeX version in Russia is LATeX, which naturally uses the whole 8-bit characters, with russian encoded in 866 (Alternative GOST) and 1251 (Windows) codepages for DOS and Windows respectively.
Unix versions use still another codepage, so-called KOI-8, which was a long-time standard for Russian unix community, as it has an advantage that russian letters are positioned at the same positions as the similarly looking Latin letters, so if upper bit would be stripped in some old 7-bit terminals, text would be still readable.

Date: 2006-03-16 05:29 am (UTC)
From: [identity profile] aka-lacerda.livejournal.com
You are wrong. ASCII is 7-bit and 8-bit extensions aren't the part of an ASCII. It's the ANSI character set which is 8-bit, lower part is compatible with ASCII.

Date: 2006-03-16 06:11 am (UTC)
From: [identity profile] khathi.livejournal.com
Ah! That's the thing. 'Cause, you know, 7-bit standard was hardly used as is anywhere except US, as in Europe already extensions come in use, and in non-latin countries it was even worse. But the name "ASCII" stuck, I believe...

Date: 2006-03-18 01:35 am (UTC)
From: [identity profile] gland.livejournal.com
I've never heard it called anything but the ANSI extended character set.

Date: 2006-03-16 02:09 am (UTC)
From: [identity profile] asher-kat.livejournal.com
http://www.kulichki.com/ostrova/bera/Comp/rus-latex/rus-latex.html

might be a good place to start.

There are some examples here: http://www.kis.uni-freiburg.de/~dobler/doc/tex/

Apologies if this is unhelpful...

Date: 2006-03-16 02:34 am (UTC)
From: [identity profile] ex-dmitri83798.livejournal.com
What LaTeX does, as far as I understand, is that it converts 8-bit koi8-encoded cyrillic symbols into TeX commands like \cyrp, \cyra etc.

If you use plain tex, I guess you have to do something like this with your own macros.

Date: 2006-03-16 04:43 am (UTC)
From: [identity profile] apollotiger.livejournal.com
That's sort of scary. I just tried to read “cyrp” and “cyra” as Cyrillic. I was wondering what сугр and суга were ...

Date: 2006-03-16 02:16 am (UTC)
From: [identity profile] kart.livejournal.com
Excellent question! I'd love to know how to get unicode working with LyX.

Date: 2006-03-16 02:30 am (UTC)
From: [identity profile] ex-dmitri83798.livejournal.com
the easiest way to start is to put

\usepackage[koi8-r]{inputenc}
\usepackage[T1,T2A]{fontenc}

and maybe

\usepackage[russian]{babel}

in the beginning of your document.

Emacs' MULE supports koi8-r (M-x set-buffer-file-coding-system) as well as several input methods for cyrillics (M-x set-input-method).

Vi(m?) can be made to work with koi8-r like this:

:e ++enc=koi8-r


Date: 2006-03-16 02:41 am (UTC)
From: [identity profile] crculver.livejournal.com
KOI8-R is an ancient Russian-specific encoding that should be abandoned for UTF-8. If you go the KOI8-R route, you'll find it difficult to insert characters from other scripts. Emacs handles UTF-8 just fine, too.

Date: 2006-03-16 01:53 pm (UTC)
From: [identity profile] ex-dmitri83798.livejournal.com
Making (La)Tex to work with utf is a pain. Moreover, if you are going to submit the document somewhere, it is likely that koi8 encoding is required.

Date: 2006-03-16 01:56 pm (UTC)
From: [identity profile] crculver.livejournal.com
Making LaTeX work with UTF-8 is easy. Most modern LaTeX distributions already ship with UTF-8 support. And a number of publishers and journals would be grateful to receive UTF-8, because that makes it easier to convert to their local XML toolchain.

Date: 2006-03-16 02:39 am (UTC)
From: [identity profile] crculver.livejournal.com

The links given above by asher_kat are obsolete. Tetex, at least, ships with Russian hyphenation patterns by default so there is no need to go through a painful process of installing them.

Modern LaTeX distributions support Unicode through the UTF-8 encoding, so typesetting any language at all is easy. See my guide "LaTeX for Classical Philologists and Indo-Europeanists (http://www.christopherculver.com/en/computing/latex.php)" for information on installing the latex-unicode package.

This is the 21st century, so don't settle for any solution that uses an archaic Russian-specific encoding like KOI8-R. UTF-8 in LaTeX is the way to go. Here's a minimal example of LaTeX in Russian, from when I recently typeset a poem by Gennady Aigi. See how easy it is?

\documentclass[a4paper,12pt]{article}

\usepackage[russian]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{verse}

\begin{document}

\begin{verse}
\poemtitle{Ты моя тишина}
О тебе говорю \\
я окраинным звездам прозрачной зимы: ``о как можно \\
быть такой тишиною?..'' — \\
ею — может быть — я окружен как безмолвием поля с мерцаньем
усталиво-ясным \\
но не очиститься \\
душе моей зыбью ее и болнами неслышными \\
как проясняется сон мой — как будто давно — без меня — уже
бодрствующий \\
приснившейся в этом году белизною \\
такой милосердною — к миру... — \\
но когда-то — возможно — убудет и цельность твоя и твоя полнота
неколеблемая \\
столь простая и ясная как благодать \\
хоть на каплю слезы за меня \\
и когда я исчезну — ты выскажешь горе \\
без слов — только отблеском горя \\
а взамен — словно вздох — примешь чистую долю \\
и стойкую меру \\
такой пустоты что и жизненной будет и смертной \\
словно там где не может быть Духа \\
пребывает Его утешенье... — \\
но — люблю я и знаю: для Бога нетронутой \\
сохранится твоя тишина.
\end{verse}
\end{document}

If you want to compile this, you'll need the verse package from CTAN (http://www.ctan.org).

ru_tex

Date: 2006-03-16 07:58 am (UTC)
From: [identity profile] anjey.livejournal.com
I am, personally, not use the Russian in my Tex-documents, but you can find the people in [livejournal.com profile] ru_tex that used.

Date: 2006-03-16 01:12 pm (UTC)
From: [identity profile] spiderhood.livejournal.com
No-one uses plain TeX nowadays, buddy. No-one. LaTeX 2 is in now.

Date: 2006-03-17 01:36 pm (UTC)
From: [identity profile] asher-kat.livejournal.com
If it's got to be TeX, there's Omega (http://en.wikipedia.org/wiki/Omega_(TeX)), but I never tried it.

Date: 2006-03-17 02:09 pm (UTC)
From: [identity profile] stpetersburg.livejournal.com
I'm guessing, then, that your professor refuses to program in any language except FORTRAN 77.

Date: 2006-03-17 12:21 pm (UTC)
From: [identity profile] gdt.livejournal.com
look here:
http://www.ctan.org/tex-archive/systems/win32/bakoma/language/russian.html
Page generated Jan. 28th, 2026 09:38 am
Powered by Dreamwidth Studios