Aaron Ecay wrote: > 2014ko ekainak 19an, Ken Mankoff-ek idatzi zuen: >> I'm following up on a thread suggesting a method to easily include >> large amounts of LaTeX header material. See >> https://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg00480.html >> >> Is there a way to automatically tangle one just this section each >> time I export the file? Or automatically all sections (but just in >> this file)? > > Something like (untested): > > ,---- > | #+begin_src emacs-lisp > | (org-babel-goto-named-src-block "preamble") > | (org-babel-tangle) > | #+end_src > | > | #+name: preamble > | #+begin_src latex :tangle preamble.tex > | % code goes here > | #+end_src > `---- > > You’ll need to use some combination of “:exports none” or a headline > tagged :noexport: to avoid these src blocks showing up in the exported > output.
Another solution which would be fine would be to have ‘#+BEGIN_LaTeX_HEADER ... #+END_LaTeX_HEADER’ blocks. Dunno if easy, however; but it'd be more straightforward for most users (no need to rely on Babel to tangle first). Best regards, Seb -- Sebastien Vauban