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.