Given an org file with the following contents --- #+ATTR_LATEX: :mode math :environment bmatrix | 1 | 2 | 3 |
whops --- when exporting to LaTeX using Org version 8.3.6 from http://orgmode.org/elpa/ render to LaTeX as follows: --- \[ \begin{bmatrix} 1 & 2 \\ \end{bmatrix} \] whops --- The offending bit is the vertical whitespace before \], which makes it incorrect input to pdflatex. Using the Org version 8.2.10 that ships with Emacs 25.1.1, the corresponding LaTeX is as follows --- \[\begin{bmatrix} 1 & 2 \\ \end{bmatrix}\] whops --- which is valid input to pdflatex. The 3 files are in their entirety on https://gist.github.com/karvus/da4523fdef8f644a6aa183028093d0ca. -- Thomas Stenhaug Emacs : GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-22 Package: Org-mode version 8.3.6 (8.3.6-7-g4d7d52-elpaplus @ c:/Users/thoma/.emacs.d/elpa/org-plus-contrib-20161017/) current state: ============== (setq org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist) ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql) ("calc" . fundamental) ("C" . c) ("cpp" . c++) ("C++" . c++) ("screen" . shell-script)) 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) outline-minor-mode-hook '(outshine-hook-function ke/outline-minor-mode-hook) org-sparse-tree-default-date-type 'scheduled-or-deadline org-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1" "fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t) ("" "longtable" nil) ("" "float" nil) ("" "wrapfig" nil) ("" "rotating" nil) ("normalem" "ulem" t) ("" "amsmath" t) ("" "textcomp" t) ("" "marvosym" t) ("" "wasysym" t) ("" "amssymb" t) ("" "hyperref" nil) "\\tolerance=1000") org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-html-format-drawer-function '(lambda (name contents) contents) org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-confirm-shell-link-function 'yes-or-no-p org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-latex-format-headline-function 'org-latex-format-headline-default-function org-after-todo-state-change-hook '(org-clock-out-if-current) org-latex-format-drawer-function '(lambda (name contents) contents) org-from-is-user-regexp nil org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)) ) (lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append) (quote local)) ) org-eldoc-load #[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) org-archive-hook '(org-attach-archive-delete-maybe) org-ascii-format-drawer-function '(lambda (name contents width) contents) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) 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-babel-process-comment-text 'org-babel-trim org-babel-tangle-lang-exts '(("emacs-lisp" . "el")) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-effort-durations '(("h" . 60) ("d" . 480) ("w" . 2400) ("m" . 9600) ("y" . 96000)) org-html-format-headline-function 'org-html-format-headline-default-function org-structure-template-alist '(("s" "#+BEGIN_SRC ?\n\n#+END_SRC" "<src lang=\"?\">\n\n</src>") ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" "<example>\n?\n</example>") ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE" "<quote>\n?\n</quote>") ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" "<verse>\n?\n</verse>") ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM" "<verbatim>\n?\n</verbatim>") ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER" "<center>\n?\n</center>") ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" "<literal style=\"latex\">\n?\n</literal>") ("L" "#+LaTeX: " "<literal style=\"latex\">?</literal>") ("h" "#+BEGIN_HTML\n?\n#+END_HTML" "<literal style=\"html\">\n?\n</literal>") ("H" "#+HTML: " "<literal style=\"html\">?</literal>") ("a" "#+BEGIN_ASCII\n?\n#+END_ASCII" "") ("A" "#+ASCII: " "") ("i" "#+INDEX: ?" "#+INDEX: ?") ("I" "#+INCLUDE: %file ?" "<include file=%file markup=\"?\">") ) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-agenda-files '("~/df/org/gtd.org" "~/git/sdu/MM536/MM536.org" "~/git/sdu/MM505/MM505.org" "~/git/sdu/MM537/MM537.org") org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-src-fontify-natively nil )