8

I can't seem to input the syntax for an umlaut.

Here is what I write

\documentclass[12pt]{article}

\setlength\parindent{0pt}

\usepackage{amsmath}
\numberwithin{equation}{section}
\usepackage{color}
\usepackage{amssymb}
\usepackage[margin=2.0cm]{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{array}
\usepackage{url}
\usepackage{braket}
\usepackage{hyperref}
\usepackage{tensor}
\usepackage{titlesec}

\usepackage{amsthm}

\begin{document}
{\''o}
\end{document}

Now when I copy and paste {\''o} from the internet it works fine and I get the first thing, but if I type it in manually then I get the second. Texworks automatically changes my ' to a \rq{}, so I have to do ctrl+shift+' or alt+' to get the character -- I think that this will have something to do with it but I don't know what.

enter image description here

1
  • Try adding \usepackage[utf8]{inputenc} to your preamble
    – Ignasi
    Nov 13, 2014 at 16:58

4 Answers 4

9
\usepackage[utf8]{inputenc}
...

and then simply

ö or \"o

You used two apostrophes (\''o) and not a single " like \"o

2
  • 4
    I actually can't seem to write a single " in Texworks, and when I type '' it looks identical to the thing which I copied from the internet (which was {\"o}). And thank you for the quick response. I didn't know I needed a package.
    – user27182
    Nov 13, 2014 at 17:01
  • 3
    @user27182 See tex.stackexchange.com/q/210145/73
    – Joseph Wright
    Nov 13, 2014 at 17:04
2

Like the person who asked the question, I could not get the LaTeX umlaut "accent" command to work; my attempt looked just like the weird "prime over apostrophe" that the question asker experienced. I finally figured out that the problem is that I am editing using TeXworks under Windows. In TeXworks, if I type a double quote, the TeXworks editor automatically replaces a double quote with two single quotes, which causes the problem. The solution is to reset this feature in the TeXworks editor. Inside TeXworks, click on Edit, then Preferences. Change "Smart Quotes mode" from "TeX ligatures" to "None," and click "OK." Next, click "Format," "Smart Quotes, "None." Now you should be OK.

1

I have experienced the same problem working in TeXworks. The problem is that when you type a double apostrophe " (shift 2) in the editor, the editor produces two single apostrophes. To overcome this I have to type a " in, for instance, notepad and copy and paste it into the TeXworks editor.

1
  • 1
    Welcome to TeX.SX! There is a setting in the preferences that disables this automatic translation.
    – egreg
    May 14, 2016 at 10:47
0

One workaround is to combine an in-line \ddot{} and \text{} using the amsmath package:

\usepackage{amsmath}
...
The "o" at the end will have an umlaut: $\ddot{\text{o}}$
1
  • 2
    Welcome to TeX.SE. Could you provide an idea of the circumstances under which typing $\ddot{\text{o}}$ could be preferable to typing \"o? Note also that while your method "works" with upright (aka "Roman") font shapes, it fails badly when used with italic font shapes. With true italics, the dieresis ("Umlaut") should be aligned with the slanted word axis; however, that won't be the case if you type $\ddot{\text{o}}$.
    – Mico
    Feb 20, 2016 at 20:32

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