[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [RFC] [PATCH] conditional use of latex packages
From: |
Aaron Ecay |
Subject: |
Re: [O] [RFC] [PATCH] conditional use of latex packages |
Date: |
Sun, 24 Feb 2013 13:47:38 -0500 |
User-agent: |
Notmuch/0.15.2+36~ge30b9e0 (http://notmuchmail.org) Emacs/24.3.50.1 (x86_64-unknown-linux-gnu) |
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
- [O] [RFC] [PATCH] conditional use of latex packages, Aaron Ecay, 2013/02/20
- [O] [PATCH 3/5] ob-R: change the file extension for tikz figures, Aaron Ecay, 2013/02/20
- [O] [PATCH 4/5] ox-latex: Treat tikz files as images, Aaron Ecay, 2013/02/20
- [O] [PATCH 1/5] ox-latex: add optional-packages machinery, Aaron Ecay, 2013/02/20
- [O] [PATCH 2/5] ox-latex: convert source code and table export to use optional packages, Aaron Ecay, 2013/02/20
- [O] [PATCH 5/5] ox-latex: Convert the image inclusion code to use optional packages, Aaron Ecay, 2013/02/20
- Re: [O] [RFC] [PATCH] conditional use of latex packages, Suvayu Ali, 2013/02/21
- Re: [O] [RFC] [PATCH] conditional use of latex packages, Nicolas Goaziou, 2013/02/21