You are not logged in.

#1 2010-09-17 03:25:00

Noble
Member
Registered: 2010-06-01
Posts: 63

Problem with norwegian 'special characters' (æøå) in LaTeX

Having installed just about every latex-package in the repos I still cant get this to work. This is what I have in my .tex file:

\documentclass[12pt,norsk,a4paper]{article}
\usepackage[norsk]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}
Testing æøå - ÆØÅ
\end{document}

Any suggestions?


Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin

Offline

#2 2010-09-17 03:40:54

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: Problem with norwegian 'special characters' (æøå) in LaTeX

Change

\usepackage[latin1]{inputenc}

to

\usepackage[utf8]{inputenc}

It's very unlikely that you're using latin1 encoding on linux as opposed to UTF-8, and if you are, it's time to switch. (Make sure your editor is using UTF-8/Unicode encoding to save the file, but again, it probably already is.)

Last edited by frabjous (2010-09-17 03:41:29)

Offline

#3 2010-09-17 03:49:21

Noble
Member
Registered: 2010-06-01
Posts: 63

Re: Problem with norwegian 'special characters' (æøå) in LaTeX

Thanks, it now works - kinda..

If I only use text it compiles great, but when I try to change it in my math documents I get

! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX


Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin

Offline

#4 2010-09-17 04:10:20

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: Problem with norwegian 'special characters' (æøå) in LaTeX

What characters are you trying to put into math mode?

Generally, with regular LaTeX, you can't put special characters in math mode. You need to use the LaTeX symbol commands instead. For example, use \rightarrow and not →. The only exception would be if you were using XeLaTeX rather than regular (pdf)LaTeX, which generally has better Unicode support, especially if you had loaded the unicode-math packge: but that's still considered in beta status, I believe.

You can also escape to text mode inside math with the \text command from the amsmath package, e.g., $\text{ÆØÅ}$ should work.

Last edited by frabjous (2010-09-17 04:12:07)

Offline

#5 2010-09-18 13:37:06

Noble
Member
Registered: 2010-06-01
Posts: 63

Re: Problem with norwegian 'special characters' (æøå) in LaTeX

I see, thanks for clearing that up smile


Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin

Offline

Board footer

Powered by FluxBB