Fonts & Character SetsTypesetting of Umlauts fails

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

Typesetting of Umlauts fails

Post by Willie »

Hello. I am trying to write "Schrödinger" but unable to write ö. I am attaching my code. There wasn't any error message, but a '?' appears instead of 'ö',even after typesetting several times.
any ideas will be appreciated

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}
	This is Schrödinger equation.
\end{document}
Last edited by Willie on Thu Sep 01, 2011 9:33 pm, edited 1 time in total.

Recommended reading 2024:

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

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

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

Re: Typesetting of Umlauts fails

Post by localghost »

Make sure that not only your input encoding is set to Unicode. The file has also to be saved in UTF-8 encoding. Your editor should provide according settings. In most cases you can do this by choosing "Save as" from the "File" menu and select the right encoding in the following dialog window.


Thorsten
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

Typesetting of Umlauts fails

Post by Willie »

localghost wrote:Make sure that not only your input encoding is set to Unicode. The file has also to be saved in UTF-8 encoding. Your editor should provide according settings. In most cases you can do this by choosing "Save as" from the "File" menu and select the right encoding in the following dialog window.
Thorsten
Unfortunately I don't see such an option...
I am using Inlage 4 editor. When I press on "save as" I don't see such an option, nor when I check other menus so far.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Typesetting of Umlauts fails

Post by localghost »

Unicode support is listed among the LaTeX features of this editor. I guess that the help function should further you in this regard.
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

Re: Typesetting of Umlauts fails

Post by Willie »

ok, I found an option to change the encoding from "Default" to "UTF-8". but it still doesn't work. And since it did work in a different editor, I'll try to find a solution for Inlage.

Thanks. And if anyone finds please tell me
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Typesetting of Umlauts fails

Post by localghost »

Since you seem to write your documents in German, there might be a better alternative regarding input encoding. The selinput package from the oberdiek bundle selects the right input encoding by certain glyphs. For the German language there is a special example in the package manual.

Code: Select all

\documentclass[10pt,a4paper,ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{%
  adieresis={ä},
  germandbls={ß}
  Euro{€}
}
\usepackage{babel}

\begin{document}
  Schrödinger
\end{document}
The package will select the right input encoding automatically and you don't have to care about the encoding for the source file.
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

Re: Typesetting of Umlauts fails

Post by Willie »

Actually, I am not writing my documents in german, but rather in english. I just needed Schrödinger equation to be written with the umlaut.
but it's nice that there is such package, good to know :-)

Anyway I just opened up the program, compiled it, and it worked without any further change of my side. So maybe it needed re-run before changes take effect? or some kind of update...
gnils
Posts: 2
Joined: Thu Sep 01, 2011 12:12 am

Re: Typesetting of Umlauts fails

Post by gnils »

Hi, the problem wasn't solved by re-running Inlage but by opening the file again. If you just change the encoding without saving the file (it doesn't happen if you run and the file is unchanged) the encoding of the filename is still the old one.

Regards,
Nils

www.inlage.com
User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Typesetting of Umlauts fails

Post by shadgrind »

You don't need any Unicode stuff for umlauts if you're writing the document in English, just use \"{}:

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage[ngerman]{babel}
\begin{document}
   This is Schr\"{o}dinger equation.
\end{document}
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

Typesetting of Umlauts fails

Post by Willie »

shadgrind wrote:You don't need any Unicode stuff for umlauts if you're writing the document in English, just use \"{}:
I do if I want the letter be built-in the document... (and not as combination of signs)
Post Reply