[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Re: muse and latex
From: |
Na Li |
Subject: |
[emacs-wiki-discuss] Re: muse and latex |
Date: |
Fri, 13 Jan 2006 12:10:25 -0600 |
User-agent: |
Emacs Gnus |
On 12 Oct 2005, Na Li wrote:
> On 12 Oct 2005, Trent Buck said:
>
> \href{http://www.emacswiki.org/cgi-bin/wiki/PlannerMusePort}{\url{http://www.emacswiki.org/cgi-bin/wiki/PlannerMusePort}}>
> > Isn't \url{URL} sufficient?
>
> Yes, that's true. We need Muse treat bare URLs and explicit links
> differently in LaTeX output.
Hi, to follow up on this, I've added url-bare-link which behaves similarly to
url-link in other documents but LaTeX. It seems to work fine for me. I'm
attaching the diff against the latest muse release. Maybe it can be
considered to be included into main branch.
Again, the advantage of using '\url' is to allow link break of long URLs in
printed output.
Cheers,
Na Li
* looking for address@hidden/muse--rel--3.02--patch-55 to compare with
* comparing to address@hidden/muse--rel--3.02--patch-55
M lisp/muse-xml.el
M lisp/muse-latex.el
M lisp/muse-publish.el
M lisp/muse-texinfo.el
M lisp/muse-docbook.el
M lisp/muse-html.el
* modified files
--- orig/lisp/muse-docbook.el
+++ mod/lisp/muse-docbook.el
@@ -124,6 +124,7 @@
(defcustom muse-docbook-markup-strings
'((url-link . "<ulink url=\"%s\">%s</ulink>")
+ (url-bare-link . "<ulink url=\"%s\">%s</ulink>")
(internal-link . "<link linkend=\"%s\">%s</link>")
(email-addr . "<email>%s</email>")
(emdash . " — ")
--- orig/lisp/muse-html.el
+++ mod/lisp/muse-html.el
@@ -269,6 +269,7 @@
(image-link . "<img src=\"%s\" alt=\"\">")
(url-with-image . "<a class=\"image-link\" href=\"%s\"><img
src=\"%s\"></a>")
(url-link . "<a href=\"%s\">%s</a>")
+ (url-bare-link . "<a href=\"%s\">%s</a>")
(internal-link . "<a href=\"#%s\">%s</a>")
(email-addr . "<a href=\"mailto:%s\">%s</a>")
(emdash . " — ")
--- orig/lisp/muse-latex.el
+++ mod/lisp/muse-latex.el
@@ -159,6 +159,7 @@
(image-link . "\\includegraphics[width=\\textwidth]{%s}")
(url-with-image . "%% %s\n\\includegraphics[width=\\textwidth]{%s}")
(url-link . "\\href{%s}{%s}")
+ (url-bare-link . "\\url{%s}")
(internal-link . "\\hyperlink{%s}{%s}")
(email-addr . "\\verb|%s|")
(emdash . "---")
--- orig/lisp/muse-publish.el
+++ mod/lisp/muse-publish.el
@@ -1062,7 +1062,9 @@
(muse-markup-text 'internal-link (substring url 1)
(or desc orig-url)))
(t
- (muse-markup-text 'url-link url (or desc orig-url))))
+ (if desc
+ (muse-markup-text 'url-link url desc)
+ (muse-markup-text 'url-bare-link url orig-url))))
desc)))
(defun muse-publish-insert-url (url &optional desc explicit)
--- orig/lisp/muse-texinfo.el
+++ mod/lisp/muse-texinfo.el
@@ -128,6 +128,7 @@
(image-link . "@image{%s}")
(url-with-image . "@uref{%s, %s}")
(url-link . "@uref{%s, %s}")
+ (url-link-bare . "@uref{%s, %s}")
(internal-link . "@ref{%s, %s}")
(email-addr . "@email{%s}")
(emdash . "---")
--- orig/lisp/muse-xml.el
+++ mod/lisp/muse-xml.el
@@ -135,6 +135,7 @@
(image-link . "<image href=\"%s\"></image>")
(url-with-image . "<link type=\"image\" href=\"%s\">%s</link>")
(url-link . "<link type=\"url\" href=\"%s\">%s</link>")
+ (url-bare-link . "<link type=\"url\" href=\"%s\">%s</link>")
(email-addr . "<link type=\"email\" href=\"%s\">%s</link>")
(emdash . " -- ")
(comment-begin . "<!-- ")
- [emacs-wiki-discuss] Re: muse and latex,
Na Li <=