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, 03 Jul 2008 13:17:34 +0800 Message-ID: <486C60EE.6030409@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KEHD5-00073X-4O for emacs-orgmode@gnu.org; Thu, 03 Jul 2008 01:18:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KEHD2-00073L-3L for emacs-orgmode@gnu.org; Thu, 03 Jul 2008 01:18:21 -0400 Received: from [199.232.76.173] (port=44673 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KEHD1-00073I-RY for emacs-orgmode@gnu.org; Thu, 03 Jul 2008 01:18:19 -0400 Received: from wa-out-1112.google.com ([209.85.146.182]:40893) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KEHD1-0006LN-F4 for emacs-orgmode@gnu.org; Thu, 03 Jul 2008 01:18:19 -0400 Received: by wa-out-1112.google.com with SMTP id m34so397471wag.10 for ; Wed, 02 Jul 2008 22:18:17 -0700 (PDT) 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 anyway to work around or fix it? Thanks. Best regards, Frank