From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sharon Kimble Subject: Re: How to wavy/double underline an org-mode link? Date: Mon, 24 Jul 2017 14:22:08 +0100 Message-ID: <87pocqufzz.fsf@skimble.plus.com> References: <2535f962381540a18db893c8c5f44f34@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87k230px78.fsf@delle7240.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZdJW-0005K8-99 for emacs-orgmode@gnu.org; Mon, 24 Jul 2017 09:22:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZdJS-0003fY-4x for emacs-orgmode@gnu.org; Mon, 24 Jul 2017 09:22:22 -0400 Received: from avasout08.plus.net ([212.159.14.20]:35195) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dZdJR-0003aY-UU for emacs-orgmode@gnu.org; Mon, 24 Jul 2017 09:22:18 -0400 In-Reply-To: <87k230px78.fsf@delle7240.chemeng.ucl.ac.uk> (Eric S. Fraga's message of "Sat, 22 Jul 2017 11:44:59 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eric S Fraga writes: > On Saturday, 22 Jul 2017 at 10:35, Sharon Kimble wrote: > > [...] > >> I've found that I can underline each org-mode link by putting '_' before >> and after each link, which is then exported to a latex file and built >> into the pdf and does work. But, I am already underlining each glossary >> entry in the main body of the text, so to differentiate I would like >> either a wavy underline, or a double underline. But how please? > > Have a look at org-link-parameters variable and this page for LaTeX > suggestions on how to double-underline: > > http://tex.stackexchange.com/questions/249616/ddg#249617 Thanks to Eric and Rasmus who replied. I did try using a double-underline but it looked so horrible I changed it very quickly! This is what I've ended up using - =2D-8<---------------cut here---------------start------------->8--- %% https://tex.stackexchange.com/questions/311132/how-to-style-hrefs-underl= ined-and-coloured-throughout-the-document?noredirect=3D1&lq=3D1 \usepackage{ulem} \makeatletter \begingroup \catcode`\$=3D6 % \catcode`\#=3D12 % \gdef\href@split$1#$2#$3\\$4{% \hyper@@link{$1}{$2}{\dashuline{$4}}% or \underline \endgroup }% \endgroup \makeatother %% https://tex.stackexchange.com/questions/49862/having-all-links-underline= d-with-dotted-line?noredirect=3D1&lq=3D1 \usetikzlibrary{calc} \makeatletter \newlength\link@width \newsavebox\link@box \newcommand{\formatlink}[1]{% % --- save the box to be displayed (so that e.g. footnote counters do not % get incremented twice) \savebox{\link@box}{#1}% % --- calculate the width of the box for later use \settowidth\link@width{\usebox{\link@box}}% % --- draw the link \tikz[baseline=3D(todotted.base)]{ \node[inner sep=3D-1pt,outer sep=3D0pt] (todotted) {\usebox{\link@box}}; \draw[dotted, thick]=20 ($(todotted.base)-(.5\link@width,2pt)$) -- +(\link@width,0);=20 }% } \AtBeginDocument{% % --- replace \ref command % \let\oldref=3D\ref % \renewcommand\ref[1]{\formatlink{\oldref{#1}}} % --- replace hyperref command \let\oldhyperref=3D\hyperref \renewcommand\hyperref[2][]{\formatlink{\oldhyperref[#1]{#2}}} % --- replace footnote command % \let\oldfootnote=3D\footnote % \renewcommand\footnote[1]{\formatlink{\footnotemark}\footnotetext{#1}} % --- replace cite command % \let\oldcite=3D\cite % \renewcommand\cite[1]{\formatlink{\oldcite{#1}}} % --- introduce secref command=20=20=20 % \newcommand\secref[1]{\hyperref[#1]{Section \oldref{#1}}} } \makeatother =2D-8<---------------cut here---------------end--------------->8--- I've saved it as 'code-1.tex' and just use it as '#+latex_header: \input{/home/boudiccas/research/code-1}' at the end of my package list in my org-mode source document. And its now working perfectly.=20 Thanks Sharon. =2D-=20 A taste of linux =3D http://www.sharons.org.uk TGmeds =3D http://www.tgmeds.org.uk DrugFacts =3D https://www.drugfacts.org.uk=20=20 Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.0.9 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAll19IAACgkQNoGAGQr4 g1vx4Q/7BPRFPIxhEtQLSiUq9+2D+KR8xr21gDacaYNRT2mQAsvof/2S8EbbWhDT U0EF1Pq06optxlHhnwdcpt9jTed/zZjkr/GZl4R+3U8bqpYNkm5o4vHZlGotsghT 8wJrQ9aVaEovn8qqSnDGjZ+9At8fs28XQnhA22+wuxL38ygGXpa4snx5mHGLj6T2 2hLiWHCXYOOWCnTwMmekIAn8tCjGCLKzMLTMkc7DDMqh6lU0NezwIeaQ7aPWwBQ3 DRiDezlCtVGw0YkC6QNnWJmTjhu19CedUvL/4tRTPDthX+K8kTAFtcEaC43rnSLz Pf6UBKLhSK+ncX94GDkjWUi8RwQEU9fjkqK8TSQHeDbsx7RIhU4FxYOwpQN2y3W/ 6XTt4EV/R+QUelo/WXzdsER+wdAVqAXtm4ToVg1ZyRMvWvdfcCEyaUeBaDVmdAal LF9xqcfryl6/B7dJjJ0zG33R3b2LcxhgdUhklZkUEHlOKSihEy9R84mxaG8InwTF pPmzMcdF6Bo0sYpEHRlpGMWCipYW1xh4PmPCXyk1CDhZKDb+/vhh9kIqgSK/kjp1 DU3wMmsqcijotnHAnXQtclH7dAoDd/rAa5rAru1ydY0fGPc/RcSJQ8cpPdOG9ljV 0dT+zN5tmN/6ssy2M6Q9iem2r4Ys05z4Da2KQfCxMBb3z8sVi6o= =rI86 -----END PGP SIGNATURE----- --=-=-=--