GeneralLaTeX under Ubuntu (accents problem)

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
latexforever
Posts: 120
Joined: Fri Nov 14, 2008 9:40 pm

LaTeX under Ubuntu (accents problem)

Post by latexforever »

Hello,

When I write simple LaTeX documents in Microsoft Windows (via TeXnicenter), the very beginning of my preamble looks like this:

Code: Select all

\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[frenchb,english]{babel}
.

I have no accent problems under Microsoft Windows, but, if I copy a .tex file and read it on Linux (via Kile or Texmaker), it immediately transforms all my accents into weird letters and symbols.

It seems to be a coding problem, but I don't understand something: as my Ubuntu (it does the same on Debian) is in English, and as the UTF becomes the most used coding in the world, when I start Kile, it automatically loads UTF-8.

I've looked in its options, and Settings>Configure Kile gives me a "Input encoding" field, where I've put "iso 8859-1"; it is saved, but seems not to be used by Kile.

Does the accent problem come from my editor or from my preamble?

I want to precise that I write some texts in French, that's why I need a lot of accents.

Thanks.

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

LaTeX under Ubuntu (accents problem)

Post by localghost »

You have to load ISO-8859-1 encoded and then save as Unicode (if you want). If you do so, you have to change the input encoding for processing with LaTeX.

Code: Select all

\usepackage[utf8]{inputenc}
But reading and saving as ISO-8859-1 may be better if you want to continue processing your document also under Windows. You can convert between encodings with recode.

As a better solution for input encoding I consider the selinput package from the oberdiek bundle, which selects the right encoding by given glyphs from a glyph list [1]. Choose some letters with accents from the French language for input mapping. The manual will show you how to do that.

[1] Adobe - Unicode and Glyph Names


Best regards
Thorsten¹
latexforever
Posts: 120
Joined: Fri Nov 14, 2008 9:40 pm

Re: LaTeX under Ubuntu (accents problem)

Post by latexforever »

Thanks. It works pretty well, and your solutions are nice.
Post Reply