[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minte
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings |
Date: |
Sun, 24 Aug 2014 21:54:21 +0200 |
Hello,
Aaron Ecay <address@hidden> writes:
> Why is the compatibility=false option needed? I can’t figure this
> out.
This is in my local copy of the minted manual, in "7 Known issues". It
may be outdated, though.
> “Pretty” source code export in all cases requires adding certain packages
> to the default, as explained in the docstring of ‘org-latex-listings’.
> The patch adds discussion of the caption requirement there, so there is
> no “if” about the documentation.
>
> I don’t understand what you’re saying about introducing “support” 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,
--
Nicolas Goaziou
- [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings, Aaron Ecay, 2014/08/23
- Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings, Nicolas Goaziou, 2014/08/23
- Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings, Aaron Ecay, 2014/08/23
- Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings, Nicolas Goaziou, 2014/08/23
- Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings, Aaron Ecay, 2014/08/23
- Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings, Nicolas Richard, 2014/08/24
- Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings,
Nicolas Goaziou <=
- Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings, Aaron Ecay, 2014/08/28
- Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings, Nicolas Goaziou, 2014/08/28