Using vim + LaTeX with Scandinavian characters

I want to create a lab record with LaTeX in Ubuntu, however my text includes Scandinavian characters, and currently I have to type them in using / "a and" / o etc. Is it possible to get a latex compiler to read these special characters when they are entered as is? In addition, I would like vim to read Finnish: now when I open a .tex document containing Scandinavian characters, they do not appear in vim at all. How can i fix this?

+4
source share
4 answers

For latex, use the inputenc parameter:

\usepackage[utf8]{inputenc} 

Instead of utf8, you can use anything that suits you, for example latin1.

Now the trick is to get your terminal to work with the same character encoding. It seems to be triggering a character / input encoding that doesn't match your input right now.

To do this, refer to the "Locale" settings of your distribution. You can always check the locale settings in the terminal by issuing locale . These days, UTF8 locales are preferred because they work with any imaginary character. If your terminal environment is configured correctly, vim should happily work with all your characters without mourning.

+5
source

To find out in which encoding Vim a document considers, try:

 :set enc 

To set the encoding in UTF-8, try:

 :set enc=utf8 
+4
source

I cannot help with vim, but for LaTeX I recommend you check out XeTeX , which is a TeX extension that is designed to support Unicode input. XeTeX is now part of Texlive, so if you have TeX features, you already have it.

+1
source
0
source

All Articles