From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: problem exporting org to latex: sections with math Date: Thu, 26 Oct 2017 10:24:00 +0200 Message-ID: <87fua671wf.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7dSy-0004GA-Lj for emacs-orgmode@gnu.org; Thu, 26 Oct 2017 04:24:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7dSv-0002fU-Fr for emacs-orgmode@gnu.org; Thu, 26 Oct 2017 04:24:40 -0400 Received: from [195.159.176.226] (port=51572 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7dSv-0002Xy-7s for emacs-orgmode@gnu.org; Thu, 26 Oct 2017 04:24:37 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1e7dSP-0000pJ-Bc for emacs-orgmode@gnu.org; Thu, 26 Oct 2017 10:24:05 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hello I export a org file to latex using the exam class and therefore thanks to Thomas Hunter I have defined. (org-latex-classes (quote ( ("exam" "\\documentclass[12pt, addpoints, answers]{exam}" ("\\begin{questions}%%%s" "\\end{questions}" "\\begin{questions}%%%s" "\\end{questions}") ("\\titledquestion[%s] " . "") ("\\begin{parts}%%%s" "\\end{parts}" "\\begin{parts}%%%s" "\\end{parts}") ("\\part[%s] " . "") ("\\begin{subparts}%%%s" "\\end{subparts}" "\\begin{subparts}%%%s" "\\end{subparts}") ("\\subpart[%s] " . "") ("\\begin{solution}[%s]" "\\end{solution}" "\\begin{solution}[%s]" "\\end{solution}"))))) The problem is that my document also contains latex \section commmands. These are exported correctly *only* if they don't contain math. Works \section{Adaptive methods using hopt} Does not work: \section{Adaptive methods using $h_{\text{op}}$} The resulting latex file looks like Ok \section{Adaptive methods using hopt} The following is not ok, \section\{Adaptive methods using \(h_{\text{op}}\)\} So what shall I do? Thanks regards Uwe Brauer