texinfo-commits
[Top][All Lists]
Advanced

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

texinfo ChangeLog doc/texinfo.tex


From: Oleg Katsitadze
Subject: texinfo ChangeLog doc/texinfo.tex
Date: Tue, 18 Jan 2011 06:02:55 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Oleg Katsitadze <olegkat>       11/01/18 06:02:55

Modified files:
        .              : ChangeLog 
        doc            : texinfo.tex 

Log message:
        * doc/texinfo.tex (@uref):  Allow line breaks after and stretchable glue
        around ., # and / characters in URLs.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/ChangeLog?cvsroot=texinfo&r1=1.1200&r2=1.1201
http://cvs.savannah.gnu.org/viewcvs/texinfo/doc/texinfo.tex?cvsroot=texinfo&r1=1.333&r2=1.334

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.1200
retrieving revision 1.1201
diff -u -b -r1.1200 -r1.1201
--- ChangeLog   16 Jan 2011 01:14:58 -0000      1.1200
+++ ChangeLog   18 Jan 2011 06:02:53 -0000      1.1201
@@ -1,3 +1,8 @@
+2011-01-17  Oleg Katsitadze <address@hidden>
+
+       * doc/texinfo.tex (@uref):  Allow line breaks after and
+       stretchable glue around ., # and / characters in URLs.
+
 2011-01-15  Karl Berry  <address@hidden>
 
        * doc/texinfo.txi (\includezzz, \doverbatiminclude): report what's

Index: doc/texinfo.tex
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.tex,v
retrieving revision 1.333
retrieving revision 1.334
diff -u -b -r1.333 -r1.334
--- doc/texinfo.tex     16 Jan 2011 01:14:58 -0000      1.333
+++ doc/texinfo.tex     18 Jan 2011 06:02:54 -0000      1.334
@@ -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{2011-01-15.17}
+\def\texinfoversion{2011-01-17.21}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -168,6 +168,8 @@
 \chardef\rquoteChar= `\'
 \chardef\semiChar  = `\;
 \chardef\underChar = `\_
+\chardef\slashChar = `\/
+\chardef\hashChar  = `\#
 
 % Ignore a token.
 %
@@ -2487,6 +2489,20 @@
     \codex
   }
 }
+% This is similar to \code, but allows line breaks after ., # and /.
+{
+  \catcode`\.=\active \catcode`\#=\active \catcode`\/=\active
+  %
+  \global\def\urefcode{\begingroup
+    \setupmarkupstyle{code}%
+    \catcode\dotChar=\active \catcode\hashChar=\active
+    \catcode\slashChar=\active
+    \let.\urefcodedot
+    \let#\urefcodehash
+    \let/\urefcodeslash
+    \codex
+  }
+}
 
 \def\realdash{-}
 \def\codedash{-\discretionary{}{}{}}
@@ -2501,6 +2517,20 @@
              \discretionary{}{}{}}%
             {\_}%
 }
+\def\urefprestretch{\nobreak \hskip0pt plus.13em }
+\def\urefpoststretch{\allowbreak \hskip0pt plus.1em }
+\def\urefcodedot{\urefprestretch .\urefpoststretch}
+\def\urefcodehash{\urefprestretch \#\urefpoststretch}
+\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
+{
+  \catcode`\/=\active
+  \global\def\urefcodeslashfinish{%
+    \urefprestretch \slashChar
+    % Allow line break only after the final / in a sequence of
+    % slashes, to avoid line break between the slashes in http://.
+    \ifx\next/\else \urefpoststretch \fi
+  }
+}
 \def\codex #1{\tclose{#1}\endgroup}
 
 % An additional complication: the above will allow breaks after, e.g.,
@@ -2589,10 +2619,12 @@
       \ifpdf
         \unhbox0             % PDF: 2nd arg given, show only it
       \else
-        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+        % \empty at the end of \scantokens arg gets rid of
+        % trailing newline (and ultimate spurious whitespace).
+        \unhbox0\ (\urefcode{\scantokens{#1\empty}})% DVI: 2nd arg given, show 
both it and url
       \fi
     \else
-      \code{#1}% only url given, so show it
+      \urefcode{\scantokens{#1\empty}}% only url given, so show it
     \fi
   \fi
   \endlink



reply via email to

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