Fonts & Character SetsAccented Nordic Characters

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
xJippu
Posts: 6
Joined: Thu Nov 01, 2012 11:32 pm

Accented Nordic Characters

Post by xJippu »

Hi all!

The short version: Newbie + macbook + texshop/texworks + äöå = problems

The long version:

I'm a total newbie to LaTeX, but am trying to make it work for my thesis sake. I'm a mechanical engineering student from Finland, whose only computer right now is a MacBook Pro. I'm going to start on my bachelors thesis this winter followed by my masters thesis next summer. I'm currently on a course called "introduction to LaTeX", which should answer most of my newbie questions. The problem is is that the course uses windows machines and distributions and I'm stubbornly doing all of the exercises with my MacBook (since this is the computer I'll be writing my thesis eventually).

I downloaded and installed MacTeX and found TeXShop and TeXworks fairly straightforward to use. They work like a charm when writing documents in English. However, I've come across some problems with Nordic special letters such as ä, ö and å and that's going to be a deal breaker, if not fixed since at least one of my thesis´is going to be in Finnish. Here's what I did:
  1. I made a really basic document in Finnish in TeXShop:

    Code: Select all

    \documentclass{article}
    \usepackage[finnish]{babel}
    \usepackage[latin1]{inputenc}
    \usepackage[T1]{fontenc}
    \begin{document}
    Syömishäiriö
    \end{document}
  2. Then saved it using UFT-8 encoding
  3. Powered up TeXworks
  4. Opened my freshly made document and hit "Typeset" and got the following log:

    Code: Select all

    This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
     restricted \write18 enabled.
    entering extended mode
    (./foorumitesti.tex
    LaTeX2e <2011/06/27>
    Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
    rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
    c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
    h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
    h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
    ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
    rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 
    kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
     polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s
    lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, 
    welsh, loaded.
    (/usr/local/texlive/2012/texmf-dist/tex/latex/base/article.cls
    Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
    (/usr/local/texlive/2012/texmf-dist/tex/latex/base/size10.clo))
    (/usr/local/texlive/2012/texmf-dist/tex/generic/babel/babel.sty
    (/usr/local/texlive/2012/texmf-dist/tex/generic/babel/finnish.ldf
    (/usr/local/texlive/2012/texmf-dist/tex/generic/babel/babel.def)))
    (/usr/local/texlive/2012/texmf-dist/tex/latex/base/inputenc.sty
    (/usr/local/texlive/2012/texmf-dist/tex/latex/base/latin1.def))
    (/usr/local/texlive/2012/texmf-dist/tex/latex/base/fontenc.sty
    (/usr/local/texlive/2012/texmf-dist/tex/latex/base/t1enc.def))
    No file foorumitesti.aux.
    (/usr/local/texlive/2012/texmf-dist/tex/latex/base/omscmr.fd)
    
    ! LaTeX Error: Command \textcurrency unavailable in encoding T1.
    
    See the LaTeX manual or LaTeX Companion for explanation.
    Type  H <return>  for immediate help.
     ...                                              
                                                      
    l.6 Syömishä
                  iriö
    ? 
And that's where I'm at right now, hoping someone here might help me get this sorted.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

hpesoj626
Posts: 7
Joined: Thu Nov 01, 2012 4:27 pm

Accented Nordic Characters

Post by hpesoj626 »

Hi xJippu,

you can use utf8 as an option to inputenc since you are using an editor in Unicode mode. Try the following.

Code: Select all

\documentclass{article}
\usepackage[finnish]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
Syömishäiriö
\end{document}
If this still gives you an error, you may also try using utf8x as an option to increase the range of symbols you can input.
hpesoj626
xJippu
Posts: 6
Joined: Thu Nov 01, 2012 11:32 pm

Accented Nordic Characters

Post by xJippu »

hpesoj626 wrote:Hi xJippu, you can use utf8 as an option to inputenc since you are using an editor in Unicode mode.
This worked!! Thank you so much! Are encodings OS-specific, since in the examples on the course they used

Code: Select all

\usepackage[newansi]{inputenc}
and it didn't work on my mac. Or is it just a matter of what encoding you choose whilst saving your .tex file?

Another question, do you think it's worth for a newcomer to invest (not really an investment since it's less than 17€) on a commercial editor/typesetter such as TeXpad (I've read a lot good things about it) or stick with the free ones in the beginning? I know it's mostly a matter of personal preference but still.
hpesoj626
Posts: 7
Joined: Thu Nov 01, 2012 4:27 pm

Accented Nordic Characters

Post by hpesoj626 »

Hi xJippu,
Are encodings OS-specific... Or is it just a matter of what encoding you choose whilst saving your .tex file?
Yes to both. To understand this you may refer to http://en.wikibooks.org/wiki/LaTeX/Internationalization.
do you think it's worth for a newcomer to invest... on a commercial editor/typesetter... or stick with the free ones in the beginning?
There are a lot of great free text editors out there and most of the times they will be able to satisfy your needs as a LaTeX beginner. I myself have never used commercial text editors so I can't say for sure about the difference between the free (and open) ones and the commercial ones. I use TeXMaker and gedit in Ubuntu for most of my typesetting needs. As a beginner, TeXMaker helped me a lot because of its text-completion feature and the easily accessible clickables for looking up commands for symbols I was not familiar with. But for most of my typing needs now, the simple gedit does most of the things that I need: syntax highlighting and spell checking.

You seem to be doing fine at the moment with TeXWorks so my advice is to learn all of its capabilities and then try some other free software for comparison. By then you can try the commercially available ones if you have found features that you think are not available from the free alternatives.
hpesoj626
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Accented Nordic Characters

Post by localghost »

As an alternative inputenc can be replaced completely by these lines.

Code: Select all

\usepackage{selinput}
\SelectInputMappings{     % semi-automatic determination
  adieresis={ä},          % of input encoding by a
  aring={å},              % list of selected glyphs
  odieresis={ö}           % see: http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
}

Best regards and welcome to the board
Thorsten
xJippu
Posts: 6
Joined: Thu Nov 01, 2012 11:32 pm

Accented Nordic Characters

Post by xJippu »

hpesoj626 wrote:Hi xJippu,
Are encodings OS-specific... Or is it just a matter of what encoding you choose whilst saving your .tex file?
Yes to both. To understand this you may refer to http://en.wikibooks.org/wiki/LaTeX/Internationalization.
Thanks for that very informative link, hpesoj626, I read it through and it cleared a lot for me. I think knowing why certain things are done is way more important than knowing how they're done.

I'm convinced now that LaTeX is the way to go with my thesis, and feel like I've found a great community to help me out if I run into any hurdles in the process.
Post Reply