emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] LaTeX_HEADER blocks


From: Nicolas Goaziou
Subject: Re: [O] LaTeX_HEADER blocks
Date: Thu, 28 May 2015 19:17:42 +0200

Hello,

Mark Edgington <address@hidden> writes:

> It is possible in org-mode to do either
>
>     #+LaTeX: \somecommand
>
> or
>
>     #+BEGIN_LaTeX
>     \somecommand
>     #+END_LaTeX
>
> I typically use the latter (the block form) because I often have
> multiple lines of LaTeX I would like to include at certain locations
> of a document.
>
> Similar to #+LaTeX, there is also #+LaTeX_HEADER, which ensures that
> something is included as part of the preamble.  Unfortunately,
> however, there is no equivalent block form for #+LaTeX_HEADER.  As a
> result, when there are several items one wishes to have in the
> preamble, it's necessary to have many such lines, each with a
> "#+LaTeX_HEADER: " prefix.
>
> For the sake of consistency and convenience, wouldn't it be worthwhile
> to add a "LaTeX_HEADER" block type to accompany the "LaTeX" block
> type?

This would not be consistent.

#+LATEX_HEADER was free for grabs but #+BEGIN_LATEX_HEADER already means
something: it is a special block. As a consequence, export back-ends
ignore LATEX_HEADER but handle BEGIN_LATEX_HEADER (basically, they
ignore the wrapper but export the contents). We would need to
make #+begin_latex_header an export block.

However, I plan to change syntax for export blocks for Org 8.4 and it
will not be possible to define arbitrarily export blocks. In fact,

  #+begin_latex
  ...
  #+end_latex

are expected to become

  #+begin_export latex [attributes]
  ...
  #+begin_export

If latex header block idea is implemented, I think it could instead use
a syntax such as

  #+begin_export latex :header t
  ...
  #+end_export


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]