From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: changing \href to \myhref in LaTex export Date: Wed, 20 Jan 2010 09:40:40 +0100 Message-ID: <87ockpdv93.fsf@mundaneum.com> References: <4B55D04B.7050305@ifi.uio.no> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Martin, "Martin G. Skj=C3=A6veland" wrote: > > is it possible to change how hyperlinks are exported to LaTex without goi= ng > 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 > > \usepackage{ifthen} > \newcommand{\myhref}[2]{ > \ifthenelse{\equal{#1}{#2}} > {\href{#1}{#2}} > {\href{#1}{#2}\footnote{\url{#1}}} > } > > 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 file. In the latter case, put the `renewcommand' in your Org source, so that it g= ets 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=3D#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. Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode