old-www/HOWTO/Danish-HOWTO-3.html

385 lines
11 KiB
HTML
Raw Permalink Blame History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>The Linux Danish/International HOWTO: Display and application setup</TITLE>
<LINK HREF="Danish-HOWTO-4.html" REL=next>
<LINK HREF="Danish-HOWTO-2.html" REL=previous>
<LINK HREF="Danish-HOWTO.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="Danish-HOWTO-4.html">Next</A>
<A HREF="Danish-HOWTO-2.html">Previous</A>
<A HREF="Danish-HOWTO.html#toc3">Contents</A>
<HR>
<H2><A NAME="s3">3. Display and application setup</A><!--Danish!display configuration--><!--Danish!application configuration--></H2>
<P>Most applications need to be compiled as ``8-bit-clean'' to work well with
European characters. Some need a few extra hints to get it right.
<P>
<H2><A NAME="ss3.1">3.1 Loading the ISO-8859-1 font on the console</A>
<!--Danish!application!font loading--><!--Danish!application!ISO-8859-1 font--></H2>
<P>Execute the following commands from your shell prompt:
<PRE>
setfont lat1u-16.psf
</PRE>
<P>In Red Hat Linux 5.2 and higher you can do this by adding these lines to
<CODE>/etc/sysconfig/i18n</CODE>:
<PRE>
SYSFONT=lat1u-16.psf
SYSTERM=linux
</PRE>
Due to a bug in the <CODE>ncurses</CODE> package on Red Hat Linux 5.2, you also
have to change ``linux-lat'' to ``linux'' in <CODE>/etc/profile.d/lang.sh</CODE>.
This is not necessary in Red Hat Linux 6.0.
<P>
<H2><A NAME="ss3.2">3.2 The Euro symbol</A>
<!--Danish!the Euro symbol--></H2>
<P>A new symbol has been added to the Danish character set: The symbol for the
Euro (the new currency of the European Monetary Union.) A new character set
called ISO-8859-15 a.k.a. latin0 (or latin9) has been created to replace
ISO-8859-1 (latin1.) You must use the
<A HREF="ftp://ftp.freshmeat.net/pub/euro-patch/">EURO</A> package to get support for
latin0. The package includes both fonts and keymaps.
<P>
<H2><A NAME="ss3.3">3.3 Characters you can display under Linux</A>
<!--Danish!displayable characters--></H2>
<P>Type <CODE>dumpkeys -l | less</CODE> 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
<A HREF="Danish-HOWTO-2.html#loadkbd">Loading a keytable</A>.
<P>
<H2><A NAME="apps"></A> <A NAME="ss3.4">3.4 International character sets in specific applications</A>
<!--Danish!applications!character sets in--></H2>
<P>A number of applications demand special attention. This section describes
how to set up configuration files for them.
<P>
<DL>
<DT><B><CODE>bash</CODE>:</B><DD><P>
<!--
Danish!applications!bash
-->
Put the following in your <CODE>~/.inputrc</CODE> file:
<PRE>
set meta-flag on
set convert-meta off
set output-meta on
</PRE>
<P>
<DT><B><CODE>elm</CODE>:</B><DD><P>
<!--
Danish!applications!elm
-->
Put the following definitions in your <CODE>~/.elm/elmrc</CODE> file:
<PRE>
charset = iso-8859-1
displaycharset = iso-8859-1
textencoding = 8bit
</PRE>
<P>This may not work on some versions of <CODE>elm</CODE>. You can get partial <B>MIME</B>
support in <CODE>elm</CODE> if you use <CODE>metamail</CODE>.
<P>
<DT><B><CODE>emacs</CODE>:</B><DD><P>
<!--
Danish!applications!emacs
-->
Put the following in your <CODE>~/.emacs</CODE> or the the system-wide
initialization file (probably <CODE>/usr/lib/emacs/site-lisp/default.el</CODE> or
<CODE>/usr/share/emacs/site-lisp/default.el</CODE>):
<PRE>
(standard-display-european t)
(set-input-mode (car (current-input-mode))
(nth 1 (current-input-mode))
0)
</PRE>
<P>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 do not 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 <CODE>remap</CODE>
package available from
<A HREF="ftp://sunsite.auc.dk/pub/emacs/auctex/ftp/auctex/">SunSite DK</A>.
There are also two packages called <CODE>iso-acc.elc</CODE> and <CODE>iso-trans.elc</CODE>
included with emacs that have similar functionality, but they are not nearly
as powerful.
<P>
<DT><B><CODE>groff</CODE>:</B><DD><P>
<!--
Danish!applications!groff
-->
Issue the command as
<PRE>
groff -Tlatin1 &lt;your_groff_input_file>
</PRE>
if you want ISO-8859-1 text output.
<P>Remember to change this in <CODE>/etc/man.config</CODE> to get latin1 characters
working in <CODE>man</CODE> (don't remove the <CODE>-mandoc</CODE> switch.)
<P>
<DT><B><CODE>ispell</CODE> --- Spell checking in Danish:</B><DD><P>
<!--
Danish!applications!ispell
-->
First make sure that you install version 3.1.20 instead of version 4.0 of
<CODE>ispell</CODE>. The latter is obsolete and multiple brain-damaged. You can
download the sources for <CODE>ispell</CODE> at
<A HREF="ftp://sunsite.auc.dk/pub/gnu/">the GNU archive</A>
and you can get a Danish dictionary from
<A HREF="http://www.sslug.dk/ispell/idanish/dansk.html">SSLUG</A>. 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 SysV type OS by defining the variable <CODE>USG</CODE>.)
<P>When you have installed the Danish dictionary for <CODE>ispell</CODE> you can check
the spelling of a Danish language file by executing the command:
<PRE>
ispell -d danish -T latin1 -w "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" &lt;your_danish_text_file>
</PRE>
<P>(Note for non-Danish readers: You can find dictionaries for most Western
languages by reading the file <CODE>Where</CODE> included with the sources for
<CODE>ispell</CODE>.)
<P>
<DT><B><CODE>joe</CODE>:</B><DD><P>
<!--
Danish!applications!joe
-->
Issue the command as
<PRE>
joe -asis
</PRE>
or put the following in your <CODE>~/.joerc</CODE> file:
<PRE>
-asis
</PRE>
<P>The hyphen character <EM>must</EM> be in the first column.
<P>
<DT><B><CODE>kermit</CODE>:</B><DD><P>
<!--
Danish!applications!kermit
-->
This is as close as I can get, but not completely satisfying yet. Put the
following in your <CODE>~/.kermrc</CODE> file:
<PRE>
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
</PRE>
<P>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.
<P>
<DT><B><CODE>less</CODE>:</B><DD><P>
<!--
Danish!applications!less
-->
Set the following environment variable:
<PRE>
LESSCHARSET=latin1
</PRE>
This is not necessary if your system support locales. Then you should just
set <CODE>LANG</CODE>, <CODE>LC_CTYPE</CODE> or <CODE>LC_ALL</CODE> (see section
<A HREF="Danish-HOWTO-5.html#locale">Locale support in libc 5.4.x and higher</A>.)
<P>
<DT><B><CODE>ls</CODE>:</B><DD><P>
<!--
Danish!applications!ls
-->
Issue the command as
<PRE>
ls -N
</PRE>
or possibly
<PRE>
ls --8bit
</PRE>
<P>
<DT><B><CODE>lynx</CODE>:</B><DD><P>
<!--
Danish!applications!lynx
-->
Put the following definition in your <CODE>~/.lynxrc</CODE> file:
<PRE>
character_set=ISO Latin 1
</PRE>
<P>This can also be set via the <CODE>Options</CODE> menu in <CODE>lynx</CODE>. Type `o' and set
the relevant option.
<P>
<DT><B><CODE>man</CODE>:</B><DD><P>
<!--
Danish!applications!man
-->
See entry for <CODE>groff</CODE> in this section.
<P>
<DT><B><CODE>metamail</CODE>:</B><DD><P>
<!--
Danish!applications!metamail
-->
Set the following environment variable:
<PRE>
MM_CHARSET=ISO-8859-1
</PRE>
<P>
<DT><B><CODE>nn</CODE>:</B><DD><P>
<!--
Danish!applications!nn
-->
Put the following in your <CODE>~/.nn/init</CODE> file:
<PRE>
set data-bits 8
</PRE>
<P>
<DT><B><CODE>pine</CODE>:</B><DD><P>
<!--
Danish!applications!pine
-->
Put the following definition in your <CODE>~/.pinerc</CODE> file:
<PRE>
character-set=ISO-8859-1
</PRE>
<P>This can also be set via the <CODE>Setup</CODE>, <CODE>Config</CODE> menu option in <CODE>pine</CODE>.
It won't hurt to enable <CODE>enable-8bit-esmtp-negotiation</CODE> and
<CODE>enable-8bit-nntp-posting</CODE> (for news) in that menu too.
<P>
<DT><B><CODE>rlogin</CODE>:</B><DD><P>
<!--
Danish!applications!rlogin
-->
Issue the command as
<PRE>
rlogin -8 foo.bar.dk
</PRE>
<P>
<DT><B><CODE>sendmail</CODE>:</B><DD><P>
<!--
Danish!applications!sendmail
-->
Put (or uncomment) the following in your <CODE>/etc/sendmail.cf</CODE> file:
<PRE>
O SevenBitInput=False
O EightBitMode=pass8
O DefaultCharSet=iso-8859-1
</PRE>
<P>
<DT><B><CODE>tcsh</CODE>:</B><DD><P>
<!--
Danish!applications!tcsh
-->
Put the following in your <CODE>/etc/csh.login</CODE> or <CODE>~/.tcshrc</CODE>
file:
<PRE>
setenv LANG C
</PRE>
<P>Actually you just have to define one of the environment variables <CODE>LANG</CODE>
or <CODE>LC_CTYPE</CODE>. The value does not matter. Read the <CODE>tcsh</CODE> man
page for more information.
<P>
<DT><B><CODE>telnet</CODE>:</B><DD><P>
<!--
Danish!applications!telnet
-->
Put one line of the following type in your <CODE>~/.telnetrc</CODE> file for
<B>each</B> host you want to log on to using <CODE>telnet</CODE>:
<PRE>
&lt;hostname> set outbinary true
</PRE>
<P>Example:
<PRE>
localhost set outbinary true
foo.bar.dk set outbinary true
</PRE>
<P>
<A NAME="latex"></A> <DT><B>TeX/LaTeX:</B><DD><P>
<!--
Danish!applications!TeX
-->
<!--
Danish!applications!LaTeX
-->
There are several problems with TeX/LaTeX: You want LaTeX to understand
the special characters and you do not want LaTeX to put in English words
like ``Chapter'' at the beginning of every chapter or use English typesetting
conventions.
<P>Under LaTeX2e the header of your input file should look something like this:
<PRE>
\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[danish]{babel}
</PRE>
<P>The first <CODE>usepackage</CODE> statement ensures that LaTeX will interpret
European characters correctly, so you do not have to use escape codes for
European characters. The second one is not strictly necessary, but it is
recommended including it to use the new EC fonts (previously called DC
fonts.) The third <CODE>usepackage</CODE> statement defines a range of standards
for typesetting texts in Danish.
<P>All the major Linux distributions now includes the <B>teTeX</B> package. To
set up teTeX you must run the script <CODE>texconfig</CODE>. Here you can choose
Danish hyphenation (dansk: ``orddeling''), A4 papersize for <CODE>dvips</CODE> and
<CODE>xdvi</CODE> etc.
<P>All new Linux distributions include LaTeX2e, but on older systems you might
come across LaTeX 2.09. If that happens you can use
<PRE>
\documentstyle[a4,isolatin]{article}
</PRE>
to include support for ISO-8859-1 characters and European paper sizes. A
better thing to do would be to ask your system administrator to upgrade
to LaTeX2e.
<P><CODE>isolatin.sty</CODE> is available from all
<A HREF="ftp://sunsite.auc.dk/pub/tex/ctan/">CTAN servers</A>.
<P>Some people prefer to use emacs in a special mode which translates ``special''
letters into TeX escape codes, but this method is obsolete.
<P>
<DT><B><CODE>tin</CODE>:</B><DD><P>
<!--
Danish!applications!tin
-->
Put the following definitions in your <CODE>~/.tin/headers</CODE> file:
<PRE>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
</PRE>
<P>Now you can post messages with the proper Danish characters in the message
body.
</DL>
<P>
<HR>
<A HREF="Danish-HOWTO-4.html">Next</A>
<A HREF="Danish-HOWTO-2.html">Previous</A>
<A HREF="Danish-HOWTO.html#toc3">Contents</A>
</BODY>
</HTML>