Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 499
Torsten Bronger Avatar asked Jan 24 '13 14:01

Torsten Bronger


People also ask

How do you add a link in Org mode?

Links in Org are plain text, and you can type or paste them straight into the buffer. By using this command, the links are automatically enclosed in double brackets, and you will be asked for the optional descriptive text.

How do you use Org mode tags?

Org mode has extensive support for tags. Every headline can contain a list of tags; they occur at the end of the headline. Tags are normal words containing letters, numbers, ' _ ', and ' @ '. Tags must be preceded and followed by a single colon, e.g., ' :work: '.

How do you make a table in Org mode?

The easiest way to create a table is to directly type the "|" character at the beginning of a line, or after any amount of white space. This will put you in the first field of an atomic table. Once you've finished editing this cell, you can jump to the next one by pressing TAB .

What is org capture?

org-capture is a way to take notes in Emacs in an unobstructive way. It allows you to open a buffer to enter a note and it'll store it in the correct place based on the type of note you've selected. I must say that I took the term note from it's documentation, but I think that it's a very loose definition of the word.


1 Answers

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.

like image 88
TNT Avatar answered Sep 24 '22 03:09

TNT