From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: [RFC] [PATCH] conditional use of latex packages Date: Sun, 24 Feb 2013 13:47:38 -0500 Message-ID: <87wqtx35x1.fsf@gmail.com> References: <1361419346-23146-1-git-send-email-aaronecay@gmail.com> <87y5eh1yq4.fsf@gmail.com> <87r4k9shaz.fsf@gmail.com> <87ppzt1pft.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9gbv-00052w-Oo for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 13:47:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9gbu-0000H6-FN for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 13:47:43 -0500 Received: from mail-qe0-f54.google.com ([209.85.128.54]:62139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9gbu-0000Go-9R for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 13:47:42 -0500 Received: by mail-qe0-f54.google.com with SMTP id k5so1021025qej.13 for ; Sun, 24 Feb 2013 10:47:41 -0800 (PST) In-Reply-To: <87ppzt1pft.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou , emacs-orgmode@gnu.org Hi Nicolas, Thank you for your comments on this patch. I appreciate your concerns about the ordering of packages =E2=80=93 this was something I had not consi= dered fully. I have reworked the implementation; I think it is now simpler and more robust. Instead of a new customization variable, I=E2=80=99ve add= ed a field to =E2=80=98org-latex-(default-)packages-alist=E2=80=99, which indica= tes 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 =E2=80=93 that is, the defau= lt 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: [...] >=20 > 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 =E2=80=93 I could not see the forest for the trees. I=E2=80=99ll send the tikz images patch separately. >> Except that the latex exporter supports it, >=20 > 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 =E2=80=9Cblessed=E2=80=9D 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. >=20 > 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=E2=80=99s 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. --=20 Aaron Ecay