1

I use TexStudio as my editor, and I'm having problems with changing the language to Danish, so I can use the letters 'æ', 'ø', and 'å'. My document also contains an abstract in English, so I wrote the following in my preamble:

\usepackage[utf8]{inputenc}
\usepackage[english, danish]{babel}

However it seems to have no effect. I've tried deleting the .aux file and recompiling/saving and building the document again with no change.

EDIT: I get the following error:

Error: Could not start the command: pdflatex.exe -synctex=1 -interaction=nonstopmode "pleasework".tex
7
  • 1
    don't just say it is not working: what error do you get (exact error message from the log file) You have specified UTF-8 are you sure the file is saved in that encoding? (that being the most common error in this area) Nov 1, 2016 at 15:31
  • Language has nothing to do with whether or not æøå can be used. The encoding does (both input encoding and to a lesser extend the font encoding, it is recommended to use \usepackage[T1]{fontenc}
    – daleif
    Nov 1, 2016 at 15:31
  • 1
    BTW: please remember to post full minimal examples (that others can just copy and test as is) instead of sniplets like this. Then we do not need to guess the rest of your preamble and document class.
    – daleif
    Nov 1, 2016 at 15:33
  • 1
    This looks more as if pdflatex is not starting up. And you say you could compile in pdflatex when you use another language than Danish? Have you installed the Danish package for babel? Nov 1, 2016 at 15:39
  • 1
    the error says pdflatex did not start so it is unrelated to your input document. Nov 1, 2016 at 16:03

1 Answer 1

3

Works perfectly fine for me (in TeXnic-Center).

\documentclass[11pt]{article}
\usepackage[T1]{fontenc} %thanks's daleif
\usepackage[utf8]{inputenc}
\usepackage[english, danish]{babel}

\begin{document}

Let's try some danish stuff: æ, ø, å

\end{document}

enter image description here

One thing you have to pay attention to is that not only the inputenc must be set to utf8, but also your .tex-file must be saved in UTF8 encoding, not e.g. ASCII. You should be able to choose the file encoding somewhere under save as probably, although I can really hardly believe that any halfway modern editor is using another encoding by default. Do you get any additional errors, or are the symbols just not printed?

3
  • Also remember \usepackage[T1]{fontenc}
    – daleif
    Nov 1, 2016 at 15:30
  • As far as I can see it's using UTF-8 encoding (I can see it in the bottom right corner and when I go under Edit --> Setup encoding)
    – javanewbie
    Nov 1, 2016 at 15:38
  • Okay, I don't know why ... (well, obviously I made a mistake somewhere) but I opened a new document, pasted your code from above and it worked. Thanks for the help, despite my certainty I evidently made an error along the way.
    – javanewbie
    Nov 1, 2016 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .