emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Incorrect escaping of braces on LaTeX export [6.33trans (release_6.33f.122.g7062a.dirty)]
@ 2009-12-17  0:05 Mark Elston
  2009-12-17 19:27 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Elston @ 2009-12-17  0:05 UTC (permalink / raw)
  To: emacs-orgmode


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?  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:
==============
(setq
  org-log-done 'time
  org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
  org-agenda-custom-commands '(("S" "Schedule for the week" ((agenda "") 
(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" 
"emacs-lisp")
  org-export-latex-format-toc-function 'org-export-latex-format-toc-default
  org-protocol-protocol-alist '(("Fireforg get bibtex entry: 
fireforg-bibtex-entry://<bibtex entry (encoded)>" :protocol 
"fireforg-bibtex-entry" :function org-fireforg-receive-bibtex-entry)
                                ("Fireforg show annotation: 
fireforg-show-annotation://<file (encoded)>/<header (encoded)>" 
:protocol "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-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-drawers
                   org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
  org-export-latex-classes '(("article"
 
"\\documentclass[11pt]{article}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}"
                              ("\\section{%s}" . "\\section*{%s}")
                              ("\\subsection{%s}" . "\\subsection*{%s}")
                              ("\\subsubsection{%s}" . 
"\\subsubsection*{%s}")
                              ("\\paragraph{%s}" . "\\paragraph*{%s}")
                              ("\\subparagraph{%s}" . 
"\\subparagraph*{%s}"))
                             ("report"
 
"\\documentclass[11pt]{report}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\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}" . 
"\\subsubsection*{%s}"))
                             ("book"
 
"\\documentclass[11pt]{book}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\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}" . 
"\\subsubsection*{%s}"))
                             ("ClassNotes"
 
"\\documentclass[letter,twoside,openright]{memoir}\n\\usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\\usepackage{graphicx}\n\\usepackage{biblestudy}\n\\usepackage[polutonikogreek,english]{babel}\n\\usepackage{cjhebrew}\n\\usepackage{bbding}\n\n\\newcommand\\checkmark{\\Checkmark}\n\\newcommand\\xmark{\\XSolidBold}\n\n\\newcommand\\gr[1]{\\begingroup%\n 
  \\selectlanguage{greek}#1%\n 
\\endgroup}\n\n\\newcommand\\heb[1]{\\begingroup%\n  \\cjRL{#1}%\n 
\\endgroup}\n\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1ex}"
                              ("\\chapter{%s}" . "\\chapter*{%s}")
                              ("\\section{%s}" . "\\section*{%s}")
                              ("\\subsection{%s}" . "\\subsection*{%s}")
                              ("\\subsubsection{%s}" . 
"\\subsubsection*{%s}"))
                             ("ErrorSample"
 
"\\documentclass[letter,twoside,openright]{memoir}\n\\usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\\usepackage{graphicx}\n\\usepackage{bbding}\n\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1ex}"
                              ("\\chapter{%s}" . "\\chapter*{%s}")
                              ("\\section{%s}" . "\\section*{%s}")
                              ("\\subsection{%s}" . "\\subsection*{%s}")
                              ("\\subsubsection{%s}" . 
"\\subsubsection*{%s}"))
                             )
  org-use-speed-commands t
  org-mode-hook '((lambda nil
                   (setq org-mouse-context-menu-function (quote 
org-mouse-context-menu))
                   (when (memq (quote context-menu) org-mouse-features)
                    (define-key org-mouse-map
                     (if (featurep (quote xemacs)) [button3] [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-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-mouse-yank-link))
                    (define-key org-mode-map [drag-mouse-3] (quote 
org-mouse-yank-link)))
                   (when (memq (quote move-tree) org-mouse-features)
                    (define-key org-mouse-map [drag-mouse-3] (quote 
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-features)
                    (font-lock-add-keywords nil
                     (\`
                      (((\, outline-regexp) 0
                        (\`
                         (face org-link mouse-face highlight keymap (\, 
org-mouse-map)))
                        (quote prepend))
                       )
                      )
                     t)
                    )
                   (when (memq (quote activate-bullets) org-mouse-features)
                    (font-lock-add-keywords nil
                     (\`
                      (("^[ 	]*\\([-+*]\\|[0-9]+[.)]\\) +"
                        (1
                         (\`
                          (face org-link keymap (\, org-mouse-map) 
mouse-face highlight))
                         (quote prepend))
                        )
                       )
                      )
                     t)
                    )
                   (when (memq (quote activate-checkboxes) 
org-mouse-features)
                    (font-lock-add-keywords nil
                     (\`
                      (("^[ 	]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)"
                        (2
                         (\` (face bold keymap (\, org-mouse-map) 
mouse-face highlight))
                         t)
                        )
                       )
                      )
                     t)
                    )
                   (defadvice org-open-at-point (around 
org-mouse-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-cycle)))
                      (t ad-do-it))
                     )
                    )
                   )
                  #[nil "\302\300!\210\303\x10\304\305\306\"\210\307 
\310\311#\207"
                    [yas/trigger-key yas/keymap 
make-variable-buffer-local [tab]
                     add-to-list org-tab-first-hook 
yas/org-very-safe-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) 
(quote local))
                   )
                  org-babel-result-hide-spec org-babel-hide-all-hashes
                  (lambda nil
                   (add-hook (quote after-save-hook) (quote 
org-fireforg-registry-update)
                    t t)
                   )
                  #[nil "\300\301\302\303\304$\207"
                    [org-add-hook change-major-mode-hook 
org-show-block-all append local]
                    5]
                  )
  org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe 
org-babel-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] 
[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 
mouse-4)] [C-mouse-4])
                           (quote org-agenda-earlier))
                          (define-key org-agenda-mode-map
                           (if (featurep (quote xemacs)) [(control 
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-beamer-select-beamer-code)
  org-remember-templates '(("Todo" 116 "* TODO %?\n  %i\n  %a\n" 
"~/org/TODO.org" "Tasks")
                           ("Journal" 106 "* %U %?\n\n  %i\n  %a\n" 
"~/org/JOURNAL.org")
                           ("Idea" 105 "* %^{Title}\n  %i\n  %a\n" 
"~/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 
Source: %c\n\n  %i"
                            "~/org/Notes.org" "Notes")
                           )
  org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
                                org-beamer-auto-fragile-frames
                                org-beamer-place-default-actions-for-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))
  )

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: Incorrect escaping of braces on LaTeX export [6.33trans (release_6.33f.122.g7062a.dirty)]
  2009-12-17  0:05 Bug: Incorrect escaping of braces on LaTeX export [6.33trans (release_6.33f.122.g7062a.dirty)] Mark Elston
@ 2009-12-17 19:27 ` Carsten Dominik
  2009-12-17 23:16   ` Mark Elston
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2009-12-17 19:27 UTC (permalink / raw)
  To: Mark Elston; +Cc: emacs-orgmode

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?   
> 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:
> ==============
> (setq
> org-log-done 'time
> org-export-latex-after-initial-vars-hook '(org-beamer-after-initial- 
> vars)
> org-agenda-custom-commands '(("S" "Schedule for the week" ((agenda  
> "") (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"  
> "emacs-lisp")
> org-export-latex-format-toc-function 'org-export-latex-format-toc- 
> default
> org-protocol-protocol-alist '(("Fireforg get bibtex entry: fireforg- 
> bibtex-entry://<bibtex entry (encoded)>" :protocol "fireforg-bibtex- 
> entry" :function org-fireforg-receive-bibtex-entry)
>                               ("Fireforg show annotation: fireforg- 
> show-annotation://<file (encoded)>/<header (encoded)>" :protocol  
> "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- 
> 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- 
> drawers
>                  org-cycle-show-empty-lines org-optimize-window- 
> after-visibility-change)
> org-export-latex-classes '(("article"
> "\\documentclass[11pt]{article}\n\\usepackage[utf8]{inputenc}\n\ 
> \usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\ 
> \usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\ 
> \usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}"
>                             ("\\section{%s}" . "\\section*{%s}")
>                             ("\\subsection{%s}" . "\\subsection*{%s}")
>                             ("\\subsubsection{%s}" . "\ 
> \subsubsection*{%s}")
>                             ("\\paragraph{%s}" . "\\paragraph*{%s}")
>                             ("\\subparagraph{%s}" . "\ 
> \subparagraph*{%s}"))
>                            ("report"
> "\\documentclass[11pt]{report}\n\\usepackage[utf8]{inputenc}\n\ 
> \usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\ 
> \usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\ 
> \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}" . "\ 
> \subsubsection*{%s}"))
>                            ("book"
> "\\documentclass[11pt]{book}\n\\usepackage[utf8]{inputenc}\n\ 
> \usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\ 
> \usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\ 
> \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}" . "\ 
> \subsubsection*{%s}"))
>                            ("ClassNotes"
> "\\documentclass[letter,twoside,openright]{memoir}\n\ 
> \usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\ 
> \usepackage{graphicx}\n\\usepackage{biblestudy}\n\ 
> \usepackage[polutonikogreek,english]{babel}\n\\usepackage{cjhebrew}\n 
> \\usepackage{bbding}\n\n\\newcommand\\checkmark{\\Checkmark}\n\ 
> \newcommand\\xmark{\\XSolidBold}\n\n\\newcommand\\gr[1]{\\begingroup% 
> \n  \\selectlanguage{greek}#1%\n \\endgroup}\n\n\\newcommand\\heb[1] 
> {\\begingroup%\n  \\cjRL{#1}%\n \\endgroup}\n\n\\setlength{\ 
> \parindent}{0pt}\n\\setlength{\\parskip}{1ex}"
>                             ("\\chapter{%s}" . "\\chapter*{%s}")
>                             ("\\section{%s}" . "\\section*{%s}")
>                             ("\\subsection{%s}" . "\\subsection*{%s}")
>                             ("\\subsubsection{%s}" . "\ 
> \subsubsection*{%s}"))
>                            ("ErrorSample"
> "\\documentclass[letter,twoside,openright]{memoir}\n\ 
> \usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\ 
> \usepackage{graphicx}\n\\usepackage{bbding}\n\n\\setlength{\ 
> \parindent}{0pt}\n\\setlength{\\parskip}{1ex}"
>                             ("\\chapter{%s}" . "\\chapter*{%s}")
>                             ("\\section{%s}" . "\\section*{%s}")
>                             ("\\subsection{%s}" . "\\subsection*{%s}")
>                             ("\\subsubsection{%s}" . "\ 
> \subsubsection*{%s}"))
>                            )
> org-use-speed-commands t
> org-mode-hook '((lambda nil
>                  (setq org-mouse-context-menu-function (quote org- 
> mouse-context-menu))
>                  (when (memq (quote context-menu) org-mouse-features)
>                   (define-key org-mouse-map
>                    (if (featurep (quote xemacs)) [button3]  
> [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- 
> 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- 
> mouse-yank-link))
>                   (define-key org-mode-map [drag-mouse-3] (quote org- 
> mouse-yank-link)))
>                  (when (memq (quote move-tree) org-mouse-features)
>                   (define-key org-mouse-map [drag-mouse-3] (quote  
> 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- 
> features)
>                   (font-lock-add-keywords nil
>                    (\`
>                     (((\, outline-regexp) 0
>                       (\`
>                        (face org-link mouse-face highlight keymap  
> (\, org-mouse-map)))
>                       (quote prepend))
>                      )
>                     )
>                    t)
>                   )
>                  (when (memq (quote activate-bullets) org-mouse- 
> features)
>                   (font-lock-add-keywords nil
>                    (\`
>                     (("^[ 	]*\\([-+*]\\|[0-9]+[.)]\\) +"
>                       (1
>                        (\`
>                         (face org-link keymap (\, org-mouse-map)  
> mouse-face highlight))
>                        (quote prepend))
>                       )
>                      )
>                     )
>                    t)
>                   )
>                  (when (memq (quote activate-checkboxes) org-mouse- 
> features)
>                   (font-lock-add-keywords nil
>                    (\`
>                     (("^[ 	]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\ 
> \)"
>                       (2
>                        (\` (face bold keymap (\, org-mouse-map)  
> mouse-face highlight))
>                        t)
>                       )
>                      )
>                     )
>                    t)
>                   )
>                  (defadvice org-open-at-point (around org-mouse-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- 
> cycle)))
>                     (t ad-do-it))
>                    )
>                   )
>                  )
>                 #[nil "\302\300!\210\303\x10\304\305\306\"\210\307  
> \310\311#\207"
>                   [yas/trigger-key yas/keymap make-variable-buffer- 
> local [tab]
>                    add-to-list org-tab-first-hook yas/org-very-safe- 
> 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)  
> (quote local))
>                  )
>                 org-babel-result-hide-spec org-babel-hide-all-hashes
>                 (lambda nil
>                  (add-hook (quote after-save-hook) (quote org- 
> fireforg-registry-update)
>                   t t)
>                  )
>                 #[nil "\300\301\302\303\304$\207"
>                   [org-add-hook change-major-mode-hook org-show- 
> block-all append local]
>                   5]
>                 )
> org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-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]  
> [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  
> mouse-4)] [C-mouse-4])
>                          (quote org-agenda-earlier))
>                         (define-key org-agenda-mode-map
>                          (if (featurep (quote xemacs)) [(control  
> 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- 
> beamer-select-beamer-code)
> org-remember-templates '(("Todo" 116 "* TODO %?\n  %i\n  %a\n" "~/ 
> org/TODO.org" "Tasks")
>                          ("Journal" 106 "* %U %?\n\n  %i\n  %a\n" "~/ 
> org/JOURNAL.org")
>                          ("Idea" 105 "* %^{Title}\n  %i\n  %a\n" "~/ 
> 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  
> Source: %c\n\n  %i"
>                           "~/org/Notes.org" "Notes")
>                          )
> org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix- 
> toc
>                               org-beamer-auto-fragile-frames
>                               org-beamer-place-default-actions-for- 
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: Incorrect escaping of braces on LaTeX export [6.33trans (release_6.33f.122.g7062a.dirty)]
  2009-12-17 19:27 ` Carsten Dominik
@ 2009-12-17 23:16   ` Mark Elston
  2009-12-18  8:08     ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Elston @ 2009-12-17 23:16 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten,

Notice the title line in the generated latex code.  It looks like:

     \title{ABC Class Notes\}
                           ^^

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 and
>> what in fact did happen.  You don't know how to make a good 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 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:
>> ==============
>> (setq
>> org-log-done 'time
>> org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
>> org-agenda-custom-commands '(("S" "Schedule for the week" ((agenda "") 
>> (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" 
>> "emacs-lisp")
>> org-export-latex-format-toc-function 'org-export-latex-format-toc-default
>> org-protocol-protocol-alist '(("Fireforg get bibtex entry: 
>> fireforg-bibtex-entry://<bibtex entry (encoded)>" :protocol 
>> "fireforg-bibtex-entry" :function org-fireforg-receive-bibtex-entry)
>>                               ("Fireforg show annotation: 
>> fireforg-show-annotation://<file (encoded)>/<header (encoded)>" 
>> :protocol "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-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-drawers
>>                  org-cycle-show-empty-lines 
>> org-optimize-window-after-visibility-change)
>> org-export-latex-classes '(("article"
>> "\\documentclass[11pt]{article}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}" 
>>
>>                             ("\\section{%s}" . "\\section*{%s}")
>>                             ("\\subsection{%s}" . "\\subsection*{%s}")
>>                             ("\\subsubsection{%s}" . 
>> "\\subsubsection*{%s}")
>>                             ("\\paragraph{%s}" . "\\paragraph*{%s}")
>>                             ("\\subparagraph{%s}" . 
>> "\\subparagraph*{%s}"))
>>                            ("report"
>> "\\documentclass[11pt]{report}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\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}" . 
>> "\\subsubsection*{%s}"))
>>                            ("book"
>> "\\documentclass[11pt]{book}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\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}" . 
>> "\\subsubsection*{%s}"))
>>                            ("ClassNotes"
>> "\\documentclass[letter,twoside,openright]{memoir}\n\\usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\\usepackage{graphicx}\n\\usepackage{biblestudy}\n\\usepackage[polutonikogreek,english]{babel}\n\\usepackage{cjhebrew}\n\\usepackage{bbding}\n\n\\newcommand\\checkmark{\\Checkmark}\n\\newcommand\\xmark{\\XSolidBold}\n\n\\newcommand\\gr[1]{\\begingroup%\n  
>> \\selectlanguage{greek}#1%\n 
>> \\endgroup}\n\n\\newcommand\\heb[1]{\\begingroup%\n  \\cjRL{#1}%\n 
>> \\endgroup}\n\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1ex}" 
>>
>>                             ("\\chapter{%s}" . "\\chapter*{%s}")
>>                             ("\\section{%s}" . "\\section*{%s}")
>>                             ("\\subsection{%s}" . "\\subsection*{%s}")
>>                             ("\\subsubsection{%s}" . 
>> "\\subsubsection*{%s}"))
>>                            ("ErrorSample"
>> "\\documentclass[letter,twoside,openright]{memoir}\n\\usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\\usepackage{graphicx}\n\\usepackage{bbding}\n\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1ex}" 
>>
>>                             ("\\chapter{%s}" . "\\chapter*{%s}")
>>                             ("\\section{%s}" . "\\section*{%s}")
>>                             ("\\subsection{%s}" . "\\subsection*{%s}")
>>                             ("\\subsubsection{%s}" . 
>> "\\subsubsection*{%s}"))
>>                            )
>> org-use-speed-commands t
>> org-mode-hook '((lambda nil
>>                  (setq org-mouse-context-menu-function (quote 
>> org-mouse-context-menu))
>>                  (when (memq (quote context-menu) org-mouse-features)
>>                   (define-key org-mouse-map
>>                    (if (featurep (quote xemacs)) [button3] [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-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-mouse-yank-link))
>>                   (define-key org-mode-map [drag-mouse-3] (quote 
>> org-mouse-yank-link)))
>>                  (when (memq (quote move-tree) org-mouse-features)
>>                   (define-key org-mouse-map [drag-mouse-3] (quote 
>> 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-features)
>>                   (font-lock-add-keywords nil
>>                    (\`
>>                     (((\, outline-regexp) 0
>>                       (\`
>>                        (face org-link mouse-face highlight keymap (\, 
>> org-mouse-map)))
>>                       (quote prepend))
>>                      )
>>                     )
>>                    t)
>>                   )
>>                  (when (memq (quote activate-bullets) org-mouse-features)
>>                   (font-lock-add-keywords nil
>>                    (\`
>>                     (("^[     ]*\\([-+*]\\|[0-9]+[.)]\\) +"
>>                       (1
>>                        (\`
>>                         (face org-link keymap (\, org-mouse-map) 
>> mouse-face highlight))
>>                        (quote prepend))
>>                       )
>>                      )
>>                     )
>>                    t)
>>                   )
>>                  (when (memq (quote activate-checkboxes) 
>> org-mouse-features)
>>                   (font-lock-add-keywords nil
>>                    (\`
>>                     (("^[     ]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ 
>> X]\\]\\)"
>>                       (2
>>                        (\` (face bold keymap (\, org-mouse-map) 
>> mouse-face highlight))
>>                        t)
>>                       )
>>                      )
>>                     )
>>                    t)
>>                   )
>>                  (defadvice org-open-at-point (around 
>> org-mouse-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-cycle)))
>>                     (t ad-do-it))
>>                    )
>>                   )
>>                  )
>>                 #[nil "\302\300!\210\303\x10\304\305\306\"\210\307 
>> \310\311#\207"
>>                   [yas/trigger-key yas/keymap 
>> make-variable-buffer-local [tab]
>>                    add-to-list org-tab-first-hook 
>> yas/org-very-safe-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) 
>> (quote local))
>>                  )
>>                 org-babel-result-hide-spec org-babel-hide-all-hashes
>>                 (lambda nil
>>                  (add-hook (quote after-save-hook) (quote 
>> org-fireforg-registry-update)
>>                   t t)
>>                  )
>>                 #[nil "\300\301\302\303\304$\207"
>>                   [org-add-hook change-major-mode-hook 
>> org-show-block-all append local]
>>                   5]
>>                 )
>> org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe 
>> org-babel-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] 
>> [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 
>> mouse-4)] [C-mouse-4])
>>                          (quote org-agenda-earlier))
>>                         (define-key org-agenda-mode-map
>>                          (if (featurep (quote xemacs)) [(control 
>> 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-beamer-select-beamer-code)
>> org-remember-templates '(("Todo" 116 "* TODO %?\n  %i\n  %a\n" 
>> "~/org/TODO.org" "Tasks")
>>                          ("Journal" 106 "* %U %?\n\n  %i\n  %a\n" 
>> "~/org/JOURNAL.org")
>>                          ("Idea" 105 "* %^{Title}\n  %i\n  %a\n" 
>> "~/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 Source: 
>> %c\n\n  %i"
>>                           "~/org/Notes.org" "Notes")
>>                          )
>> org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
>>                               org-beamer-auto-fragile-frames
>>                               org-beamer-place-default-actions-for-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
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: Incorrect escaping of braces on LaTeX export [6.33trans (release_6.33f.122.g7062a.dirty)]
  2009-12-17 23:16   ` Mark Elston
@ 2009-12-18  8:08     ` Carsten Dominik
  2009-12-18 18:13       ` Mark Elston
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2009-12-18  8:08 UTC (permalink / raw)
  To: Mark Elston; +Cc: emacs-orgmode

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  
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  
>>> and
>>> what in fact did happen.  You don't know how to make a good  
>>> 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  
>>> 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:
>>> ==============
>>> (setq
>>> org-log-done 'time
>>> org-export-latex-after-initial-vars-hook '(org-beamer-after- 
>>> initial-vars)
>>> org-agenda-custom-commands '(("S" "Schedule for the week" ((agenda  
>>> "") (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" "emacs-lisp")
>>> org-export-latex-format-toc-function 'org-export-latex-format-toc- 
>>> default
>>> org-protocol-protocol-alist '(("Fireforg get bibtex entry:  
>>> fireforg-bibtex-entry://<bibtex entry (encoded)>" :protocol  
>>> "fireforg-bibtex-entry" :function org-fireforg-receive-bibtex-entry)
>>>                              ("Fireforg show annotation: fireforg- 
>>> show-annotation://<file (encoded)>/<header (encoded)>" :protocol  
>>> "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-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- 
>>> drawers
>>>                 org-cycle-show-empty-lines org-optimize-window- 
>>> after-visibility-change)
>>> org-export-latex-classes '(("article"
>>> "\\documentclass[11pt]{article}\n\\usepackage[utf8]{inputenc}\n\ 
>>> \usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\ 
>>> \usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig} 
>>> \n\\usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}"
>>>                            ("\\section{%s}" . "\\section*{%s}")
>>>                            ("\\subsection{%s}" . "\ 
>>> \subsection*{%s}")
>>>                            ("\\subsubsection{%s}" . "\ 
>>> \subsubsection*{%s}")
>>>                            ("\\paragraph{%s}" . "\\paragraph*{%s}")
>>>                            ("\\subparagraph{%s}" . "\ 
>>> \subparagraph*{%s}"))
>>>                           ("report"
>>> "\\documentclass[11pt]{report}\n\\usepackage[utf8]{inputenc}\n\ 
>>> \usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\ 
>>> \usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig} 
>>> \n\\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}" . "\ 
>>> \subsubsection*{%s}"))
>>>                           ("book"
>>> "\\documentclass[11pt]{book}\n\\usepackage[utf8]{inputenc}\n\ 
>>> \usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\ 
>>> \usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig} 
>>> \n\\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}" . "\ 
>>> \subsubsection*{%s}"))
>>>                           ("ClassNotes"
>>> "\\documentclass[letter,twoside,openright]{memoir}\n\ 
>>> \usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color} 
>>> \n\\usepackage{graphicx}\n\\usepackage{biblestudy}\n\ 
>>> \usepackage[polutonikogreek,english]{babel}\n\\usepackage{cjhebrew} 
>>> \n\\usepackage{bbding}\n\n\\newcommand\\checkmark{\\Checkmark}\n\ 
>>> \newcommand\\xmark{\\XSolidBold}\n\n\\newcommand\\gr[1]{\ 
>>> \begingroup%\n  \\selectlanguage{greek}#1%\n \\endgroup}\n\n\ 
>>> \newcommand\\heb[1]{\\begingroup%\n  \\cjRL{#1}%\n \\endgroup}\n\n\ 
>>> \setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1ex}"
>>>                            ("\\chapter{%s}" . "\\chapter*{%s}")
>>>                            ("\\section{%s}" . "\\section*{%s}")
>>>                            ("\\subsection{%s}" . "\ 
>>> \subsection*{%s}")
>>>                            ("\\subsubsection{%s}" . "\ 
>>> \subsubsection*{%s}"))
>>>                           ("ErrorSample"
>>> "\\documentclass[letter,twoside,openright]{memoir}\n\ 
>>> \usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color} 
>>> \n\\usepackage{graphicx}\n\\usepackage{bbding}\n\n\\setlength{\ 
>>> \parindent}{0pt}\n\\setlength{\\parskip}{1ex}"
>>>                            ("\\chapter{%s}" . "\\chapter*{%s}")
>>>                            ("\\section{%s}" . "\\section*{%s}")
>>>                            ("\\subsection{%s}" . "\ 
>>> \subsection*{%s}")
>>>                            ("\\subsubsection{%s}" . "\ 
>>> \subsubsection*{%s}"))
>>>                           )
>>> org-use-speed-commands t
>>> org-mode-hook '((lambda nil
>>>                 (setq org-mouse-context-menu-function (quote org- 
>>> mouse-context-menu))
>>>                 (when (memq (quote context-menu) org-mouse-features)
>>>                  (define-key org-mouse-map
>>>                   (if (featurep (quote xemacs)) [button3]  
>>> [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- 
>>> 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- 
>>> mouse-yank-link))
>>>                  (define-key org-mode-map [drag-mouse-3] (quote  
>>> org-mouse-yank-link)))
>>>                 (when (memq (quote move-tree) org-mouse-features)
>>>                  (define-key org-mouse-map [drag-mouse-3] (quote  
>>> 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- 
>>> features)
>>>                  (font-lock-add-keywords nil
>>>                   (\`
>>>                    (((\, outline-regexp) 0
>>>                      (\`
>>>                       (face org-link mouse-face highlight keymap  
>>> (\, org-mouse-map)))
>>>                      (quote prepend))
>>>                     )
>>>                    )
>>>                   t)
>>>                  )
>>>                 (when (memq (quote activate-bullets) org-mouse- 
>>> features)
>>>                  (font-lock-add-keywords nil
>>>                   (\`
>>>                    (("^[     ]*\\([-+*]\\|[0-9]+[.)]\\) +"
>>>                      (1
>>>                       (\`
>>>                        (face org-link keymap (\, org-mouse-map)  
>>> mouse-face highlight))
>>>                       (quote prepend))
>>>                      )
>>>                     )
>>>                    )
>>>                   t)
>>>                  )
>>>                 (when (memq (quote activate-checkboxes) org-mouse- 
>>> features)
>>>                  (font-lock-add-keywords nil
>>>                   (\`
>>>                    (("^[     ]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X] 
>>> \\]\\)"
>>>                      (2
>>>                       (\` (face bold keymap (\, org-mouse-map)  
>>> mouse-face highlight))
>>>                       t)
>>>                      )
>>>                     )
>>>                    )
>>>                   t)
>>>                  )
>>>                 (defadvice org-open-at-point (around org-mouse- 
>>> 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- 
>>> cycle)))
>>>                    (t ad-do-it))
>>>                   )
>>>                  )
>>>                 )
>>>                #[nil "\302\300!\210\303\x10\304\305\306\"\210\307  
>>> \310\311#\207"
>>>                  [yas/trigger-key yas/keymap make-variable-buffer- 
>>> local [tab]
>>>                   add-to-list org-tab-first-hook yas/org-very-safe- 
>>> 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)  
>>> (quote local))
>>>                 )
>>>                org-babel-result-hide-spec org-babel-hide-all-hashes
>>>                (lambda nil
>>>                 (add-hook (quote after-save-hook) (quote org- 
>>> fireforg-registry-update)
>>>                  t t)
>>>                 )
>>>                #[nil "\300\301\302\303\304$\207"
>>>                  [org-add-hook change-major-mode-hook org-show- 
>>> block-all append local]
>>>                  5]
>>>                )
>>> org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel- 
>>> 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]  
>>> [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  
>>> mouse-4)] [C-mouse-4])
>>>                         (quote org-agenda-earlier))
>>>                        (define-key org-agenda-mode-map
>>>                         (if (featurep (quote xemacs)) [(control  
>>> 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- 
>>> beamer-select-beamer-code)
>>> org-remember-templates '(("Todo" 116 "* TODO %?\n  %i\n  %a\n" "~/ 
>>> org/TODO.org" "Tasks")
>>>                         ("Journal" 106 "* %U %?\n\n  %i\n  %a\n"  
>>> "~/org/JOURNAL.org")
>>>                         ("Idea" 105 "* %^{Title}\n  %i\n  %a\n" "~/ 
>>> 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  
>>> Source: %c\n\n  %i"
>>>                          "~/org/Notes.org" "Notes")
>>>                         )
>>> org-export-latex-final-hook '(org-beamer-amend-header org-beamer- 
>>> fix-toc
>>>                              org-beamer-auto-fragile-frames
>>>                              org-beamer-place-default-actions-for- 
>>> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug: Incorrect escaping of braces on LaTeX export [6.33trans (release_6.33f.122.g7062a.dirty)]
  2009-12-18  8:08     ` Carsten Dominik
@ 2009-12-18 18:13       ` Mark Elston
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Elston @ 2009-12-18 18:13 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Thank you very much, Carsten.  I can confirm it works perfectly now.

Mark

Carsten Dominik wrote:
> 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 
> 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 and
>>>> what in fact did happen.  You don't know how to make a good 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 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:
>>>> ==============
>>>> (setq
>>>> org-log-done 'time
>>>> org-export-latex-after-initial-vars-hook 
>>>> '(org-beamer-after-initial-vars)
>>>> org-agenda-custom-commands '(("S" "Schedule for the week" ((agenda 
>>>> "") (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" 
>>>> "emacs-lisp")
>>>> org-export-latex-format-toc-function 
>>>> 'org-export-latex-format-toc-default
>>>> org-protocol-protocol-alist '(("Fireforg get bibtex entry: 
>>>> fireforg-bibtex-entry://<bibtex entry (encoded)>" :protocol 
>>>> "fireforg-bibtex-entry" :function org-fireforg-receive-bibtex-entry)
>>>>                              ("Fireforg show annotation: 
>>>> fireforg-show-annotation://<file (encoded)>/<header (encoded)>" 
>>>> :protocol "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-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-drawers
>>>>                 org-cycle-show-empty-lines 
>>>> org-optimize-window-after-visibility-change)
>>>> org-export-latex-classes '(("article"
>>>> "\\documentclass[11pt]{article}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\usepackage{soul}\n\\usepackage{amssymb}\n\\usepackage{hyperref}" 
>>>>
>>>>                            ("\\section{%s}" . "\\section*{%s}")
>>>>                            ("\\subsection{%s}" . "\\subsection*{%s}")
>>>>                            ("\\subsubsection{%s}" . 
>>>> "\\subsubsection*{%s}")
>>>>                            ("\\paragraph{%s}" . "\\paragraph*{%s}")
>>>>                            ("\\subparagraph{%s}" . 
>>>> "\\subparagraph*{%s}"))
>>>>                           ("report"
>>>> "\\documentclass[11pt]{report}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\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}" . 
>>>> "\\subsubsection*{%s}"))
>>>>                           ("book"
>>>> "\\documentclass[11pt]{book}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{float}\n\\usepackage{wrapfig}\n\\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}" . 
>>>> "\\subsubsection*{%s}"))
>>>>                           ("ClassNotes"
>>>> "\\documentclass[letter,twoside,openright]{memoir}\n\\usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\\usepackage{graphicx}\n\\usepackage{biblestudy}\n\\usepackage[polutonikogreek,english]{babel}\n\\usepackage{cjhebrew}\n\\usepackage{bbding}\n\n\\newcommand\\checkmark{\\Checkmark}\n\\newcommand\\xmark{\\XSolidBold}\n\n\\newcommand\\gr[1]{\\begingroup%\n  
>>>> \\selectlanguage{greek}#1%\n 
>>>> \\endgroup}\n\n\\newcommand\\heb[1]{\\begingroup%\n  \\cjRL{#1}%\n 
>>>> \\endgroup}\n\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1ex}" 
>>>>
>>>>                            ("\\chapter{%s}" . "\\chapter*{%s}")
>>>>                            ("\\section{%s}" . "\\section*{%s}")
>>>>                            ("\\subsection{%s}" . "\\subsection*{%s}")
>>>>                            ("\\subsubsection{%s}" . 
>>>> "\\subsubsection*{%s}"))
>>>>                           ("ErrorSample"
>>>> "\\documentclass[letter,twoside,openright]{memoir}\n\\usepackage{varioref}\n\\usepackage{shorttoc}\n\\usepackage{color}\n\\usepackage{graphicx}\n\\usepackage{bbding}\n\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1ex}" 
>>>>
>>>>                            ("\\chapter{%s}" . "\\chapter*{%s}")
>>>>                            ("\\section{%s}" . "\\section*{%s}")
>>>>                            ("\\subsection{%s}" . "\\subsection*{%s}")
>>>>                            ("\\subsubsection{%s}" . 
>>>> "\\subsubsection*{%s}"))
>>>>                           )
>>>> org-use-speed-commands t
>>>> org-mode-hook '((lambda nil
>>>>                 (setq org-mouse-context-menu-function (quote 
>>>> org-mouse-context-menu))
>>>>                 (when (memq (quote context-menu) org-mouse-features)
>>>>                  (define-key org-mouse-map
>>>>                   (if (featurep (quote xemacs)) [button3] [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-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-mouse-yank-link))
>>>>                  (define-key org-mode-map [drag-mouse-3] (quote 
>>>> org-mouse-yank-link)))
>>>>                 (when (memq (quote move-tree) org-mouse-features)
>>>>                  (define-key org-mouse-map [drag-mouse-3] (quote 
>>>> 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-features)
>>>>                  (font-lock-add-keywords nil
>>>>                   (\`
>>>>                    (((\, outline-regexp) 0
>>>>                      (\`
>>>>                       (face org-link mouse-face highlight keymap (\, 
>>>> org-mouse-map)))
>>>>                      (quote prepend))
>>>>                     )
>>>>                    )
>>>>                   t)
>>>>                  )
>>>>                 (when (memq (quote activate-bullets) 
>>>> org-mouse-features)
>>>>                  (font-lock-add-keywords nil
>>>>                   (\`
>>>>                    (("^[     ]*\\([-+*]\\|[0-9]+[.)]\\) +"
>>>>                      (1
>>>>                       (\`
>>>>                        (face org-link keymap (\, org-mouse-map) 
>>>> mouse-face highlight))
>>>>                       (quote prepend))
>>>>                      )
>>>>                     )
>>>>                    )
>>>>                   t)
>>>>                  )
>>>>                 (when (memq (quote activate-checkboxes) 
>>>> org-mouse-features)
>>>>                  (font-lock-add-keywords nil
>>>>                   (\`
>>>>                    (("^[     ]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ 
>>>> X]\\]\\)"
>>>>                      (2
>>>>                       (\` (face bold keymap (\, org-mouse-map) 
>>>> mouse-face highlight))
>>>>                       t)
>>>>                      )
>>>>                     )
>>>>                    )
>>>>                   t)
>>>>                  )
>>>>                 (defadvice org-open-at-point (around 
>>>> org-mouse-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-cycle)))
>>>>                    (t ad-do-it))
>>>>                   )
>>>>                  )
>>>>                 )
>>>>                #[nil "\302\300!\210\303\x10\304\305\306\"\210\307 
>>>> \310\311#\207"
>>>>                  [yas/trigger-key yas/keymap 
>>>> make-variable-buffer-local [tab]
>>>>                   add-to-list org-tab-first-hook 
>>>> yas/org-very-safe-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) 
>>>> (quote local))
>>>>                 )
>>>>                org-babel-result-hide-spec org-babel-hide-all-hashes
>>>>                (lambda nil
>>>>                 (add-hook (quote after-save-hook) (quote 
>>>> org-fireforg-registry-update)
>>>>                  t t)
>>>>                 )
>>>>                #[nil "\300\301\302\303\304$\207"
>>>>                  [org-add-hook change-major-mode-hook 
>>>> org-show-block-all append local]
>>>>                  5]
>>>>                )
>>>> org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe 
>>>> org-babel-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] 
>>>> [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 
>>>> mouse-4)] [C-mouse-4])
>>>>                         (quote org-agenda-earlier))
>>>>                        (define-key org-agenda-mode-map
>>>>                         (if (featurep (quote xemacs)) [(control 
>>>> 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-beamer-select-beamer-code)
>>>> org-remember-templates '(("Todo" 116 "* TODO %?\n  %i\n  %a\n" 
>>>> "~/org/TODO.org" "Tasks")
>>>>                         ("Journal" 106 "* %U %?\n\n  %i\n  %a\n" 
>>>> "~/org/JOURNAL.org")
>>>>                         ("Idea" 105 "* %^{Title}\n  %i\n  %a\n" 
>>>> "~/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 
>>>> Source: %c\n\n  %i"
>>>>                          "~/org/Notes.org" "Notes")
>>>>                         )
>>>> org-export-latex-final-hook '(org-beamer-amend-header 
>>>> org-beamer-fix-toc
>>>>                              org-beamer-auto-fragile-frames
>>>>                              
>>>> org-beamer-place-default-actions-for-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
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-18 18:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-17  0:05 Bug: Incorrect escaping of braces on LaTeX export [6.33trans (release_6.33f.122.g7062a.dirty)] Mark Elston
2009-12-17 19:27 ` Carsten Dominik
2009-12-17 23:16   ` Mark Elston
2009-12-18  8:08     ` Carsten Dominik
2009-12-18 18:13       ` Mark Elston

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).