14

I am writing a report in LaTeX from a LaTeX template given in my university. The text is in English but I need to have some Swedish characters there was well like ä, ö, å etc.

Now the problem is that I was initially writing the whole report in one single .tex file. But now I have decided that it'll be more manageable to have separate files for each section. I had no problems with the above-mentioned swedish text with the single file but I get the following error in the latter case.

LaTeX Error: ./intro.tex:29 LaTeX Error: Command \textcurrency unavailable in encoding OT1

Why am I getting this?

7
  • Are you using inputenc? I.e., is there a \usepackage[]{inputenc} wit the appropriate encoding?
    – Pieter
    Commented Oct 31, 2010 at 17:22
  • @Pieter there is a .sty file which has that line. the is called in the main tex file. do i need to include in again in all my tex files?
    – sfactor
    Commented Oct 31, 2010 at 17:32
  • 1
    The complaint is about the currency symbol: ¤. If this is the result of a file with Swedish characters in it, it is more likely a result of that file being in a different encoding than latin-1. Correct the encoding, and the problem should go away. Commented Oct 31, 2010 at 18:22
  • 9
    The file is encoded in UTF-8, but you didn't declare it as such. Add \usepackage[utf8]{inputenc} to the preamble. Seems that your editor used a different encoding for the subdocument files. Make sure to use the same encoding for the main file and all section files, and declare the encoding in the main file. Don't use the inputenc package in package files, they should be encoding-independent.
    – Philipp
    Commented Oct 31, 2010 at 18:49
  • 3
    @Philipp and Harald: perhaps add it as answer such that the question can be marked as solved by that answer and later on another reader could better see the solution.
    – Stefan Kottwitz
    Commented Oct 31, 2010 at 20:31

1 Answer 1

18

(Added comment as answer)

The file is encoded in UTF-8, but you didn't declare it as such. Add \usepackage[utf8]{inputenc} to the preamble. Seems that your editor used a different encoding for the subdocument files. Make sure to use the same encoding for the main file and all section files, and declare the encoding in the main file. Don't use the inputenc package in package files, they should be encoding-independent.

You must log in to answer this question.

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