Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 ?
share|improve this question

1 Answer 1

up vote 4 down vote accepted

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
\providecommand{\alert}[1]{\textbf{#1}}

\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.}
share|improve this answer
    
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
1  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.