Hi Ken, 2014ko ekainak 19an, Ken Mankoff-ek idatzi zuen: > > Hi, > > 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 > > Please consider this a +1 for that feature request. > > One suggestion was: >> You could have a LaTeX block and tangle it to preamble.tex and >> input >> preamble.tex in a LATEX_HEADER. > > Which seems like an OK work-around. > > I have two follow-up questions about this. > > 1) I can't seem to get > > #+BEGIN_LATEX :tangle preamble.tex > > to work. It needs to be > > #+BEGIN_SRC latex :tangle preamble.tex
Correct. The former is only for export, and doesn’t work with babel features (incl. tangling) > > Is this correct? > > Secondly, 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. HTH, -- Aaron Ecay