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: Thu, 17 Dec 2009 20:27:27 +0100 Message-ID: <2B4C5268-9A5D-453F-9B0A-3FD3D6B703CC@gmail.com> References: <4B2975DA.5060008@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 1NLPQe-0001b3-HV for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 18:06:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLPQa-0001Yo-AX for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 18:06:40 -0500 Received: from [199.232.76.173] (port=33708 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLPQa-0001YW-53 for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 18:06:36 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]:64874) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLPQZ-0000tY-JB for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 18:06:35 -0500 Received: by mail-ew0-f224.google.com with SMTP id 24so2854211ewy.26 for ; Thu, 17 Dec 2009 15:06:35 -0800 (PST) In-Reply-To: <4B2975DA.5060008@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, 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 and > what in fact did happen. You don't know how to make a good report? =20= > 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 into > an error in the generated latex file. I use memoir for my notes 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 the > \begin{document} line I have added these to #+TEXT entries in the 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 titlingpage > environment. To accomplish this I have set the #+TITLE: directive to > an empty value and put the entire titlingpage environment (3 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-initial-=20= > 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-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" "sh" =20= > "emacs-lisp") > org-export-latex-format-toc-function 'org-export-latex-format-toc-=20 > default > org-protocol-protocol-alist '(("Fireforg get bibtex entry: fireforg-=20= > bibtex-entry://" :protocol "fireforg-bibtex-=20= > 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-result-=20= > 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}\n\=20= > \usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\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}\n\=20= > \usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}" > ("\\part{%s}" . "\\part*{%s}") > ("\\chapter{%s}" . "\\chapter*{%s}") > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\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}\n\=20= > \usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}" > ("\\part{%s}" . "\\part*{%s}") > ("\\chapter{%s}" . "\\chapter*{%s}") > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\=20 > \subsubsection*{%s}")) > ("ClassNotes" > "\\documentclass[letter,twoside,openright]{memoir}\n\=20 > \usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\=20= > \usepackage{graphicx}\n\\usepackage{biblestudy}\n\=20 > \usepackage[polutonikogreek,english]{babel}\n\\usepackage{cjhebrew}\n=20= > \\usepackage{bbding}\n\n\\newcommand\\checkmark{\\Checkmark}\n\=20 > \newcommand\\xmark{\\XSolidBold}\n\n\\newcommand\\gr[1]{\\begingroup%=20= > \n \\selectlanguage{greek}#1%\n \\endgroup}\n\n\\newcommand\\heb[1]=20= > {\\begingroup%\n \\cjRL{#1}%\n \\endgroup}\n\n\\setlength{\=20 > \parindent}{0pt}\n\\setlength{\\parskip}{1ex}" > ("\\chapter{%s}" . "\\chapter*{%s}") > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\=20 > \subsubsection*{%s}")) > ("ErrorSample" > "\\documentclass[letter,twoside,openright]{memoir}\n\=20 > \usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\=20= > \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}" . "\\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 org-=20= > 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-open-=20= > 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-hash-=20= > 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-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-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-fix-=20= > 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