From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: emacs-orgmode@gnu.org
Subject: Re: [RFC] [PATCH] ox-latex: support :float no with caption for minted listings
Date: Fri, 19 Sep 2014 22:13:27 +0200 [thread overview]
Message-ID: <877g0zv060.fsf_-_@nicolasgoaziou.fr> (raw)
In-Reply-To: <87mw9vqvo1.fsf@gmail.com> (Aaron Ecay's message of "Fri, 19 Sep 2014 15:04:14 -0400")
Hello,
Aaron Ecay <aaronecay@gmail.com> writes:
> See the attached patch.
Thanks for the patch.
> I updated ORG-NEWS, but the manual (info "(org) LaTeX specific
> attributes") is already sufficiently general IMO.
OK.
> +- capt-of: for captions on `:float nil' source blocks
I think this is too limiting as we might use this package in other
places. "for captions outside of floats" may be more appropriate.
> +You can have listings with a caption which nonetheless do not
> +float. This is useful in case the source code takes up more than
> +a page, in which case trying to float it will also truncate it.
> +To achieve this, you should specifying the following attributes
> +on the source block:
> +
> + #+caption: ...
> + #+attr_latex: :float no
> + #+begin_src
> + ...
> + #+end_src
I wonder if this is even needed. ":float nil" is described in the
manual, and "capt-of" is loaded by default. IOW there's no real need to
warn the user about a natural feature which doesn't require any
intervention.
> + (cond ((and (not float) (plist-member attributes :float) caption)
> + (format "%%s\n%s" (replace-regexp-in-string
> + "\\\\caption" "\\captionof{listing}"
> + caption-str t t)))
> + ((and (not float) (plist-member attributes :float)) "%s")
This can do for now. Ultimately, however, I think we could merge
`org-latex--wrap-label' into `org-latex--caption/label-string' (which
should then produce "\captionof" command when appropriate). By then, the
`replace-regexp-in-string' would not be needed anymore. WDYT?
In any case, I think you can apply the patch once the docstrings
questions above have been sorted out.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2014-09-19 20:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-23 7:36 [RFC] [PATCH] ox-latex: support :float no with caption for minted listings Aaron Ecay
2014-08-23 19:47 ` Nicolas Goaziou
2014-08-23 20:27 ` Aaron Ecay
2014-08-23 23:56 ` Nicolas Goaziou
2014-08-24 0:44 ` Aaron Ecay
2014-08-24 6:51 ` Nicolas Richard
2014-08-24 19:54 ` Nicolas Goaziou
2014-08-28 5:03 ` Aaron Ecay
2014-08-28 9:19 ` Nicolas Goaziou
2014-09-19 19:04 ` Aaron Ecay
2014-09-19 20:13 ` Nicolas Goaziou [this message]
2014-09-23 3:09 ` Aaron Ecay
2014-09-23 19:48 ` Nicolas Goaziou
2014-09-28 4:07 ` Aaron Ecay
2014-09-28 7:09 ` Nicolas Goaziou
2014-09-28 12:00 ` Rasmus
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=877g0zv060.fsf_-_@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
/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).