# Exporting accented characters from org-mode to LaTeX

I'd like to export text from org-mode to LaTeX that contains accented characters. I am using curly brackets, following the guide from the top answer in this question.

# This:
Foo B{\"u}chi automaton bar.
# Exports to:
B\{$\backslash$"u\}chi automaton.

# Whilst this:
#+BEGIN_LATEX
Foo B{\"u}chi automaton bar.
#+END_LATEX
# Exports to:
B{\"u}chi automaton.


The question is either:

1. How do I esacape the {\"} to avoid the conversion to {$\backslash$"u\} ?
2. How do I use LaTeX inline, as $x$ allows me to use math inline ?
-

Why don't you insert directly ü? Org exported LaTeX source loads inputenc package with utf8 option.

Org file:

title

äëïöü


Exported file:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000

\title{title}
\author{giordano}
\date{\today}
\hypersetup{
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs Org-mode version 7.9.2}}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

äëïöü

\end{document}


If you want to insert inline LaTeX, you can define a dummy macro:

#+LATEX_HEADER: \newcommand{\inlinelatex}[1]{#1}

title

\inlinelatex{Foo B{\"u}chi automaton bar.}

-
Great, that fixed it. I added ü directly into the document. Thanks. I should add that I am using xelatex and pdflatex, which apparently complicates matters with accented characters. But the solution that works for me is described here: tex.stackexchange.com/questions/54573/… Thanks! –  Rob Stewart Jul 14 '13 at 1:39
About using XeLaTeX with org-mode see also How can I use XeLaTeX for LaTeX export instead of pdfLaTeX?. –  giordano Jul 14 '13 at 8:29

To avoid working with unicode documents (in case the unicode package is not in your system, or this is not configured to insert unicode efficiently) you can also use the Org-mode special symbols: http://orgmode.org/manual/Special-symbols.html

You can view the predefined symbols by inspecting the org-entities variable:

C-h v RET org-entities RET


In your case this list contains an entry of the form:

("uuml" "\\\"{u}" nil "&uuml;" "ue" "ü" "ü")


Then by writting \uuml` in your org-mode buffer you'll get the desired export.

-