[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5389] pdf output from @uref same as dvi, always showing given url
From: |
karl |
Subject: |
[5389] pdf output from @uref same as dvi, always showing given url |
Date: |
Mon, 25 Nov 2013 18:22:28 +0000 |
Revision: 5389
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5389
Author: karl
Date: 2013-11-25 18:22:27 +0000 (Mon, 25 Nov 2013)
Log Message:
-----------
pdf output from @uref same as dvi, always showing given url
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/doc/texinfo.tex
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2013-11-09 22:36:25 UTC (rev 5388)
+++ trunk/ChangeLog 2013-11-25 18:22:27 UTC (rev 5389)
@@ -1,3 +1,17 @@
+2013-11-25 Karl Berry <address@hidden>
+
+ * doc/texinfo.tex (\urefbreakfinish): change the default PDF
+ output to show the url even if the second arg is given, like DVI.
+ Suggestion from Arnold Robbins.
+ (\ifurefurlonlylink): new ``secret'' conditional for the previous
+ PDF output: only show the second arg, with the url as the link target.
+
+2013-11-09 Karl Berry <address@hidden>
+
+ * util/htmlxref.cnf (GRUB): new variable.
+ (multiboot): new grub manual.
+ webmasters #832039.
+
2013-11-07 Karl Berry <address@hidden>
* info/infomap.c (default_emacs_like_info_keys): somehow
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2013-11-09 22:36:25 UTC (rev 5388)
+++ trunk/NEWS 2013-11-25 18:22:27 UTC (rev 5389)
@@ -23,6 +23,10 @@
-------------------------------------------------------------------------------
+* texinfo.tex:
+ . @url/@uref output now the same in PDF as in DVI, showing the url
+ even if the second argument is given, not just as link target.
+
5.2 (26 September 2013)
* Language:
. new commands @inlinefmtifelse, @inlineifset, @inlineifclear, for
Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex 2013-11-09 22:36:25 UTC (rev 5388)
+++ trunk/doc/texinfo.tex 2013-11-25 18:22:27 UTC (rev 5389)
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2013-09-11.11}
+\def\texinfoversion{2013-11-25.10}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -2578,33 +2578,17 @@
% second argument specifying the text to display and an optional third
% arg as text to display instead of (rather than in addition to) the url
% itself. First (mandatory) arg is the url.
-% (This \urefnobreak definition isn't used now, leaving it for a while
-% for comparison.)
-\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
-\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
- \unsepspaces
- \pdfurl{#1}%
- \setbox0 = \hbox{\ignorespaces #3}%
- \ifdim\wd0 > 0pt
- \unhbox0 % third arg given, show only that
- \else
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0 > 0pt
- \ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
- \else
- \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
- \fi
- \else
- \code{#1}% only url given, so show it
- \fi
- \fi
- \endlink
-\endgroup}
-% This \urefbreak definition is the active one.
+% secret option to allow changing PDF output to show only the second
+% arg (if given), and not the url (which is then just the link target).
+\newif\ifurefurlonlylink
+
+% The main macro is \urefbreak, which allows breaking at expected
+% places within the url. (There used to be another version, which
+% didn't support automatic breaking.)
\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
\let\uref=\urefbreak
+%
\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
\unsepspaces
@@ -2613,12 +2597,19 @@
\ifdim\wd0 > 0pt
\unhbox0 % third arg given, show only that
\else
- \setbox0 = \hbox{\ignorespaces #2}%
+ \setbox0 = \hbox{\ignorespaces #2}% look for second arg
\ifdim\wd0 > 0pt
\ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
+ \ifurefurlonlylink
+ % PDF plus option to not display url, show just arg
+ \unhbox0
+ \else
+ % PDF, normally display both arg and url for consistency,
+ % visibility, if the pdf is eventually used to print, etc.
+ \unhbox0\ (\urefcode{#1})%
+ \fi
\else
- \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+ \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
\fi
\else
\urefcode{#1}% only url given, so show it
@@ -3691,7 +3682,7 @@
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
%
- % Try typesetting the item mark that if the document erroneously says
+ % Try typesetting the item mark so that if the document erroneously says
% something like @itemize @samp (intending @table), there's an error
% right away at the @itemize. It's not the best error message in the
% world, but it's better than leaving it to the @item. This means if
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5389] pdf output from @uref same as dvi, always showing given url,
karl <=