[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: overlong @uref
From: |
Karl Berry |
Subject: |
Re: overlong @uref |
Date: |
Fri, 7 Mar 2003 15:19:56 -0500 |
A sufficient solution would be a command similar to `""' from
german.sty to insert a zero-width break point. It should be rather
straightforward to implement -- what about calling it address@hidden' or
`@/'?
I liked @/ for the name. Here's a patch; also in the current cvs. Let
me know if problems or suggestions. Thanks.
Index: doc/texinfo.tex
===================================================================
RCS file: /cvsroot/texinfo/texinfo/doc/texinfo.tex,v
retrieving revision 1.65
diff -c -2 -r1.65 texinfo.tex
*** doc/texinfo.tex 7 Mar 2003 13:43:24 -0000 1.65
--- doc/texinfo.tex 7 Mar 2003 19:09:34 -0000
***************
*** 4,8 ****
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
! \def\texinfoversion{2003-03-07.05}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
--- 4,8 ----
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
! \def\texinfoversion{2003-03-07.10}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
***************
*** 72,80 ****
\chardef\other=12
! % We never want plain's outer \+ definition in Texinfo.
% For @tex, we can use \tabalign.
\let\+ = \relax
! % Save some parts of plain tex whose names we will redefine.
\let\ptexb=\b
\let\ptexbullet=\bullet
--- 72,80 ----
\chardef\other=12
! % We never want plain's \outer definition of \+ in Texinfo.
% For @tex, we can use \tabalign.
\let\+ = \relax
! % Save some plain tex macros whose names we will redefine.
\let\ptexb=\b
\let\ptexbullet=\bullet
***************
*** 93,96 ****
--- 93,97 ----
\let\ptexplus=+
\let\ptexrbrace=\}
+ \let\ptexslash=\/
\let\ptexstar=\*
\let\ptext=\t
***************
*** 538,541 ****
--- 539,545 ----
\def\*{\hfil\break\hbox{}\ignorespaces}
+ % @/ allows a line break.
+ \let\/=\allowbreak
+
% @. is an end-of-sentence period.
\def\.{.\spacefactor=3000 }
***************
*** 4430,4433 ****
--- 4434,4438 ----
\let\+=\tabalign
\let\}=\ptexrbrace
+ \let\/=\ptexslash
\let\*=\ptexstar
\let\t=\ptext
Index: doc/texinfo.txi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/doc/texinfo.txi,v
retrieving revision 1.30
diff -c -2 -r1.30 texinfo.txi
*** doc/texinfo.txi 11 Feb 2003 13:27:17 -0000 1.30
--- doc/texinfo.txi 7 Mar 2003 19:10:37 -0000
***************
*** 6442,6452 ****
@cindex Man page, reference to
! The third argument, on the other hand, if specified is also the text to
! display, but the url is @emph{not} output in any format. This is useful
! when the text is already sufficiently referential, as in a man page. If
the third argument is given, the second argument is ignored.
! The simple one argument form, where the url is both the target and the
! text of the link:
@example
--- 6442,6458 ----
@cindex Man page, reference to
! The third argument, if specified, is the text to display, but in this
! case the url is @emph{not} output in any format. This is useful when
! the text is already sufficiently referential, as in a man page. If
the third argument is given, the second argument is ignored.
! If the url is long enough to cause problems with line breaking, you
! may find it useful to insert @code{@@/} at places where a line break
! would be acceptable (after @samp{/} characters, for instance). This
! tells @TeX{} to allow (but not force) a line break at those places.
! @xref{Line Breaks}.
!
! Here is an example of the simple one argument form, where the url is
! both the target and the text of the link:
@example
***************
*** 6510,6518 ****
@noindent
! @cindex <URL convention, not used
You can use this form in the input file if you wish. We feel it's not
! necessary to clutter up the output with the extra @samp{<URL:} and
! @samp{>}, since any software that tries to detect url's in text already
! has to detect them without the @samp{<URL:} to be useful.
--- 6516,6524 ----
@noindent
! @cindex <URL: convention, not used
You can use this form in the input file if you wish. We feel it's not
! necessary to include the @samp{<URL:} and @samp{>} in the output,
! since any software that tries to detect url's in text already has to
! detect them without the @samp{<URL:} to be useful.
***************
*** 10468,10481 ****
@node Line Breaks
! @section @code{@@*}: Generate Line Breaks
@findex * @r{(force line break)}
@cindex Line breaks
@cindex Breaks in a line
The @code{@@*} command forces a line break in both the printed manual and
! in address@hidden
! @need 700
! For example,
@example
--- 10474,10489 ----
@node Line Breaks
! @section @code{@@*} and @code{@@/}: Generate and Allow Line Breaks
@findex * @r{(force line break)}
+ @findex / @r{(allow line break)}
@cindex Line breaks
@cindex Breaks in a line
+ @cindex Force line break
+ @cindex Allow line break
The @code{@@*} command forces a line break in both the printed manual and
! in Info. The @code{@@/} command allows a line break (printed manual only).
! Here is an example with @code{@@*}:
@example
***************
*** 10483,10488 ****
@end example
! @noindent
! produces
@example
--- 10491,10495 ----
@end example
! @noindent produces
@example
***************
*** 10494,10514 ****
@end example
! The @code{@@*} command is often used in a file's copyright page:
@example
! @group
! This is edition 2.0 of the Texinfo documentation,@@*
! and is for @dots{}
! @end group
@end example
! @noindent
! In this case, the @code{@@*} command keeps @TeX{} from stretching the
! line across the whole page in an ugly manner.
! Do not write an @code{@@refill} command at the end of a paragraph
! containing an @code{@@*} command; it will cause the paragraph to be
! refilled after the line break occurs, negating the effect of the line
! address@hidden
--- 10501,10527 ----
@end example
! Do not write an @code{@@refill} command at the end of a paragraph
! containing an @code{@@*} command; it will cause the paragraph to be
! refilled after the line break occurs, negating the effect of the line
! break. @xref{Refilling Paragraphs}.
!
! The @code{@@/} command can be useful within a url
! (@pxref{uref,,@code{@@uref}}), which tend to be long and are otherwise
! unbreakable. For example:
@example
! The official Texinfo home page is on the GNU web site:
! @@address@hidden://www.gnu.org/@@/software/@@/gnu/@@/address@hidden
@end example
! @noindent produces
! @display
! The official Texinfo home page is on the GNU web site:
! @uref{http://www.gnu.org/@/software/@/gnu/@/texinfo}.
! @end display
!
! @noindent Without the @code{@@/} commands, @TeX{} would have nowhere to
! break the line. @code{@@/} has no effect in the online output.
***************
*** 15213,15216 ****
--- 15226,15232 ----
Produce a period that really does end a sentence (usually after an
end-of-sentence capital letter). @xref{Ending a Sentence}.
+
+ @item @/
+ Produces no output, but allows a line break. @xref{Line Breaks}.
@item @@:
Index: makeinfo/cmds.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/cmds.c,v
retrieving revision 1.16
diff -c -2 -r1.16 cmds.c
*** makeinfo/cmds.c 12 Jan 2003 15:18:24 -0000 1.16
--- makeinfo/cmds.c 7 Mar 2003 19:10:39 -0000
***************
*** 95,98 ****
--- 95,99 ----
{ "-", cm_no_op, NO_BRACE_ARGS },
{ ".", insert_self, NO_BRACE_ARGS },
+ { "/", cm_no_op, NO_BRACE_ARGS },
{ ":", cm_no_op, NO_BRACE_ARGS },
{ "=", cm_accent, MAYBE_BRACE_ARGS },
Index: makeinfo/makeinfo.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.21
diff -c -2 -r1.21 makeinfo.c
*** makeinfo/makeinfo.c 6 Mar 2003 14:05:30 -0000 1.21
--- makeinfo/makeinfo.c 7 Mar 2003 19:10:43 -0000
***************
*** 837,841 ****
/* @; and @\ are not Texinfo commands, but they are listed here
anyway. I don't know why. --karl, 10aug96. */
! return strchr ("~{|address@hidden;:.-,*\'\" !\n\t", character) != NULL;
}
--- 837,841 ----
/* @; and @\ are not Texinfo commands, but they are listed here
anyway. I don't know why. --karl, 10aug96. */
! return strchr ("~{|address@hidden;:./-,*\'\" !\n\t", character) != NULL;
}