From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frank Chang Subject: LaTeX Export: The output of headline is incorrect when tag contains '_' or '@' Date: Thu, 3 Jul 2008 08:05:02 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KEJtK-0007RY-NF for emacs-orgmode@gnu.org; Thu, 03 Jul 2008 04:10:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KEJtG-0007Pd-UW for emacs-orgmode@gnu.org; Thu, 03 Jul 2008 04:10:10 -0400 Received: from [199.232.76.173] (port=34216 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KEJtG-0007PW-Pz for emacs-orgmode@gnu.org; Thu, 03 Jul 2008 04:10:06 -0400 Received: from main.gmane.org ([80.91.229.2]:37000 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KEJtG-0003Q9-Nj for emacs-orgmode@gnu.org; Thu, 03 Jul 2008 04:10:06 -0400 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1KEJtC-0005Aj-Ss for emacs-orgmode@gnu.org; Thu, 03 Jul 2008 08:10:03 +0000 Received: from g1pc3n108.g1.ntu.edu.tw ([140.112.230.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Jul 2008 08:10:02 +0000 Received: from frank.nevermind by g1pc3n108.g1.ntu.edu.tw with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Jul 2008 08:10:02 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello everyone, I'm new to Emacs (22.1) and org-mode (6.05b). Recently I start to use org-mode for note-taking, and it's really useful. But the problem comes when I try to export my org file to LaTeX. For example, if the headline is: * Headline :@tag_1:tag_2:tag3: which contains 3 tags: '@tag_1', 'tag_1', and 'tag3', then the output will become #+OPTIONS: toc:nil ^:nil \section{Headline :@tag\_{}1:tag\_{}2} #+OPTIONS: toc:nil ^:{} #+OPTIONS: toc:nil ^:t \section{Headline :@$tag_1$:$tag_2$} which seems incorrect. I look at the source code 'org-export-latex.el', and find the statement in function org-export-latex-keywords-maybe() ;; convert tags (when (re-search-forward "\\(:[a-zA-Z0-9]+\\)+:" nil t) (if (or (not org-export-with-tags) (plist-get remove-list :tags)) (replace-match "") (replace-match (format "\\texttt{%s}" (match-string 0)) t t))) It seems that LaTeX exporter takes only letters and numbers as parts of tags. But even I add '_' and '@' in regex it doesn't work, because '_' has been exported by the function org-export-latex-special-chars() (maybe '\_{}') I'm a Emacs newbie, and really don't know what to do next:) So is there any way to work around or fix it? Thanks. Best regards, Frank