From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Bug: Incorrect escaping of braces on LaTeX export [6.33trans (release_6.33f.122.g7062a.dirty)] Date: Fri, 18 Dec 2009 09:08:06 +0100 Message-ID: References: <4B2975DA.5060008@comcast.net> <2B4C5268-9A5D-453F-9B0A-3FD3D6B703CC@gmail.com> <4B2ABBE5.6090905@comcast.net> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLYMh-0006RJ-Re for emacs-orgmode@gnu.org; Fri, 18 Dec 2009 03:39:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLYMd-0006Mi-N6 for emacs-orgmode@gnu.org; Fri, 18 Dec 2009 03:39:11 -0500 Received: from [199.232.76.173] (port=38944 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLYMd-0006MT-Hq for emacs-orgmode@gnu.org; Fri, 18 Dec 2009 03:39:07 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]:42088) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLYMc-0007xo-UH for emacs-orgmode@gnu.org; Fri, 18 Dec 2009 03:39:07 -0500 Received: by ewy24 with SMTP id 24so3171568ewy.26 for ; Fri, 18 Dec 2009 00:39:05 -0800 (PST) In-Reply-To: <4B2ABBE5.6090905@comcast.net> 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: Mark Elston Cc: emacs-orgmode@gnu.org Hi Mark, On Dec 18, 2009, at 12:16 AM, Mark Elston wrote: > Carsten, > > Notice the title line in the generated latex code. It looks like: > > \title{ABC Class Notes\} > ^^ Ah, yes, it was actually in your first email, only further down that I =20= expected. Sorry about this. This problem is now fixed. - Carsten > > The closing brace is escaped. > > Mark > > Carsten Dominik wrote: >> Hi Mark, >> what is the error you are getting? >> - Carsten >> On Dec 17, 2009, at 1:05 AM, Mark Elston wrote: >>> >>> Remember to cover the basics, that is, what you expected to happen =20= >>> and >>> what in fact did happen. You don't know how to make a good =20 >>> report? See >>> >>> http://orgmode.org/manual/Feedback.html#Feedback >>> >>> Your bug report will be posted to the Org-mode mailing list. >>> = ------------------------------------------------------------------------ >>> >>> While attempting to generate some notes for a class I give I ran =20 >>> into >>> an error in the generated latex file. I use memoir for my notes =20 >>> since >>> this package gives me the particular formatting I like without any >>> hassle so I created an org-export-latex-class to make use of it. >>> Since my boilerplate for my notes includes a number of lines after =20= >>> the >>> \begin{document} line I have added these to #+TEXT entries in the =20= >>> org >>> file. >>> >>> I use the memoir titlingpage facility as it gives me the control and >>> look I want without a lot of code. However, this causes a problem >>> with org export since the \maketitle line must be inside a =20 >>> titlingpage >>> environment. To accomplish this I have set the #+TITLE: directive to >>> an empty value and put the entire titlingpage environment (3 =20 >>> lines) in >>> #+TEXT lines. >>> >>> I have included a simple ErrorSample latex class in my configuration >>> which demonstrates the problem without as much being generated. >>> >>> A sample org file looks like this: >>> >>> = ----------------------------------------------------------------------- >>> #+TITLE: >>> #+OPTIONS: toc:nil >>> #+LaTeX_CLASS: ErrorSample >>> #+TEXT: \title{ABC Class Notes} >>> #+TEXT: \begin{titlingpage} >>> #+TEXT: \maketitle >>> #+TEXT: \end{titlingpage} >>> #+TEXT: \maxtocdepth{subsection} >>> #+TEXT: \pagenumbering{roman} >>> #+TEXT: \cleartooddpage >>> #+TEXT: \tableofcontents >>> #+TEXT: \cleartooddpage >>> #+TEXT: \chapterstyle{companion} >>> #+TEXT: \pagestyle{companion} >>> #+TEXT: \aliaspagestyle{part}{companion} >>> #+TEXT: \aliaspagestyle{chapter}{headings} >>> #+TEXT: \aliaspagestyle{cleared}{companion} >>> #+TEXT: \include{Preface} >>> #+TEXT: \pagenumbering{arabic} >>> >>> * Simple First Heading >>> Some text. >>> >>> * Simple Second Heading >>> Other text. >>> = ----------------------------------------------------------------------- >>> >>> The generated tex file is shown next. Notice the escaped closing >>> brace on the \title{} instruction: >>> >>> = ----------------------------------------------------------------------- >>> % Created 2009-12-16 Wed 15:54 >>> \documentclass[letter,twoside,openright]{memoir} >>> \usepackage{varioref} >>> \usepackage{shorttoc} >>> \usepackage{color} >>> \usepackage{graphicx} >>> \usepackage{bbding} >>> >>> \setlength{\parindent}{0pt} >>> \setlength{\parskip}{1ex} >>> >>> >>> \title{} >>> \author{Mark Elston} >>> \date{16 December 2009} >>> >>> \begin{document} >>> >>> >>> >>> \title{ABC Class Notes\} >>> \begin{titlingpage} >>> \maketitle >>> \end{titlingpage} >>> \maxtocdepth{subsection} >>> \pagenumbering{roman} >>> \cleartooddpage >>> \tableofcontents >>> \cleartooddpage >>> \chapterstyle{companion} >>> \pagestyle{companion} >>> \aliaspagestyle{part}{companion} >>> \aliaspagestyle{chapter}{headings} >>> \aliaspagestyle{cleared}{companion} >>> \include{Preface} >>> \pagenumbering{arabic} >>> >>> >>> \chapter{Simple First Heading} >>> \label{sec-1} >>> >>> Some text. >>> \chapter{Simple Second Heading} >>> \label{sec-2} >>> >>> Other text. >>> >>> \end{document} >>> >>> = ----------------------------------------------------------------------- >>> >>> Emacs : GNU Emacs 23.1.1 (i386-mingw-nt6.0.6002) >>> of 2009-07-29 on SOFT-MJASON >>> Package: Org-mode version 6.33trans (release_6.33f.122.g7062a.dirty) >>> >>> current state: >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> (setq >>> org-log-done 'time >>> org-export-latex-after-initial-vars-hook '(org-beamer-after-=20 >>> initial-vars) >>> org-agenda-custom-commands '(("S" "Schedule for the week" ((agenda =20= >>> "") (todo "TODO")))) >>> org-agenda-files '("~/org") >>> org-agenda-include-diary t >>> org-blocker-hook '(org-block-todo-from-children-or-siblings-or-=20 >>> parent >>> org-block-todo-from-checkboxes) >>> org-list-demote-modify-bullet '(("-" . "+") ("+" . "-")) >>> org-fontify-whole-heading-line t >>> org-metaup-hook '(org-babel-load-in-session-maybe) >>> org-agenda-skip-timestamp-if-done t >>> org-after-todo-state-change-hook '(org-clock-out-if-current) >>> org-babel-interpreters '("R" "asymptote" "dot" "ditaa" "python" =20 >>> "sh" "emacs-lisp") >>> org-export-latex-format-toc-function 'org-export-latex-format-toc-=20= >>> default >>> org-protocol-protocol-alist '(("Fireforg get bibtex entry: =20 >>> fireforg-bibtex-entry://" :protocol =20 >>> "fireforg-bibtex-entry" :function org-fireforg-receive-bibtex-entry) >>> ("Fireforg show annotation: fireforg-=20= >>> show-annotation:///
" :protocol =20 >>> "fireforg-show-annotation" :function org-fireforg-show-annotation) >>> ) >>> org-agenda-skip-scheduled-if-done t >>> org-export-preprocess-hook '(org-export-blocks-preprocess) >>> org-tab-first-hook '(yas/org-very-safe-expand org-babel-hide-=20 >>> result-toggle-maybe >>> org-hide-block-toggle-maybe) >>> org-src-mode-hook '(org-src-mode-configure-edit-buffer) >>> org-confirm-shell-link-function 'yes-or-no-p >>> org-export-first-hook '(org-beamer-initialize-open-trackers) >>> org-agenda-before-write-hook '(org-agenda-add-entry-text) >>> org-directory "~/org/" >>> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-=20 >>> drawers >>> org-cycle-show-empty-lines org-optimize-window-=20 >>> after-visibility-change) >>> org-export-latex-classes '(("article" >>> "\\documentclass[11pt]{article}\n\\usepackage[utf8]{inputenc}\n\=20 >>> \usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\=20 >>> \usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}=20= >>> \n\\usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}" >>> ("\\section{%s}" . "\\section*{%s}") >>> ("\\subsection{%s}" . "\=20 >>> \subsection*{%s}") >>> ("\\subsubsection{%s}" . "\=20 >>> \subsubsection*{%s}") >>> ("\\paragraph{%s}" . "\\paragraph*{%s}") >>> ("\\subparagraph{%s}" . "\=20 >>> \subparagraph*{%s}")) >>> ("report" >>> "\\documentclass[11pt]{report}\n\\usepackage[utf8]{inputenc}\n\=20 >>> \usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\=20 >>> \usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}=20= >>> \n\\usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}" >>> ("\\part{%s}" . "\\part*{%s}") >>> ("\\chapter{%s}" . "\\chapter*{%s}") >>> ("\\section{%s}" . "\\section*{%s}") >>> ("\\subsection{%s}" . "\=20 >>> \subsection*{%s}") >>> ("\\subsubsection{%s}" . "\=20 >>> \subsubsection*{%s}")) >>> ("book" >>> "\\documentclass[11pt]{book}\n\\usepackage[utf8]{inputenc}\n\=20 >>> \usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\=20 >>> \usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}=20= >>> \n\\usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}" >>> ("\\part{%s}" . "\\part*{%s}") >>> ("\\chapter{%s}" . "\\chapter*{%s}") >>> ("\\section{%s}" . "\\section*{%s}") >>> ("\\subsection{%s}" . "\=20 >>> \subsection*{%s}") >>> ("\\subsubsection{%s}" . "\=20 >>> \subsubsection*{%s}")) >>> ("ClassNotes" >>> "\\documentclass[letter,twoside,openright]{memoir}\n\=20 >>> \usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}=20= >>> \n\\usepackage{graphicx}\n\\usepackage{biblestudy}\n\=20 >>> \usepackage[polutonikogreek,english]{babel}\n\\usepackage{cjhebrew}=20= >>> \n\\usepackage{bbding}\n\n\\newcommand\\checkmark{\\Checkmark}\n\=20 >>> \newcommand\\xmark{\\XSolidBold}\n\n\\newcommand\\gr[1]{\=20 >>> \begingroup%\n \\selectlanguage{greek}#1%\n \\endgroup}\n\n\=20 >>> \newcommand\\heb[1]{\\begingroup%\n \\cjRL{#1}%\n \\endgroup}\n\n\=20= >>> \setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1ex}" >>> ("\\chapter{%s}" . "\\chapter*{%s}") >>> ("\\section{%s}" . "\\section*{%s}") >>> ("\\subsection{%s}" . "\=20 >>> \subsection*{%s}") >>> ("\\subsubsection{%s}" . "\=20 >>> \subsubsection*{%s}")) >>> ("ErrorSample" >>> "\\documentclass[letter,twoside,openright]{memoir}\n\=20 >>> \usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}=20= >>> \n\\usepackage{graphicx}\n\\usepackage{bbding}\n\n\\setlength{\=20 >>> \parindent}{0pt}\n\\setlength{\\parskip}{1ex}" >>> ("\\chapter{%s}" . "\\chapter*{%s}") >>> ("\\section{%s}" . "\\section*{%s}") >>> ("\\subsection{%s}" . "\=20 >>> \subsection*{%s}") >>> ("\\subsubsection{%s}" . "\=20 >>> \subsubsection*{%s}")) >>> ) >>> org-use-speed-commands t >>> org-mode-hook '((lambda nil >>> (setq org-mouse-context-menu-function (quote org-=20 >>> mouse-context-menu)) >>> (when (memq (quote context-menu) org-mouse-features) >>> (define-key org-mouse-map >>> (if (featurep (quote xemacs)) [button3] =20 >>> [mouse-3]) nil) >>> (define-key org-mode-map [mouse-3] >>> (quote org-mouse-show-context-menu)) >>> ) >>> (define-key org-mode-map [down-mouse-1] (quote org-=20= >>> mouse-down-mouse)) >>> (when (memq (quote context-menu) org-mouse-features) >>> (define-key org-mouse-map [C-drag-mouse-1] >>> (quote org-mouse-move-tree)) >>> (define-key org-mouse-map [C-down-mouse-1] >>> (quote org-mouse-move-tree-start)) >>> ) >>> (when (memq (quote yank-link) org-mouse-features) >>> (define-key org-mode-map [S-mouse-2] (quote org-=20 >>> mouse-yank-link)) >>> (define-key org-mode-map [drag-mouse-3] (quote =20 >>> org-mouse-yank-link))) >>> (when (memq (quote move-tree) org-mouse-features) >>> (define-key org-mouse-map [drag-mouse-3] (quote =20 >>> org-mouse-move-tree)) >>> (define-key org-mouse-map [down-mouse-3] >>> (quote org-mouse-move-tree-start)) >>> ) >>> (when (memq (quote activate-stars) org-mouse-=20 >>> features) >>> (font-lock-add-keywords nil >>> (\` >>> (((\, outline-regexp) 0 >>> (\` >>> (face org-link mouse-face highlight keymap =20 >>> (\, org-mouse-map))) >>> (quote prepend)) >>> ) >>> ) >>> t) >>> ) >>> (when (memq (quote activate-bullets) org-mouse-=20 >>> features) >>> (font-lock-add-keywords nil >>> (\` >>> (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +" >>> (1 >>> (\` >>> (face org-link keymap (\, org-mouse-map) =20 >>> mouse-face highlight)) >>> (quote prepend)) >>> ) >>> ) >>> ) >>> t) >>> ) >>> (when (memq (quote activate-checkboxes) org-mouse-=20= >>> features) >>> (font-lock-add-keywords nil >>> (\` >>> (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]=20= >>> \\]\\)" >>> (2 >>> (\` (face bold keymap (\, org-mouse-map) =20 >>> mouse-face highlight)) >>> t) >>> ) >>> ) >>> ) >>> t) >>> ) >>> (defadvice org-open-at-point (around org-mouse-=20 >>> open-at-point activate) >>> (let ((context (org-context))) >>> (cond ((assq :headline-stars context) (org-cycle)) >>> ((assq :checkbox context) (org-toggle-checkbox)) >>> ((assq :item-bullet context) >>> (let ((org-cycle-include-plain-lists t)) (org-=20= >>> cycle))) >>> (t ad-do-it)) >>> ) >>> ) >>> ) >>> #[nil "\302\300!\210\303=10\304\305\306\"\210\307 =20 >>> \310\311#\207" >>> [yas/trigger-key yas/keymap make-variable-buffer-=20= >>> local [tab] >>> add-to-list org-tab-first-hook yas/org-very-safe-=20= >>> expand define-key >>> [tab] yas/next-field] >>> 4] >>> (lambda nil >>> (org-add-hook (quote change-major-mode-hook) >>> (quote org-babel-show-result-all) (quote append) =20= >>> (quote local)) >>> ) >>> org-babel-result-hide-spec org-babel-hide-all-hashes >>> (lambda nil >>> (add-hook (quote after-save-hook) (quote org-=20 >>> fireforg-registry-update) >>> t t) >>> ) >>> #[nil "\300\301\302\303\304$\207" >>> [org-add-hook change-major-mode-hook org-show-=20 >>> block-all append local] >>> 5] >>> ) >>> org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-=20 >>> hash-at-point >>> org-babel-execute-src-block-maybe) >>> org-confirm-elisp-link-function 'yes-or-no-p >>> org-agenda-mode-hook '((lambda nil >>> (setq org-mouse-context-menu-function >>> (quote org-mouse-agenda-context-menu)) >>> (define-key org-agenda-mode-map >>> (if (featurep (quote xemacs)) [button3] =20 >>> [mouse-3]) >>> (quote org-mouse-show-context-menu)) >>> (define-key org-agenda-mode-map [down-=20 >>> mouse-3] >>> (quote org-mouse-move-tree-start)) >>> (define-key org-agenda-mode-map >>> (if (featurep (quote xemacs)) [(control =20 >>> mouse-4)] [C-mouse-4]) >>> (quote org-agenda-earlier)) >>> (define-key org-agenda-mode-map >>> (if (featurep (quote xemacs)) [(control =20 >>> mouse-5)] [C-mouse-5]) >>> (quote org-agenda-later)) >>> (define-key org-agenda-mode-map [drag-=20 >>> mouse-3] >>> (quote >>> (lambda (event) (interactive "e") >>> (case (org-mouse-get-gesture event) >>> (:left (org-agenda-earlier 1)) >>> (:right (org-agenda-later 1))) >>> ) >>> ) >>> ) >>> ) >>> ) >>> org-agenda-start-on-weekday nil >>> org-export-interblocks '((lob org-babel-exp-lob-one-liners) >>> (src org-babel-exp-inline-src-blocks)) >>> org-agenda-skip-deadline-if-done t >>> org-enforce-todo-dependencies t >>> org-occur-hook '(org-first-headline-recenter) >>> org-from-is-user-regexp nil >>> org-export-preprocess-before-selecting-backend-code-hook '(org-=20 >>> beamer-select-beamer-code) >>> org-remember-templates '(("Todo" 116 "* TODO %?\n %i\n %a\n" "~/=20= >>> org/TODO.org" "Tasks") >>> ("Journal" 106 "* %U %?\n\n %i\n %a\n" =20 >>> "~/org/JOURNAL.org") >>> ("Idea" 105 "* %^{Title}\n %i\n %a\n" "~/=20= >>> org/JOURNAL.org" >>> "New Ideas") >>> ("Project" 112 "* %^{Title}\n %i\n %a\n" >>> "~/org/ProjectNotes.org" "Project Notes") >>> ("Browser" 119 "* %^{Title}\n %u\n\n =20 >>> Source: %c\n\n %i" >>> "~/org/Notes.org" "Notes") >>> ) >>> org-export-latex-final-hook '(org-beamer-amend-header org-beamer-=20 >>> fix-toc >>> org-beamer-auto-fragile-frames >>> org-beamer-place-default-actions-for-=20= >>> lists) >>> org-enforce-todo-checkbox-dependencies t >>> org-metadown-hook '(org-babel-pop-to-session-maybe) >>> org-export-blocks '((src org-babel-exp-src-blocks nil) >>> (comment org-export-blocks-format-comment t) >>> (ditaa org-export-blocks-format-ditaa nil) >>> (dot org-export-blocks-format-dot nil)) >>> ) >>> >>> >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> - Carsten > - Carsten