From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: [export] latex: texorpdfstring in heading Date: Mon, 24 Nov 2014 15:16:14 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsvNT-0002Ba-Sc for emacs-orgmode@gnu.org; Mon, 24 Nov 2014 10:16:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XsvNM-0006kz-DN for emacs-orgmode@gnu.org; Mon, 24 Nov 2014 10:16:35 -0500 Received: from plane.gmane.org ([80.91.229.3]:43805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsvNM-0006kZ-5S for emacs-orgmode@gnu.org; Mon, 24 Nov 2014 10:16:28 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XsvNL-0003R6-4u for emacs-orgmode@gnu.org; Mon, 24 Nov 2014 16:16:27 +0100 Received: from 193.63.222.27 ([193.63.222.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 24 Nov 2014 16:16:27 +0100 Received: from andreas.leha by 193.63.222.27 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 24 Nov 2014 16:16:27 +0100 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi all, Background: I am always loading the hyperref package in my latex exports. That one complains (warns) about math in headings. ("Token not allowed in a PDF string") The proposed solution in LaTeX is to use \texorpdfstring{}{}. I've used that successfully in the past also from org. As it seems that stopped working as the {}{} get escaped now during export. So, here is my question: How do I use \texorpdfstring correctly in an org heading? And here is a minimal example: --8<---------------cut here---------------start------------->8--- #+latex_header: \usepackage{hyperref} * This contains \texorpdfstring{$\prod_{k=1}^N$}{product 1toN} math For some reason. --8<---------------cut here---------------end--------------->8--- which exports to --8<---------------cut here---------------start------------->8--- \section{This contains \texorpdfstring\{\$\(\prod_{\text{k=1}}^{\text{N}}\)\$\}\{product 1toN\} math} \label{sec-1} For some reason. --8<---------------cut here---------------end--------------->8--- Thanks, Andreas