From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Stewart Subject: Bug: LaTeX block above first heading ignored by latex exporter [8.2.3c (release_8.2.3c-308-gc811bb @ /home/rob/sw/org-mode/lisp/)] Date: Thu, 28 Nov 2013 09:52:41 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlyJE-0006o2-IH for emacs-orgmode@gnu.org; Thu, 28 Nov 2013 04:55:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlyJ9-0001GY-R4 for emacs-orgmode@gnu.org; Thu, 28 Nov 2013 04:54:56 -0500 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:58622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlyJ9-0001GU-Gz for emacs-orgmode@gnu.org; Thu, 28 Nov 2013 04:54:51 -0500 Received: by mail-we0-f171.google.com with SMTP id q58so7902773wes.16 for ; Thu, 28 Nov 2013 01:54:50 -0800 (PST) Received: from serena.laptop (cpc2-sgyl34-2-0-cust177.sgyl.cable.virginm.net. [94.174.144.178]) by mx.google.com with ESMTPSA id b7sm80348537wiz.8.2013.11.28.01.54.48 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Thu, 28 Nov 2013 01:54:49 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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. ------------------------------------------------------------------------ I have a simple orgmode document that has a #+BEGIN_LATEX .. #+END_LATEX block before the first heading "Introduction". When this heading is not exported, i.e. there are no headings, then the LaTeX block is properly exported. When this heading is exported, the LaTeX block is omitted from the exported document. DOCUMENT: %%%%%%%%%%%%%%%%%%%%%%%% #+LaTeX_CLASS: article #+TITLE: My Title #+AUTHOR: Joe Bloggs #+OPTIONS: H:5 #+BEGIN_LATEX \begin{abstract} This is my abstract. \end{abstract} #+END_LATEX #+TOC: headlines 2 * Introduction :export: Hello. %%%%%%%%%%%%%%%%%%%%%%%% EXPECTED: %%%%%%%%%%%%%%%%%%%%%%%% \documentclass[11pt]{article} \author{Joe Bloggs} \date{\today} \title{My Title} \hypersetup{ pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 24.3.1 (Org mode 8.2.3c)}} \begin{document} \maketitle \tableofcontents \begin{abstract} This is my abstract. \end{abstract} \setcounter{tocdepth}{2} \tableofcontents \section{Introduction} \label{sec-1} Hello. % Emacs 24.3.1 (Org mode 8.2.3c) \end{document} %%%%%%%%%%%%%%%%%%%%%%%% ACTUAL: %%%%%%%%%%%%%%%%%%%%%%%% \documentclass[11pt]{article} \author{Joe Bloggs} \date{\today} \title{My Title} \hypersetup{ pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 24.3.1 (Org mode 8.2.3c)}} \begin{document} \maketitle \tableofcontents \section{Introduction} \label{sec-1} Hello. % Emacs 24.3.1 (Org mode 8.2.3c) \end{document} %%%%%%%%%%%%%%%%%%%%%%%% Emacs : GNU Emacs 24.3.1 (i686-redhat-linux-gnu, GTK+ Version 3.8.2) of 2013-08-14 on buildvm-06.phx2.fedoraproject.org Package: Org-mode version 8.2.3c (release_8.2.3c-308-gc811bb @ /home/rob/sw/org-mode/lisp/) current state: ============== (setq org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-latex-format-headline-function 'org-latex-format-headline-default-function org-html-format-inlinetask-function 'ignore org-export-with-drawers nil org-export-copy-to-kill-ring t org-export-date-timestamp-format "%Y-%m-%d" org-export-with-tags 'not-in-toc org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-export-latex-after-blockquotes-hook '(org-special-blocks-convert-latex-special-cookies) org-html-format-headline-function 'ignore org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-latex-classes '(("phd" "\\documentclass{hwthesis}" ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ) org-latex-format-drawer-function '(lambda (name contents) contents) org-export-preprocess-after-blockquote-hook '(org-special-blocks-make-special-cookies) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-export-first-hook '(org-beamer-initialize-open-trackers) org-mode-hook '((lambda nil (flyspell-mode 1)) #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes (lambda nil (org-indent-mode t))) org-ascii-format-drawer-function '(lambda (name contents width) contents) org-from-is-user-regexp "\\" org-html-format-drawer-function '(lambda (name contents) contents) 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-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-metadown-hook '(org-babel-pop-to-session-maybe) org-latex-link-with-unknown-path-format "\\texttt{??}" org-todo-keywords '((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE")) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-export-html-after-blockquotes-hook '(org-special-blocks-convert-html-special-cookies) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-tangle-lang-exts '(("lisp" . "lisp") ("emacs-lisp" . "el")) org-babel-load-languages '((emacs-lisp . t) (sh . t) (lisp . t) (R . t)) org-latex-format-inlinetask-function 'ignore org-confirm-shell-link-function 'yes-or-no-p )