1

In the org-mode manual says

Unlike LATEX_HEADER, contents from LATEX_HEADER_EXTRA keywords will not be loaded when previewing LaTeX snippets


If I start Emacs using emacs -q, it loads org version 8.2.10 from the shared libraries and the following fragment works fine.

#+LATEX_HEADER_EXTRA: \newcommand{\test}{testing}
$\test$

The newcommand has no effect on the preview and when I use org-preview-latex-fragment I simply get a blank image. However, in org version 9.0.9, starting emacs with an empty config file and using org-toggle-latex-fragment, this fragment creates an image with the text "testing". It is using the command inside the preview (!).

Is it possible to use LATEX_HEADER_EXTRA on 9.0.9? I have tried byte-recompiling org and org-plus, and my Emacs is being loaded without any initial configuration but I have not been able to use it.

2
  • In 8.3, changes to org-toggle-latex-fragment were introduced, I am starting to think that this is a bug (?) Jun 24, 2017 at 20:13
  • Emacs : GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.12) of 2017-04-28 Package: Org mode version 9.0.9 (9.0.9-elpaplus @ /home/mario/.emacs.d/elpa/org-plus-contrib-20170622/) Jun 24, 2017 at 21:37

1 Answer 1

0

The bug has been fixed by Nicolas Goaziou in this commit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.