<HTML ><HEAD ><TITLE >Editing texts</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK REL="HOME" TITLE="Belarusian-HOWTO " HREF="index.html"><LINK REL="PREVIOUS" TITLE="System-wide setup" HREF="x28.html"><LINK REL="NEXT" TITLE="Browsers" HREF="x268.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Belarusian-HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="x28.html" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x268.html" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="AEN188" >3. Editing texts</A ></H1 ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="EMACS" >3.1. Emacs</A ></H2 ><P > Emacs is able to display Belarusian characters out of box in many Linux distributions. However, the following conditions should satisfy: <P ></P ><UL ><LI ><P > Cyrillic iso-8859-5 fonts should be installed. </P ></LI ><LI ><P > Emacs-mule package should be installed. </P ></LI ></UL > </P ><P > The user may want to change the default keyboard layout ("input method" in emacs slang) to jcuken. This feature is provided by <TT CLASS="FILENAME" >belarusian.el</TT > along with some other goodies. Read the comments in the beginning of <TT CLASS="FILENAME" >belarusian.el</TT > for details on the setup procedure. </P ><P > After installing <TT CLASS="FILENAME" >belarusian.el</TT >, you will be able to switch the input method, by typing <B CLASS="KEYCAP" >C</B >-<B CLASS="KEYCAP" >\</B >-<B CLASS="KEYCAP" >cyrillic-belarusian</B >-<B CLASS="KEYCAP" >RET</B > </P ><P > For a more user-friendly setup, put the following lines in the .emacs file: <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="SCREEN" > ;; enables PC-like key mappings (pc-bindings-mode) ;; enables PC-like selection (pc-selection-mode) ;; highlight selection (transient-mark-mode t) ;; use as many multilingual fonts as possible (set-default-font "fontset-standard") ;; set up windows-1251 as default encoding everywhere (codepage-setup 1251) (set-terminal-coding-system 'cp1251) (set-keyboard-coding-system nil) (setq default-buffer-file-coding-system 'cp1251) (set-selection-coding-system 'cp1251) (prefer-coding-system 'cp1251) (define-coding-system-alias 'windows-1251 'cp1251) (define-coding-system-alias 'microsoft-1251 'cp1251) (define-coding-system-alias 'microsoft-cp1251 'cp1251) (define-coding-system-alias 'windows-cp1251 'cp1251) (define-coding-system-alias 'koi8-u 'cyrillic-koi8) (define-coding-system-alias 'KOI8-R 'cyrillic-koi8) (modify-coding-system-alist 'file "\.*" 'cp1251) (modify-coding-system-alist 'file "\\.el$" 'iso-2022-7bit) </PRE ></TD ></TR ></TABLE > This configuration is for windows-1251 setup. </P ></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="SPELL-CHECKING" >3.2. Spell-checking</A ></H2 ><P > <P ></P ><UL ><LI ><P > If you do not have ispell 3.1.20, install it from any Linux distribution CD. </P ></LI ><LI ><P > Download the package <A HREF="http://bellinux.sourceforge.net/belspell.tar.gz" TARGET="_top" >belspell.tar.gz</A >. Unpack it and run <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="90%" ><TR ><TD ><PRE CLASS="SCREEN" >buildhash belarusian.sml belarusian.aff belarusian.hash </PRE ></TD ></TR ></TABLE > </P ></LI ><LI ><P > Copy <TT CLASS="FILENAME" >belarusian.hash</TT > to <<TT CLASS="FILENAME" >/usr/lib/ispell</TT > or wherever your ispell hash tables are. </P ></LI ><LI ><P > in order to spell-check a file, type <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="90%" ><TR ><TD ><PRE CLASS="SCREEN" >ispell -d belarusian yourfile.txt </PRE ></TD ></TR ></TABLE > </P ></LI ></UL > </P ><P > Getting belarusian ispell dictionary working with emacs is a bit tricky. <P ></P ><UL ><LI ><P > Copy <TT CLASS="FILENAME" >ispell.el</TT > and <TT CLASS="FILENAME" >ispell.elc</TT > into your <TT CLASS="FILENAME" >$EMACSBIN/../lisp</TT > directory. </P ></LI ><LI ><P > Copy temporarily <TT CLASS="FILENAME" >$EMACSBIN/../lisp/loaddefs.el</TT > to <TT CLASS="FILENAME" >/usr/src/emacs-XX.X/lisp/loaddefs.el</TT > where XX.X stand for emacs version number. </P ></LI ><LI ><P > <B CLASS="KEYCAP" >M</B >-<B CLASS="KEYCAP" >x</B >-<B CLASS="KEYCAP" >update-file-autoloads</B >-<B CLASS="KEYCAP" >RET</B > and enter the path to the ispell.el. </P ></LI ><LI ><P > Copy back <TT CLASS="FILENAME" >loaddefs.el</TT > </P ></LI ><LI ><P > Restart emacs </P ></LI ></UL > </P ></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="AEN250" >3.3. TeX</A ></H2 ><P > from Aleksey Novodvorsky: </P ><P > You need TeX + babel + T2, e.g. teTeX >= 1.0. in order to get partial support for Belarusian, <P ></P ><UL ><LI ><P > put <TT CLASS="FILENAME" >babel.sty</TT > , <TT CLASS="FILENAME" >belarusianb.ldf</TT > and <TT CLASS="FILENAME" >belarusianb.sty</TT > into <TT CLASS="FILENAME" >/usr/share/texmf/tex/generic/babel</TT > </P ></LI ><LI ><P > run <TT CLASS="FILENAME" >texhash</TT > </P ></LI ><LI ><P > To use Belarusian in LaTeX: add the following lines in the preamble: <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="90%" ><TR ><TD ><PRE CLASS="SCREEN" >\documentclass[belarusian]{article} \usepackage[cp1251]{inputenc} \usepackage{babel} </PRE ></TD ></TR ></TABLE > or <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="90%" ><TR ><TD ><PRE CLASS="SCREEN" >\documentclass[belarusian]{article} \usepackage[iso88595]{inputenc} \usepackage{babel} </PRE ></TD ></TR ></TABLE > </P ></LI ></UL > </P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="x28.html" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="x268.html" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >System-wide setup</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Browsers</TD ></TR ></TABLE ></DIV ></BODY ></HTML >