# An archi-minimal test of source blocks labelling, # using only the built-in tools. #+options: tex:t title:nil author:nil date:nil toc:nil #+property: header-args:R :session #+title: Test of source block exports The R block ref:lst:DoFig generates the figure ref:fig:DoFig: #+name: DoFig #+begin_src R :exports results :results output graphics :file Fig.png curve(sin(x),from=-pi, to=pi) #+end_src #+caption: Figure generated by R label:fig:DoFig #+RESULTS: DoFig [[file:Fig.png]] #+caption: R code generating a figure label:lst:DoFig #+begin_src R :eval no :exports code :noweb yes <> #+end_src Problem: whereas the HTML export labels the source listing as "Listing 1" and is correctly refers to 1, the PDF export labels it "Figure 2" (and points to it).