Hi Nicolas, 2014ko ekainak 20an, Nicolas Goaziou-ek idatzi zuen: > > Hello, > > Ken Mankoff <mank...@gmail.com> writes: > >> On 2014-06-20 at 04:50, Nicolas Goaziou wrote: >>> I suggest to use existing solutions instead: configure >>> `org-latex-classes'. >> >> I'm all for using existing solutions, but cannot see how I might use >> this to easily customize export differently for different documents when >> large amounts of LaTeX preamble code is being used. > > It's quite simple. You add your large amount of LaTeX preamble code in > a new class, e.g., "my-class", in `org-latex-classes'. Then, in all > documents needing this preamble code, you just add: > > #+latex_class: my-class > > Rinse and repeat for each document type.
There are two issues with this solution. The first is that editing non-trivial latex code embedded in an elisp string quickly becomes tedious, whereas it’s much pleasanter in org using org-edit-special, syntax highlighting of src blocks, etc. The second is that it’s impossible to share without distributing elisp code. From the twin standpoints of reproducible research and security, I think org ought to maximize the degree to which export use cases are sharable without resorting to executing elisp code. There’s a threshold beyond which it’s impossible to keep these goals, of course. But it’s worth considering how org-latex-classes and friends might adapt to increase the territory that falls within rather than outside the Turing-complete boundary. Just my 2 cents, -- Aaron Ecay