From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC] [PATCH] ox-latex: support :float no with caption for minted listings Date: Sun, 24 Aug 2014 21:54:21 +0200 Message-ID: <87tx514qaa.fsf@nicolasgoaziou.fr> References: <1408779394-11436-1-git-send-email-aaronecay@gmail.com> <87ha13dm3v.fsf@nicolasgoaziou.fr> <87oavbostg.fsf@gmail.com> <87a96uep52.fsf@nicolasgoaziou.fr> <87d2bqpvgr.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 ([2001:4830:134:3::10]:41250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLdrL-0003A6-RA for emacs-orgmode@gnu.org; Sun, 24 Aug 2014 15:54:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLdrB-00010D-LM for emacs-orgmode@gnu.org; Sun, 24 Aug 2014 15:53:51 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:36332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLdrB-0000z1-FB for emacs-orgmode@gnu.org; Sun, 24 Aug 2014 15:53:41 -0400 Received: from mfilter6-d.gandi.net (mfilter6-d.gandi.net [217.70.178.135]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id DF1D1FB87D for ; Sun, 24 Aug 2014 21:53:35 +0200 (CEST) Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by mfilter6-d.gandi.net (mfilter6-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 4dYQEdPjkbrV for ; Sun, 24 Aug 2014 21:53:34 +0200 (CEST) Received: from selenimh (unknown [91.224.148.150]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 3D31FFB886 for ; Sun, 24 Aug 2014 21:53:34 +0200 (CEST) In-Reply-To: <87d2bqpvgr.fsf@gmail.com> (Aaron Ecay's message of "Sat, 23 Aug 2014 20:44:36 -0400") 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: emacs-orgmode@gnu.org Hello, Aaron Ecay writes: > Why is the compatibility=3Dfalse option needed? I can=E2=80=99t figure t= his > out. This is in my local copy of the minted manual, in "7 Known issues". It may be outdated, though. > =E2=80=9CPretty=E2=80=9D source code export in all cases requires adding = certain packages > to the default, as explained in the docstring of =E2=80=98org-latex-listi= ngs=E2=80=99. > The patch adds discussion of the caption requirement there, so there is > no =E2=80=9Cif=E2=80=9D about the documentation. > > I don=E2=80=99t understand what you=E2=80=99re saying about introducing = =E2=80=9Csupport=E2=80=9D for > the caption package. The patch uses one specific feature of the caption > package in one specific place to accomplish one specific goal. There > are no other changes needed anywhere else in the codebase than these > couple of lines in one function (plus the documentation). With your patch latex back-end can produce "\captionof" macros. This is what I call (partial) "support" from Org: knowing the macro. Again, using this macro is an error in the default configuration. Besides not doing using it at all, there are usually two ways to solve the problem: 1. Add the package in the default package list, so the combination still works out of the box for anyone. E.g., `rotating' package. Use with care, more packages is a higher risk of incompatibilites between them. The lighter counterpart of `caption' package may be safe though. OTOH, once the package is in the default package list, it can be used everywhere in the back-end. This can be an advantage if there are several places that could use \captionof. 2. Suggest, through docstring or manual, to the user to require a specific package if he wants to benefit from the feature. E.g., `booktabs'. Usually, the situation makes it obvious that such a package is required (e.g. ":environment longtabu" or ":booktabs t"). Unfortunately, this is not the case here. Under some circumstances, :float nil needs `caption' (or its lighter counterpart). I find it a bit too magical. Note there is also :caption attribute which is used in tables and special blocks, but not in source blocks, which may come handy here. WDYT? Regards, --=20 Nicolas Goaziou