Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using org-mode to produce beamer presentations. I'm having trouble figuring out the best way of including Latex snippets. As far as I can tell, there are two ways of signalling to org-mode to interpret text as LaTeX code.

The first is to sandwich the LaTeX code between:

.....[LateX code here]....

The other is to have the line start with #+LaTeX:

#+LaTeX: .....[LateX code here]....

The problem about both of these methods is that they require the LaTeX code really sits on its own line (or lines) separate from "regular org-mode" code/text. But if I want a bullet point followed by LaTeX code, say a \url{}, this doesn't work, as it has to be on the following line:

* Heading one
** some point
#+LaTeX: \url{http://www.gnu.org}
*** something else

And, unfortunately, org-mode doesn't seem to be to automatically interpret \url{} without LaTeX tags. If I just have:

* Heading one
** \url{http://www.hello-world.net}

Then the PDF output looks like:

* Heading one
** [[http://www.hello-world.net][http://www.hello-world.net]]

So, is there a better way to handle LaTeX snippets generally? And, more specifically, some good way of getting URLs to be processed in some reasonable way? (Reasonable here means that they standout in some way (colour or fontface) and are "clickable".)

Edit: The first suggestion in mvarela's answer is, I think, close to what I want, as it actually "looks like a url" in the output. The other possibility suggested here, as well as Seamus's suggestion, are indeed clickable urls in the pdf output, but are formatted as regular text.


*** \murl{http}{www.google.com}
*** [[http://www.google.com][google.com]]
*** http://www.google.com
*** <http://google.com>

Outputs as:

org output

Only the first one is visually differentiated from other text.

share|improve this question
Can't you just use <www.whatever.com> or does org mode not support that? Check whether orgmode has a native syntax for explicit urls... –  Seamus Aug 9 '12 at 8:35
add comment

1 Answer

This is hackish, but it does the job:

#+LaTeX_HEADER: \newcommand{\murl}[2]{\url{#1://#2}}

You can also just use the org format for URLs in the .org file, which will then be translated into proper TeX:


You can insert such a link with C-c C-l, if you don't feel like typing it.

share|improve this answer
See edited answer above. –  BeSlayed Aug 9 '12 at 15:42
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.