Most applications need to be compiled as ``8-bit-clean'' to work well with European characters. Actually they often need a few extra hints to get it right.
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'
You could also choose to load a unicode font, which (in my opinion) is much
nicer than lat1-16.psf
and seems to be more stable:
setfont /usr/lib/kbd/consolefonts/iso01.f16
mapscrn /usr/lib/kbd/consoletrans/iso01.uni
echo -ne '\033(K'
If you use Linux kernels v1.3.1 or higher, you don't need the mapscrn
and echo
statements when you use unicode fonts.
Note: This only has effect under plain Linux.
Type dumpkeys -l | less
at the prompt to find out which characters
that are readily available. You can map them to your keyboard via the keymap
files mentioned in section
Loading a keytable.
A number of applications demand special attention. This section describes how to set up configuration files for them.
bash
:Put the following in 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 LANG C
Actually you just have to define one of the environment variables LANG
or LC_CTYPE
. The value doesn't matter. Read the tcsh
man page for
more information.
ls
:Issue the command as
ls -N
or possibly
ls --8bit
less
:Set the following environment variable:
LESSCHARSET=latin1
elm
:Put the following definitions in your ~/.elm/elmrc
file:
charset = iso-8859-1
displaycharset = iso-8859-1
textencoding = 8bit
This may not work on some versions of elm
.
pine
:Put the following definition in your ~/.pinerc
file:
character-set=ISO-8859-1
This can also be set via the Setup
option in pine
.
tin
:Put the following definitions in your ~/.tin/headers
file:
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Now you can post messages with the proper Danish characters in the message
body.
lynx
:Put the following definition in your ~/.lynxrc
file:
character_set=ISO Latin 1
This can also be set via the Options
menu in lynx
. Type `o' and set
the relevant option.
telnet
:Put one line of the following type in your ~/.telnetrc
file for
each host you want to log on to using telnet
:
<hostname> set outbinary true
Example:
localhost set outbinary true
foo.bar.dk set outbinary true
kermit
:This is as close as I can get, but not completely satisfying yet. Put the
following in your ~/.kermrc
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
:Put the following in your ~/.emacs
or the the system-wide
initialization file (probably /usr/lib/emacs/site-lisp/default.el
or
/usr/share/emacs/site-lisp/default.el
):
(standard-display-european t)
(set-input-mode (car (current-input-mode))
(nth 1 (current-input-mode))
0)
Dead keys should work under GNU emacs provided you use GNU emacs v19.30 or
higher and XFree86 v3.1.2 or higher (it works for me anyway), 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 SunSite DK server (see section
FTP and Web sites.) There are also two packages called
iso-acc.elc
and iso-trans.elc
included with emacs that has similar
functionality, but they are not nearly as powerful.
ispell
- Spell checking in Danish :First make sure that you install version 3.1 instead of version 4.0 of
ispell
. The latter is obsolete and multiple 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
Aalborg University Center. Follow the compilation instructions
and you should have no trouble (One caveat: When defining the variables
necessary for compilation you must 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 don't want LaTeX to put in English words like ``Chapter'' at the beginning of every chapter or use English typesetting conventions.
Under LaTeX2e the header should look something like this:
\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[danish]{babel}
The first usepackage
statement ensures that LaTeX will interpret
European characters correctly, so you don't have to use escape codes for
European characters. The second isn't strictly necessary; but it is
recommended to include it to use the new DC-fonts (which of course must be
installed). These two packages are most likely included in your TeX
distribution. The last usepackage
statement defines a range
of standards for use in Danish texts.
If you use the Debian distribution (or older Slackware) you'll have to install
Danish hyphenation tables yourself (Dansk: ``hyphenation''=``orddeling'').
These are available from
Aalborg University Center. The files you need are
dkhyphen.tex
, dkcommon.tex
and dkspecial.tex
. If
you use the teTeX distribution (distributed with e.g. RedHat and S.u.S.E.)
you already have the relevant files. Essentially you need to put these into
the directory containing international hyphenation tables, edit the
appropriate language dependency file (usually called language.dat
) and
finally rebuild LaTeX with initex
. Before you do anything, please
make sure you know what files you are changing and back them up in advance.
If you use NTeX (distributed with the Slackware distribution) you will have
a configuration script called ntm-ltx.cfg
located in
/usr/lib/texmf/tools/
. In that case put the hyphenation tables in
the the relevant directory (most likely called
/usr/lib/texmf/tex/hyphenation/
) and run the script. It will guide
you through the various steps described below. If you use teTeX there's a
somewhat more advanced program called texconfig
to help you.
Below is a description for enabling Danish hyphenation by hand. 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 in
/usr/lib/texmf/texmf/tex/generic/hyphen/
. Try issuing the command
find /usr/lib/ -iname '*hyph*' -print
if you can't find the directory.language.dat
. In the teTeX
distribution you can just uncomment the appropriate line. Otherwise insert a
line reading
danish dkhyphen.tex
If you have difficulty finding language.dat
try issuing the command
find /usr/lib/ -name language.dat -print
latex.fmt
. It could be in a
variety of places. Use find /usr/lib/ -name latex.fmt -print
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 be reasonably correct, quotation marks follow
Danish conventions, chapters are now called ``Kapitel'' instead of ``Chapter''
etc.All new Linux distributions now includes LaTeX2e.
(Note for non-Danish readers: The process is similar for other Western European languages, and the necessary files are normally included in the Linux distributions.)
In LaTeX 2.09, use
\documentstyle[a4,isolatin]{article}
to include support for ISO-8859-1 characters and European paper sizes.
isolatin.sty
is available from all DANTE servers (see section
FTP and Web sites) and from
Michael Gschwind's FTP site. 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.