[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: changing \href to \myhref in LaTex export

From: Martin G. Skjæveland
Subject: Re: [Orgmode] Re: changing \href to \myhref in LaTex export
Date: Wed, 20 Jan 2010 14:00:29 +0100
User-agent: Thunderbird (X11/20090817)

Sébastien Vauban wrote:
Hi Martin,

"Martin G. Skjæveland" wrote:
Sébastien Vauban wrote:
"Martin G. Skjæveland" wrote:

is it possible to change how hyperlinks are exported to LaTex without
going into to org-latex.el, but setting by a variable or similar in my
.emacs file?

I would like to export hyperlinks in Latex as \myhref (or something else)
instead of \href, so that I can redefine \myhref using \href, like this


and thus include the URLs of the links as footnotes.
Not answering clearly your question, but an alternative (that works) is to
redefine \href either in your private class (if you use one) or in your TeX

In the latter case, put the `renewcommand' in your Org source, so that it
gets exported every time.

Example (with a `newcommand' here):

--8<---------------cut here---------------start------------->8---
#+LaTeX_HEADER: \newcommand{\figtext}[2]{\begin{tikzpicture} \draw 
(-#1/2,-#1/2) rectangle (#1/2,#1/2); \node[text width=#1] at (0,0) 
{\color{blue}\scriptsize{#2}}; \end{tikzpicture}}
--8<---------------cut here---------------end--------------->8---

I think, for this case, this offers more flexibility and allows you to get
what you want.
yes, this looks like the flexibility I'm after, but my problem with your
solution is that by using \renewcommand I would be defining a recursive
command, which does not work. (I should have mentioned that in my first
email, sorry.) This is the reason for renaming the \href command in the
export, so I can define my own href command using the standard href.

Nope!  You can do that by simply renaming the old version first.

In your case:

--8<---------------cut here---------------start------------->8---
}% href

--8<---------------cut here---------------end--------------->8---

Thanks, what works perfect!

Initially, it did not work, but moving the above code directly below


solved my problems.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]