Torsten Bronger
Torsten Bronger

Reputation: 11125

How do I link to a LABEL in org-mode?

In org-mode, I have defined a figure+caption like this:

#+CAPTION: My great figure
#+LABEL: fig:myfigure
[[myfigure.png]]

How do I write "See figure [myfigure]"? I've found the following syntax:

See figure \ref{fig:myfigure}

but this looks ugly in the source file. In particular, you cannot use it for actually jumping to the figure.

Upvotes: 8

Views: 6255

Answers (2)

TNT
TNT

Reputation: 2511

You actually don't need '#+NAME', it works fine if you use '#+LABEL', which won't break your short-caption for list of figures.

Orgmode does now offer a 'jumpable', enumerated or link with name of your choice in the exported (latex, html) text if you link with:

see figure [[fig:myfigure]].

or

see figure [[fig:myfigure][figurenameintext]].

I would have added this as a comment, but I don't have the reputation yet.

-- In response to your comment (still can't comment): you do need the '#+NAME' for it to jump within the .org source file; as mentioned in the manual, and i also just confirmed that works. Not sure about the short-captions in the latest version.

Upvotes: 9

rvf0068
rvf0068

Reputation: 1389

With a very recent org-mode, you can use #+name:, see: http://thread.gmane.org/gmane.emacs.orgmode/62644/focus=62646

#+CAPTION: My great figure
#+LABEL: fig:myfigure
#+name: fig:myfigure
[[test.png]]

See figure [[fig:myfigure][test]].

This works for me to jump from the link , but has no effect when exporting, I'm afraid...

Upvotes: 5

Related Questions