Next Previous Contents

5. Oppsett i andre programmer

5.1 Innledning

Mange programmer vil bli hjulpet av å sette locale. Derfor kan det være lurt å lese Locale etter Emacs og TeX/LaTeX for å lese norske tegn.

5.2 Emacs

Sett inn følgende i filen /usr/share/emacs/site-lisp/default.el


        (set-input-mode (car (current-input-mode))
                       (nth 1 (current-input-mode))
                                                 0)
        (standard-display-european t)
        (global-set-key [delete] 'delete-char)

Den siste linja er for å få delete til å virke annerledes enn backspace. (I andre distribusjoner kan filen hete /usr/bin/emacs/site-lisp/default.el)

5.3 TeX/LaTeX:

Slik ser et standard LaTeX-dokument ut :


\documentclass[a4paper,norsk]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\begin{document}
\end{document}

Det er selvsagt flere måter å sette det opp på ! Når det er skrevet kjører du latex foo.tex Da skal du få ut en foo.dvi -fil. Den kan beskues med xdvi foo.dvi

(Bruker du andre Linux-distribusjoner - se den danske HOWTO)

Du må endre filen /usr/lib/texmf/texmf/tex/generic/config/language.dat og lage en ny LateX med initex. Det er lurt å endre filnavnene før du gjør dette :) Finner du ikke language.dat der, så prøv å kjør locate language.dat (Husk at locate ikke virker før du har kjørt /etc/cron.daily/updatedb.cron eller maskinen har stått på et døgn!)

Kommenter ut linjen med

%norsk nohyph.tex

(Dvs. fjern % , sett inn % foran german ...)

Gå til

/usr/lib/texmf/texmf/web2c

og endre latex.fmt til latex.fmt.old (eller noe annet du liker).

Vær i dette directory'et når du kjører :

initex latex.ltx

Kanskje sier den at dette var 'old' ... Trykk Enter og håp på det beste !

  Nå skal   \documentclass[a4paper,norsk]{article}
  evt.      \usepackage[norsk]{babel}                 virke.

5.4 less:

Sett følgende i bash. (Legg det i filen /etc/profile eller ~/.bash_profile):

        LESSCHARSET=latin1
        export LESSCHARSET

5.5 groff:

Endre filen /etc/man.config slik at linjen med NROFF ser slik ut :

NROFF /usr/bin/groff -Tlatin1 -mandoc

5.6 man:

Se under groff:

5.7 ls:

Legg følgende i /etc/bashrc (evt. ~/.bashrc)

alias ls="ls -N"
Hos meg inneholder /etc/bashrc bl.a. disse linjene :
alias ls="ls --color=auto -N"
alias xls="ls -alFN"

(Da vil ls vise norske bokstaver og farger. xls viser ls med opsjonen -alF). Du kan altså bruke norske bokstaver i unix-filnavn !

5.8 SGML-tools

Gi kommandoene til SGML-tools opsjonen --charset=latin. Om du ønsker å konverter SGML til vanlig tekst blir da kommandoen:

sgml2txt --charset=latin foo.sgml

Resten av kapittelet er dansk HOWTO ...

5.9 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.

5.10 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.

You can leave out the first two of the lines above if you have installed locale support, and your LC_CTYPE environment variable includes one of the strings 8859-1 or 88591. See section ``Locale support in libc 5.4.x'' for some information on locales.

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 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.

5.11 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 <ftp://ftp.iesd.auc.dk/pub/packages/dkispell/>. 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 USG.)

When you have installed the Danish dictionary for ispell you can check the spelling of a Danish language file by executing the command:

ispell -d danish -T latin1 -w "æøåÆØÅ" <your_danish_text_file>

(Note for non-Danish readers: You can find dictionaries for most Western languages by reading the file Where included with the sources for ispell.)

5.12 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.

5.13 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.

5.14 metamail:

Set the following environment variable:

MM_CHARSET=ISO-8859-1

5.15 nn:

Put the following in your ~/.nn/init file:

set data-bits 8

5.16 pine:

Put the following definition in your ~/.pinerc file:

character-set=ISO-8859-1

5.17 rlogin:

Issue the command as

rlogin -8 foo.bar.dk

5.18 tcsh:

Put the following in your /etc/csh.login or ~/.tcshrc file:

setenv LANG C

Actually you just have to define one of the environment variables LANG or LC_CTYPE. The value does not matter. Read the tcsh man page for more information.

5.19 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


Next Previous Contents