In general applications need to be compiled as "8-bit-clean" to
work well with European charaters. Actually they often need a few extra
hints to get it right. You are advised to define the environment
variable LC_CTYPE
to iso_8859_1
right away. You should
put this definition both in /etc/profile
(for bash
users)
and also in /etc/csh.cshrc
(for tcsh
users.) Similarly
you should (for the sake of principle) put something like this in
your .Xdefaults
or .Xresources
file:
*basicLocale: C
*timeFormat: C
*numeric: C
*displayLang: iso_8859_1
*inputLang: iso_8859_1
A number of applications demand special attention. This section describes how to set up configuration files for them.
bash
v.1.13+ :Put the following in your /etc/inputrc
or your
~/.inputrc
file
set meta-flag on
set convert-meta off
set output-meta on
tcsh
:Put the following in your /etc/csh.cshrc
or .tcshrc
file
setenv LC_CTYPE iso_8859_1
stty pass8
Note: If this doesn't work your copy of tcsh
was probably not
compiled with NLS support or possibly it's version 6.03 or lower.
ls
:Issue the command as
ls -N
or possibly
ls --8bit
less
:Set the following environment variable
LESSCHARSET=latin1
elm
:Set the following environment variables
LANG=C
LC_CTYPE=iso_8859_1
Some versions of elm
require that your put the following
definitions in your ~/.elm/elmrc/
file:
charset = iso-8859-1
displaycharset = iso-8859-1
textencoding = 8bit
telnet
:Put the following line in your ~/.telnetrc
file
set binary true
kermit
:This is as close as I can get, but not completely satisfying yet: Put
the following in your ~/.emacs
file
set terminal bytesize 8
set command bytesize 8
set file bytesize 8
set language danish
set file character-set latin1-iso
set transfer character-set latin1-iso
set terminal character-set latin1-iso
I think there are more variables to set, but they are hiding. You
would have to modify these settings if the remote system is DOS or
OS/2 based.
emacs
:In version 19.26 or later of GNU emacs you can
simply set the
environment variable LC_CTYPE
to iso_8859_1
like you do for
tcsh and elm. If you use an older version put the following in your
.emacs
or the
/usr/lib/emacs/site-lisp/default.el
file:
(standard-display-european t)
(set-input-mode (car (current-input-mode))
(nth 1 (current-input-mode))
0)
Dead key functionality should work under GNU emacs provided
you use GNU emacs v19.30 or higher and XFree86 v3.1.2 or
higher, so don't start researching available elisp packages
implementing "electric keys" or anything like that. If you want to
implement European keyboard conventions in emacs without upgrading the
best choice is probably the remap
package available from the AUC
FTP server (see section
References and FTP sites.)
ispell
- Spell checking in Danish :First make sure you
install version 3.1 instead of version 4.0 of ispell
.
The latter is obsolete and multiply brain-damaged. You can download
the sources for ispell
at the GNU archive at
prep.ai.mit.edu
, and you can get a Danish dictionary via FTP
from ftp.iesd.auc.dk
in /pub/packages/dkispell/
. Follow
the
compilation instructions and you should have no trouble (One caveat:
When
defining the variables necessary for compilation you should slightly
confusingly tell ispell that Linux is a Sys V type OS by defining the
variable USG
.)
(Note for non-Danish readers: You can find dictionaries for most
Western languages by reading the file Where
included with the
sources for ispell
.)
There are several problems with TeX/LaTeX: You want LaTeX to understand the special characters, and you also want the output to follow Danish conventions and so forth.
Under LaTeX2e the header should look something like this:
\documentclass{article}
\usepackage{a4}
\usepackage{isolatin1}
\usepackage[danish]{babel}
The first usepackage
statement obviously sets the paper size
to A4. The second makes sure LaTeX will interpret European characters
correctly, so that you don't have to use pesky escape codes for
European characters. These two packages are likely to be
included in your TeX distribution. The last usepackage
statement
implements a range of standards for use in a Danish text.
This last bit is tricky because it will most likely not have been
built into your version of LaTeX and you'll need to do this yourself.
You will need some Danish hyphenation patterns (Dansk: orddeling)
These are available at ftp://ftp.iesd.auc.dk/pub/packages/
.
The files you need are dkhyphen.tex
, dkcommon.tex
and dkspecial.tex
. If you use the teTeX distribution
(distributed with e.g. RedHat) you already have the relevant files.
Essentially you need to put these into the directory containing
international hyphenation patterns, edit the appropriate language
dependency file (usually called language.dat
) and
finally rebuild LaTeX with initex
. Before you do anything
rash please make sure you know what files you are changing and back
them up in advance.
Below is a procedure for enabling danish hyphenation. If it looks vague it's because TeX/LaTeX installations differ very much in their choice of path-names.
/usr/lib/texmf/tex/hyphenation/
, under teTeX it's
/usr/lib/texmf/texmf/tex/generic/hyphen/
. Try issuing a
command find /usr/lib/ -iname '*hyph*'
if you can't find
the directory.language.dat
.
In the teTeX distribution you can just uncomment the appropriate line.
If you downloaded the hyphenation pattern insert a line reading
danish dkhyphen.tex
If you have difficulty finding language.dat
try issuing the command
find /usr/lib/ -name language.dat
latex.fmt
. It could be in a variety
of places. Use find /usr/lib/ -name latex.fmt
to find it.latex.fmt
. Issue
the command initex latex.ltx
. Pray. If everything went well
you now have a new version of latex.fmt
.
\usepackage[danish]{babel}
in your LaTeX
headers. Hyphenation should now
be reasonably correct, quotation marks follow Danish conventions
and chapters are now called "Kapitel" instead of "Chapter" etc.If you use N-TeX you will have a configuration script called
ntm-ltx.cfg
located in /usr/lib/texmf/tools/
.
In that
case simply put the hyphenation patterns in the the relevant
directory (most likely called /usr/lib/texmf/tex/hyphenation/
)
and run the script. It will the prompt you to do the various
steps described above.
(Note for non-Danish readers: The process is similar for other Western
European languages, and the necessary files are mostly included by
default. Simply executing the command
/usr/lib/texmf/tools/ntm-ltx.cfg
and following the
instructions will be enough for almost all major Western languages.)
In LaTeX 2.09, use
\documentstyle[a4,isolatin]{article}
to include support for ISO latin1 characters and European paper-sizes.
isolatin.sty
is available from all DANTE (see servers and
from URL ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit
. It
should also be included in the standard Linux distributions.
Note: Some people prefer using emacs in a special mode which translates "special" letters into TeX escape codes, but this method should be obsolete by now.
Type dumpkeys -l | less
at the prompt to find out what is
readily available. You can map them to your keyboard via the keymap
files mentioned in section
loading a keytable.
0 X11R5 Note: The dead keys don't get the correct names under X11R5 with this scheme. Generally
dead_*
(under plain Linux) => D*
or D*_accent
(under X11R5)
(i.e. the tilde may be dead_tilde
in dk-latin1.map
but X11R5
expects the dead tilde to be called Dtilde
.) This does not apply
to X11R6.
Execute the following commands under the bash
shell:
setfont /usr/lib/kbd/consolefonts/lat1-16.psf
mapscrn /usr/lib/kbd/consoletrans/trivial
echo -ne '\033(K'
Note: This only has effect under plain Linux on the console.