From: claude fuhrer <claude@fuhrer.ch>
To: emacs-orgmode@gnu.org
Subject: Name of code pieces when exported to PDF
Date: Mon, 26 Sep 2016 16:28:57 +0200 [thread overview]
Message-ID: <ed1130ff-654c-88a5-2741-5ffc6cf8ab08@fuhrer.ch> (raw)
Hello
To explain a small program, I've broken it down into small pieces. My
org file looks something like
# =========================================================================
#+NAME MainClass
#+BEGIN_SRC java :noweb tangle :tangle Test.java
public class Test
{
<<secondBlock>>
<<thirdBlock>>
}
#+END_SRC
some text
#+NAME secondBlock
#+BEGIN_SRC java :noweb tangle
int a, b;
#+END_SRC
and then
#+NAME thirdBlock
#+BEGIN_SRC java :noweb tangle
a = 17;
b = a / 2;
#+END_SRC
# =========================================================================
Org-babel-tangle give me exactly what I want.
But, is it possible to have the "NAME" value displayed in the
lstlisting parameters when I export the org document as pdf ? I've
included the following lines in the beginning of my org file
#+LaTeX_HEADER:\lstset{language=Java,
#+LaTeX_HEADER: numbers=left,
#+LaTeX_HEADER: basicstyle=\footnotesize\ttfamily,
#+LaTeX_HEADER: basicstyle=\ttfamily,
#+LaTeX_HEADER: backgroundcolor=\color{LightYellow},
#+LaTeX_HEADER: stringstyle=\color{blue},
#+LaTeX_HEADER: frame=single,
#+LaTeX_HEADER: columns=fullflexible,
#+LaTeX_HEADER: numberstyle=\scriptsize\color{red},
#+LaTeX_HEADER: commentstyle=\color{ForestGreen}}
The package listing provides a "title" or "caption" keyword, but I do
not know how to pass the "NAME" argument. Can you please help me or
give me a pointer ? Thank you in advance for your help.
next reply other threads:[~2016-09-26 14:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 14:28 claude fuhrer [this message]
2016-09-26 15:34 ` Name of code pieces when exported to PDF Nicolas Goaziou
2016-09-26 16:48 ` claude fuhrer
2016-09-26 18:13 ` Sebastian Christ
2016-09-26 21:32 ` Nick Dokos
2016-09-26 21:43 ` John Kitchin
2016-09-27 0:17 ` Nick Dokos
2016-09-27 11:11 ` Sebastian Christ
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed1130ff-654c-88a5-2741-5ffc6cf8ab08@fuhrer.ch \
--to=claude@fuhrer.ch \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.