emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Mark Edgington <edgimar@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: LaTeX_HEADER blocks
Date: Thu, 28 May 2015 19:17:42 +0200	[thread overview]
Message-ID: <87oal4wrih.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAMsBe8rBoAaFdNAALx70BGNoJ_zFC+6H6i66xv+4z7XTVHV-Yw@mail.gmail.com> (Mark Edgington's message of "Thu, 28 May 2015 00:28:19 -0400")

Hello,

Mark Edgington <edgimar@gmail.com> 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

      parent reply	other threads:[~2015-05-28 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  4:28 LaTeX_HEADER blocks Mark Edgington
2015-05-28  4:52 ` Mark Edgington
2015-05-28 17:17 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oal4wrih.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=edgimar@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).