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.

  • In 8.3, changes to org-toggle-latex-fragment were introduced, I am starting to think that this is a bug (?) – Mario Román Jun 24 '17 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/) – Mario Román Jun 24 '17 at 21:37
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, privacy policy and cookie policy

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