moved to docbook sgml

This commit is contained in:
gferg 2001-03-08 20:16:39 +00:00
parent ef65c9d4e0
commit 75576b8672
1 changed files with 0 additions and 395 deletions

View File

@ -1,395 +0,0 @@
<!doctype linuxdoc system>
<article>
<title>Linux Belarusian HOWTO <author>Alexander Mikhailian,
mikhailian@altern.org <date>v.0.1.4, 25 June 2000
<abstract>
Short guide in setting up Belarusian language support in Linux
console, X Window System, web-browsers, text editors, etc. Charsets
described are windows-1251, iso-8859-5 and koi8-ru. Belarusian
characters can also be found in koi8-ub, koi8-c and of course,
Unicode. Although this HOWTO is Linux-specific, many advices are
applicable to other UNIX-like systems.
</abstract>
<toc>
<sect>Introduction
<sect1> History
<p>
This document was started in September 15, 1999 by Alexander Mikhailian
<sect1>Comments
<p>
Comments on this HOWTO may be directed to the author <htmlurl
url="mailto:mikhailian@altern.org" name="mikhailian@altern.org">.
<sect1>New Versions
<p>
The newest version can always be found on <htmlurl
url="http://www.bellinux.f2s.com/" name="http://www.bellinux.f2s.com">
<sect1>Copyright
<p>
This manual may be reproduced in whole or in part without restrictions.
<sect1>Acknowledgements and Thanks
<p>
Thanks to everyone that gave comments as I was writing this.
<sect>System-wide setup
<sect1>Choosing Charset
<p>
As for now, the best choice seems to be windows-1251. It gives the
user compatibility with MS Windows which is a must-have for many
of us. If you do not care about compatibility, iso-8859-5 is the best
supported and easiest to set up.
<p>
Note that Belarusian support package from <htmlurl
url="http://www.bellinux.f2s.com/" name="http://www.bellinux.f2s.com">
contains all the files mentioned in the present HOWTO unless otherwise
stated in the text.
<sect1>Windows-1251 in the kernel
<p>
Windows-1251 support in the kernel is needed mostly to visualize MS
Windows filenames in Cyrillic with the console and X Window system
localized in windows-1251. As latest FAT file systems store filenames
in Unicode, we have to define the output charset of the Virtual
File System layer. To apply the windows-1251 patch to the kernel:
<itemize>
<item>
<tscreen>
<verb>
cd /path_to_your_kernel_source_tree
</verb>
</tscreen>
<item>
<tscreen>
<verb>
patch -p0 &lt your_patch.patch
</verb>
</tscreen>
<item>
Recompile and reinstall the kernel. Refer to <em/Kernel-HOWTO/ about the details.
<item>
Add `codepage=866,iocharset=microsoft-cp1251' to your mount options in
order to get the filenames in windows-1251.
</itemize>
<sect1>Setting locale
<p>
<itemize>
<item>Do
<tscreen>
<verb>
localedef -f CP1251 -i be_BY be_BY
</verb>
</tscreen>
or
<tscreen>
<verb>
localedef -f ISO8899-5 -i be_BY be_BY
</verb>
</tscreen>
to compile the locale in windows-1251 encoding or iso-8859-5 encoding.
<item> Check how it works by setting LANG=be_BY and running a
locale-aware program like <em/date/ or <em/cal/.
</itemize>
<sect1>Belarusian in console<label id="Console">
<sect2>Setting Belarusian with iso-8859-5
<p>
There are two ways to set up Belarusian with iso-8859-5
<itemize>
<item> Load iso-8859-5 font <item> Load <em/by2.kmap/ keymap or
<em/by.kmap/ </itemize> Look at the scripts by.iso and by2.iso for an
example. This method has one serious drawback - you will loose all
pseudographic characters and, say, you Midnight Commander will look
somewhat naked. The second method described below preserves all
pseudographic characters:
<itemize>
<item>Load UniCyr font <item>Load <em/by2.kmap/ keymap or <em/by.kmap/
<item>Load Application-Charset Map <em/iso05.acm/
</itemize>
Look at the scripts by.iso2 and by2.iso2 for an example. Also beware
that different Linux distributions have different console-related
packages - <em/console-tools/ or <em/kbd/. Abovementioned scripts are
meant to work with <em/console-tools/ which is by far more popular.
<sect2>Setting Belarusian with windows-1251
<p>
There is no windows-1251 console fonts and the only way to get it work
is
<itemize>
<item> Load UniCyr font <item> Load <em/by2.kmap/ keymap or
<em/by.kmap/ <item> Load Application-Charset Map <em/cp1251.acm/
</itemize>
Look at the script by2.win for an example.
<sect2>Setting Belarusian with koi8-ru
<p>
There is no koi8-ru console fonts and the only way to get it work
is
<itemize>
<item> Load UniCyr font
<item> Load <em/by-stb.koi.kmap/ keymap or <em/byru-stb.koi.kmap/
<item> Load Application-Charset Map <em/koi8-ru.acm/
</itemize>
Look at the scripts by-stb.koi and byru-stb.koi for an example.
<sect1>Belarusian in X Window System<label id="X Window">
<p>
Dirty hack:
<itemize>
<item> Install Cyrillic fonts for X Windows. You can only use
iso-8859-5, koi8-ru and microsoft-1251. BTW, there is a big difference
between koi8-ru and koi8-r. The latest does not have CYRILLIC LETTER
BYELORUSSIAN-UKRAINIAN I and CYRILLIC LETTER SHORT U. <item> Make and
install xruskb package which can be downloaded from <htmlurl
url="http://www.bellinux.f2s.com" name="http://www.bellinux.f2s.com">
<item> Replace .xmm files in your xruskb directory by those found in
the folder modified_keymaps of belarusian-0.1.tar.gz distribution.
<item> Add the following lines in your ~/.Xdefaults file
<tscreen>
<verb> xrus*modeButton1.labelString: BEL xrus*modeButton1.label: BEL
</verb>
</tscreen>
<item>Run
<tscreen>
<verb>xrus jcuken-cp1251</verb>
</tscreen>
or
<tscreen>
<verb>xrus jcuken-iso5</verb>
</tscreen>
to start keyboard switcher.
</itemize>
<p>
Right solution:
A patch to XFree 3.3.5 and 4.0 from Aleksey Novodvorsky that allows
the use of windows-1251 with XKB. The original location is at <htmlurl
url=" ftp.logic.ru/pub/logic/linux/be-locale" name="
ftp.logic.ru/pub/logic/linux/be-locale"> but it is also available in
Belarusian support package from <htmlurl url="http://www.bellinux.f2s.com/"
name="http://www.bellinux.f2s.com">. Lucky users of Linux-Mandrake RE
get a patched XFree86 out of box.
<sect> Editing texts
<sect1> Emacs <label id="Emacs">
<p>
For most Linux distributions, emacs is able to display Belarusian
characters out of box. However, the following conditions should
satisfy:
<itemize>
<item>
Cyrillic iso-8859-5 fonts should be properly installed.
<item>
Emacs-mule package should be installed.
</itemize>
<p>
The user may want to change the default keyboard layout (&quot;input
method&quot; in emacs slang) to jcuken. This feature is provided by
<em/belarusian.el/ along with some other goodies. Read the comments
in the beginning of <em/belarusian.el/ for details.
<sect1>Spell-checking<label id="Spell-checking"> <p>
<itemize>
<item> If you do not have ispell 3.1.20, install it from any Linux
distribution CD. <item> Download the package belspell.tar.gz.
Unpack it and run
<tscreen>
<verb>
buildhash belarusian.sml belarusian.aff belarusian.hash
</verb>
</tscreen>
<item> Copy belarusian.hash to /usr/lib/ispell or wherever your ispell
hash tables are. <item> in order to spell-check a file, type
<tscreen>
<verb>
ispell -d belarusian yourfile.txt
</verb>
</tscreen>
</itemize>
<p>
Getting belarusian ispell dictionary working with emacs is a bit
tricky.
<itemize>
<item> Copy <em/ispell.el/ and <em/ispell.elc/ into your
`$EMACSBIN/../lisp' directory. <item> Copy temporarily
`$EMACSBIN/../lisp/loaddefs.el' to
`/usr/src/emacs-XX.X/lisp/loaddefs.el' where XX.X stand for emacs
version number.<item> Do `M-x
update-file-autoloads RET' and enter the path to the ispell.el.
<item> Copy back <em/loaddefs.el/ <item> Restart emacs
</itemize>
<sect1> TeX
<p>
from Aleksey Novodvorsky:
<p>
You need TeX + babel + T2, e.g. teTeX >= 1.0. in order to get partial
support for Belarusian,
<itemize>
<item>put <em/babel.sty/, <em/belarusianb.ldf/ and
<em/belarusianb.sty/ into
&quot;/usr/share/texmf/tex/generic/babel&quot; <item> run
&quot;texhash&quot; <item> To use Belarusian in LaTeX: add the
following lines in the preamble:
<tscreen>
<verb>
\documentclass[belarusian]{article} \usepackage[cp1251]{inputenc}
\usepackage{babel}
</verb>
</tscreen>
or
<tscreen>
<verb>
\documentclass[belarusian]{article} \usepackage[iso88595]{inputenc}
\usepackage{babel}
</verb>
</tscreen>
</itemize>
<sect>Browsers
<sect1>Netscape
<p>
It is often a problem to correctly visualize Belarusian-specific
characters with Netscape. This is due to that last versions of
Netscape look for <em/any/ koi8-r font and, if they find one, they
refuse to use other fonts for displaying Cyrillic pages.
The problem is solved by removing koi8-r fonts from everywhere - X
Window System font path and font server path.Then install koi8-ru,
iso-8859-5 or windows-1251 and run
<tscreen>
<verb>
xset fp rehash
</verb>
</tscreen>
or restart X server. You will probably have to delete <em/preferences/
and <em/preferences.js/ from the Netscape home directory
<em/.netscape/ and even then you are not guaranteed to have Netscape
work right. Netscape's handling of fonts has always been an obscure
issue.
Links to koi8-ru, iso-8859-5 and windows-1251 cyrillic fonts for X
Window System can be found at
<htmlurl url="http://www.bellinux.f2s.com"
name="http://www.bellinux.f2s.com">
<sect1>Lynx
<p>
In order to view Belarusian sites, you have to set up you console to
handle the encoding you need. See section <ref id="Console"> for more
details.
<p>
Add the following lines to your <em/.linxrc/ file.
<tscreen>
<verb>
character_set=Cyrillic (windows-1251) preferred_language=be
preferred_charset=windows-1251
</verb>
</tscreen>
or
<tscreen>
<verb>
character_set=Cyrillic (ISO-8859-5) preferred_language=be
preferred_charset=iso-8859-5
</verb>
</tscreen>
<p>
If the page you are browsing does not have an explicit charset
declaration, press &quot;o&quot; and set the document charset
manually.
<sect> Mailers
<sect1> Netscape Messenger
<p>
Netscape Messenger can not handle belarusian texts properly. The same
applies to Mozilla.
<sect1> Mutt
<p>
Mutt handles a multitude of charsets and encodings with ease. If your
console has windows-1251 support, add the following lines to your
<em/.muttrc/:
<tscreen>
<verb>
charset-hook &quot;windows-1251&quot; &quot;cp1251&quot; set
charset=&quot;windows-1251&quot;
</verb>
</tscreen>
<p>
Mutt automatically converts all incoming messages for the screen
output. It can also convert outgoing messages basing itself on a
versatile pattern matching mechanism, e.g. the following line in
<em/.muttrc/ will force mutt to convert all messages sent to
be-locale@iatp.unibel.by to <em/koi8-r/.
<tscreen>
<verb>
send-hook '~t ^be-locale@iatp\.unibel\.by$' 'set
send_charset=&quot;koi8-r&quot;'
</verb>
</tscreen>
<sect> Further support
<p>
A mailing list devoted entirely to Belarusian language support is
available at <htmlurl url="mailto:be-locale@iatp.unibel.by"
name="be-locale@iatp.unibel.by">. To subscribe, send a message to
<htmlurl url="mailto:majordomo@iatp.unibel.by"
name="majordomo@iatp.unibel.by"> with the string &quot;subscribe
be-locale youremailaddress&quot; in the body of the message
<p>
Another mailing list that treats mostly linguistic issues is available
at <htmlurl url="mailto:movaznaustva@egroups.com"
name="movaznaustva@egroups.com">. To subscribe to it, send a message
with empty body to <htmlurl
url="mailto:movaznaustva-subscribe@egroups.com"
name="movaznaustva-subscribe@egroups.com">.
</article>