emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Nicolas Girard <nicolas.girard@nerim.net>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [babel] Feature request: org-export-format-source-code-or-example and srcname
Date: Wed, 02 Dec 2009 13:23:12 -0700	[thread overview]
Message-ID: <m2bpihxgzz.fsf@gmail.com> (raw)
In-Reply-To: <51b0095d0912020941i4e461639m78b01316810c07c2@mail.gmail.com> (Nicolas Girard's message of "Wed, 2 Dec 2009 18:41:40 +0100")

Hi Nicolas,

There have been a couple of requests for this functionality, and the
main slowdown in not previously implementing this as part of the
org-babel source block export was not having a good standard way to
specify the srcname (or possibly header arguments) in HTML LaTeX and
ASCII export.  The LaTeX caption option you mentioned below looks like a
good solution for users who are using the listings package.

A previous suggestion was to use macros which the user could overdefine
to customize the behavior.  I do not know much about org-mode export
macros but this approach sounds promising to me.

Thanks for providing more motivation for this development.  If you have
any more suggestions I'd be interested to hear them.

Best -- Eric

Nicolas Girard <nicolas.girard@nerim.net> writes:

> Hi,
> when using the listings LaTeX package, it would be very useful if the
> value of srcname was added to the output. For instance,
>
> #+srcname: my_code_chunk
> #+begin_src latex :results latex :exports code :tangle no
> \usepackage{fontspec,xunicode,xltxtra}
> #+end_src
>
> would give:
>
> \lstset{language=TeX}[caption={my\_code\_chunk}]
> \begin{lstlisting}
> \usepackage{fontspec,xunicode,xltxtra}
> \end{lstlisting}
>
> (note the added "[caption={my\_code\_chunk}]")
>
> Cheers,
> Nicolas
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2009-12-02 20:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02 17:41 Feature request: org-export-format-source-code-or-example and srcname Nicolas Girard
2009-12-02 20:23 ` Eric Schulte [this message]
2009-12-17  7:40 ` Carsten Dominik
2009-12-17  9:17   ` Sébastien Vauban
2010-01-05 15:56     ` Eric Schulte

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=m2bpihxgzz.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicolas.girard@nerim.net \
    /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).