From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: James Harkins <jamshark70@zoho.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Incorrect references to LaTeX Listings
Date: Tue, 09 Jan 2018 13:50:27 +0100 [thread overview]
Message-ID: <87wp0r2o30.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <160da926dba.117630b7011054.8767956275007294613@zoho.com> (James Harkins's message of "Tue, 09 Jan 2018 18:58:37 +0800")
Hello,
James Harkins <jamshark70@zoho.com> writes:
> I have several org documents containing source code listings, with references such as the following:
>
> ```
> * Section
>
> #+name: codeblock
> #+caption: Hello, world.
>
> #+BEGIN_SRC C
> // Hello, world
> #+END_SRC
>
> Reference to [[codeblock]].
> ```
>
> I've been doing this for years, never had any problem.
>
> Today, I get the following sort of LaTeX export (assuming the Listings package):
>
> ```
> \section{Section}
> \label{sec:orgheadline1}
> \lstset{language=C,label=codeblock,caption={Hello, world.},captionpos=b,numbers=none}
> \begin{lstlisting}
> // Hello, world
> \end{lstlisting}
>
> Reference to \ref{orgsrcblock1}.
> ```
> Well, there is no label orgsrcblock1, so the exported document shows
> "??" instead of a listing number.
FWIW, I cannot reproduce it on a recent Org.
> So, how do I make source block references work the way they used to?
> Rather critical for me -- this is one of /the/ main reasons why
> I prefer to write in org and export LaTeX.
You could update Org.
> org 8.3.3 -- I'm using the packages provided by Ubuntu 16.04. (I
> realize distro packages are usually behind, but I wouldn't have
> expected a seriously broken org version to make it into package
> repositories, especially for a feature whose malfunction would not be
> tolerated by the technical writers in org's user base. So I suspect
> there must be some configuration issue, rather than a bug.)
I'm also surprised this doesn't work in Org 8.3.3, but my time machine
is being repaired at the moment, so there is nothing I can do about it.
Meanwhile, let me quote the usual licensing stuff, included in every Org
library (caps are not mine):
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
Again, I suggest to update Org. Release 8.3.3 is very old.
Regards,
--
Nicolas Goaziou
prev parent reply other threads:[~2018-01-09 12:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 10:58 Incorrect references to LaTeX Listings James Harkins
2018-01-09 12:35 ` Eric S Fraga
2018-01-10 9:14 ` James Harkins
2018-01-09 12:50 ` Nicolas Goaziou [this message]
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=87wp0r2o30.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=jamshark70@zoho.com \
/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.