From mboxrd@z Thu Jan 1 00:00:00 1970 From: claude fuhrer Subject: Name of code pieces when exported to PDF Date: Mon, 26 Sep 2016 16:28:57 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boWuE-0001Ka-3H for emacs-orgmode@gnu.org; Mon, 26 Sep 2016 10:29:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boWu9-0006BH-3c for emacs-orgmode@gnu.org; Mon, 26 Sep 2016 10:29:17 -0400 Received: from zhbdzmsp-smta15.bluewin.ch ([195.186.99.132]:63393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boWu8-00067L-UV for emacs-orgmode@gnu.org; Mon, 26 Sep 2016 10:29:13 -0400 Received: from [192.168.1.115] (85.4.195.66) by zhhdzmsp-smta12.bluewin.ch (8.5.142) (authenticated as claude.fuhrer) id 5704C29B09190003 for emacs-orgmode@gnu.org; Mon, 26 Sep 2016 14:28:57 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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 { <> <> } #+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.