emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] ox-latex.el: Add `LATEX_PRE_HEADER' keyword
Date: Thu, 28 Sep 2023 12:31:11 +0000	[thread overview]
Message-ID: <871qeiscmo.fsf@posteo.net> (raw)
In-Reply-To: <uf3j9f$62n$1@ciao.gmane.io> (Max Nikulin's message of "Thu, 28 Sep 2023 17:07:41 +0700")

Max Nikulin writes:

> LaTeX code may be inserted
> - before \DocumentMetadata
> - between \DocumentMetadata and \documentclass
> - between \documentclass and preamble added by Org
> - between Org preamble and \begin{document}

The first two cases can be solved perfectly with LaTeX_pre_header,
without having to complicate your life further.

> Since ordering is important [...]

Starting with \documentclass, the order is important in certain cases
and not so important in others. And, anyway, you can always use a hook
like \AtBegin... \AtEnd..., etc.

And if users want to have complete control over the preamble (that is,
everything before \begin{document}), they can always define a new class
(in Org terminology) or write a preamble or a sty file in a separate Org
document using org-babel and literary programming. In a job I'm doing
now my preamble has 1736 lines. Writing it with org-babel is quite
comfortable. In short, I think (IMHO) Org already has enough resources
for those situations.

> I consider \begin{filecontents*}{\jobname.xmpdata} as an acceptable
> (but perhaps fragile) hack for LaTeX-first document. During export of
> Org file, this file should be written directly with values from Org
> metadata.

I think I should insist on what I said in my previous message, with a
copy/paste:

The thing is that here it is not a question of whether something can be
done in this way or in another better way. This is how a given package
recommends doing it. If the user wants to use that specific package, she/he
will have to follow these instructions. It's more. I am thinking, for
example, of the case in which the user has to obtain a * tex file, not a
PDF, because she/he is collaborating with more people who do not use
Org, but do use that code in the * tex document.

Apart from that, since any code (except \usepackage) is allowed before
\documentclass, I think that the user should have the possibility (and
the freedom) to enter in their *tex documents whatever they want in that
place, including comments, luacode, shebangs, etc.

-- 
Juan Manuel Macías

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com


  reply	other threads:[~2023-09-28 12:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-16 18:00 [patch] ox-latex.el: Add `LATEX_PRE_HEADER' keyword Juan Manuel Macías
2023-09-17 10:02 ` Ihor Radchenko
2023-09-17 17:23 ` Timothy
2023-09-18  8:09   ` Ihor Radchenko
2023-09-22 16:38 ` Max Nikulin
2023-09-24 18:42   ` Juan Manuel Macías
2023-09-25 13:58     ` Max Nikulin
2023-09-25 18:49       ` Juan Manuel Macías
2023-09-25 21:57         ` Thomas S. Dye
2023-09-26 15:39           ` Max Nikulin
2023-09-26 19:12             ` Juan Manuel Macías
2023-09-28 10:07               ` Max Nikulin
2023-09-28 12:31                 ` Juan Manuel Macías [this message]
2023-09-29  2:38                   ` Max Nikulin
2023-10-01 16:32                   ` Max Nikulin
2023-09-28 15:36                 ` AW
2023-10-01 16:02                   ` Max Nikulin
2023-10-01 17:48                     ` Juan Manuel Macías
2023-10-02 10:42               ` Max Nikulin

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=871qeiscmo.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /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).