emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: [RFC] [PATCH] conditional use of latex packages
Date: Sun, 24 Feb 2013 13:47:38 -0500	[thread overview]
Message-ID: <87wqtx35x1.fsf@gmail.com> (raw)
In-Reply-To: <87ppzt1pft.fsf@gmail.com>

Hi Nicolas,

Thank you for your comments on this patch.  I appreciate your concerns
about the ordering of packages – this was something I had not considered
fully.  I have reworked the implementation; I think it is now simpler
and more robust.  Instead of a new customization variable, I’ve added a
field to ‘org-latex-(default-)packages-alist’, which indicates whether a
package is to be loaded always, or only if needed.  This is very similar
to the mechanism that already exists to load only a subset of packages
when compiling latex snippets.  This flag is initially set to nil for
all packages, which loads them unconditionally – that is, the default
behavior is unchanged.  Users can set this flag to t for packages for
which they are sure that optional loading is appropriate.

2013ko otsailak 21an, Nicolas Goaziou-ek idatzi zuen:
[...]
> 
> My point was that they provide distinct features, so they should be
> included in different sets. But that's your call, really.

You are right about this – I could not see the forest for the trees.
I’ll send the tikz images patch separately.

>> Except that the latex exporter supports it,
> 
> Technically, latex exporter supports every package. That doesn't mean
> all of them should by included in `org-latex-default-packages-alist'.

What I meant was that the code for the latex exporter specifically
mentions those packages.  There is a very small set of latex packages
that are “blessed” in that way.

>   1. it's impossible to guess every package required by an user, so he
> would ultimately have to mess with even more variables to get what he
> wants (I only suggest to tweak `org-latex-class' and, optionally to
> stuff package GCD in `org-latex-packages-alist').

Hopefully the new version of the patch addresses this concern.

> 
>   2. In general, it's a bad idea to hide LaTeX internals too much as
> it can become very hard to fix a problem when things happen in your
> back.

Well, the LaTeX file which is the output of org’s exporter is always
available for debugging if something goes wrong.  The new patch
explicitly indicates when a package is omitted because org thinks it is
unnecessary, so hopefully it will be very obvious when something goes
wrong.  (Also, org omitting a package will only happen if the user
requests it explicitly.)

The patch should appear as a reply to this email.

-- 
Aaron Ecay

  reply	other threads:[~2013-02-24 18:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21  4:02 [RFC] [PATCH] conditional use of latex packages Aaron Ecay
2013-02-21  4:02 ` [PATCH 1/5] ox-latex: add optional-packages machinery Aaron Ecay
2013-02-21  4:02 ` [PATCH 2/5] ox-latex: convert source code and table export to use optional packages Aaron Ecay
2013-02-21  4:02 ` [PATCH 3/5] ob-R: change the file extension for tikz figures Aaron Ecay
2013-02-21  4:02 ` [PATCH 4/5] ox-latex: Treat tikz files as images Aaron Ecay
2013-02-21  4:02 ` [PATCH 5/5] ox-latex: Convert the image inclusion code to use optional packages Aaron Ecay
2013-02-21  9:51 ` [RFC] [PATCH] conditional use of latex packages Suvayu Ali
2013-02-21 15:19 ` Nicolas Goaziou
2013-02-21 17:33   ` Aaron Ecay
2013-02-21 18:39     ` Nicolas Goaziou
2013-02-24 18:47       ` Aaron Ecay [this message]
2013-02-24 18:50         ` [PATCH] ox-latex: add optional-packages machinery Aaron Ecay

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=87wqtx35x1.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@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).