[many corrections to link abbreviations Panu Kalliokoski **20040718015754 Keywords: (atehwa@sange.fi--2004/stx2any--prod--2--patch-120) ] { addfile ./regression/link-abbrev.docbook-xml addfile ./regression/link-abbrev.html addfile ./regression/link-abbrev.latex addfile ./regression/link-abbrev.man hunk ./common/gatherlinkmap.lsed 8 -We will have some macro open all the time. -{{{ -1i\ -w_void( -$a\ -`'')dnl -}}} - hunk ./common/gatherlinkmap.lsed 19 -s#^.*\[+\([^]]*\)+\].*$#define(`@w_label_of_\1', w_make_label)#p +s#^.*\[+\([^]]*\)+\].*$#define(`@w_label_of_\1', w_make_label)dnl#p hunk ./common/gatherlinkmap.lsed 21 -$a\ -`'')dnl hunk ./common/gatherlinkmap.lsed 30 -i\ -`'')w_void( +x +s#$#`'')dnl#p hunk ./common/gatherlinkmap.lsed 36 -From here on, we are within a link data block. +From here on, we are within a link data block. During that, we keep the +previous line in hold space. hunk ./common/gatherlinkmap.lsed 41 -s#^\[\([A-Za-z0-9][A-Za-z0-9]*\)\] #')define(`@w_linkdata_of_\1',`# +}}} + +The case that we have a new datum: +{{{ +/^\[\([A-Za-z0-9][A-Za-z0-9]*\)\] /{ +s##define(`@w_linkdata_of_\1',`# hunk ./common/gatherlinkmap.lsed 48 +x +/./!d +s#$#`'')dnl#p +d +} hunk ./common/gatherlinkmap.lsed 54 + +The case that we don't: +{{{ +s#^ *## +x +}}} + hunk ./common/linking.lsed 44 -s#\([^`]\)\(https*://[^ ]*[A-Za-z0-9_/]\)#\1w_url(`\2')#g -s#\([^`]\)\(ftps*://[^ ]*[A-Za-z0-9_/]\)#\1w_url(`\2')#g -s#\([^`]\)\(gopher://[^ ]*[A-Za-z0-9_/]\)#\1w_url(`\2')#g -s#\([^`]\)\(nntp://[^ ]*[A-Za-z0-9_/]\)#\1w_url(`\2')#g -s#\([^`]\)\(file:/[^ ]*[A-Za-z0-9_]\)#\1w_url(`\2')#g -s#\([^`]\)\(mailto:[^ ]*[A-Za-z0-9_]\)#\1w_url(`\2')#g -s#\([^`]\)\(news:[^ ]*[A-Za-z0-9_]\)#\1w_url(`\2')#g +s#\([ ([{<"'-]\)\(https*://[^ ]*[A-Za-z0-9_/]\)#\1w_url(`\2')#g +s#\([ ([{<"'-]\)\(ftps*://[^ ]*[A-Za-z0-9_/]\)#\1w_url(`\2')#g +s#\([ ([{<"'-]\)\(gopher://[^ ]*[A-Za-z0-9_/]\)#\1w_url(`\2')#g +s#\([ ([{<"'-]\)\(nntp://[^ ]*[A-Za-z0-9_/]\)#\1w_url(`\2')#g +s#\([ ([{<"'-]\)\(file:/[^ ]*[A-Za-z0-9_]\)#\1w_url(`\2')#g +s#\([ ([{<"'-]\)\(mailto:[^ ]*[A-Za-z0-9_]\)#\1w_url(`\2')#g +s#\([ ([{<"'-]\)\(news:[^ ]*[A-Za-z0-9_]\)#\1w_url(`\2')#g hunk ./common/markup.lm4 163 - `ifdef(`@w_label_of_$1', `w_label(defn(`@w_label_of_$1'), + `ifdef(`@w_label_of_$1', `w_refer(defn(`@w_label_of_$1'), hunk ./common/markup.lm4 167 - `ifelse(w_is_url(`$1'),t,`ifelse(`$2',,`w_url(`$1')',`w_link(`$1',`$2')')', - `$2`'w_footnote(`$1')')')')')')') + `ifelse(index(`$1',img:),0, `w_img(substr(`$1', 4), `$2')', + `ifelse(w_is_url(`$1'),t,`ifelse(`$2',,`w_url(`$1')',`w_link(`$1',`$2')')', + `$2`'w_footnote(`$1')')')')')')')') hunk ./regression/link-abbrev.docbook-xml 1 + + +
+ + + + + +<Anchor id="label.1"/><Link linkend="label.1.rev">Testing link abbreviations</Link> + +First paragraph. It does +not have anything weird. + +Second paragraph. It doesn't have anything weird, either. There's +just a line that begins with something that looks quite a lot like a +linkdata block. Do we manage it? + +Okay, now for the real thing. There should be all kinds of +links here. See Testing link abbreviations to get a hold of what +they all mean. This is a longer footnote, +possibly spanning multiple lines.. + +There are longer links: ftp://ftp.rfc-editor.org/in-notes/rfc1355.txt and friends. The problem with +URI'sRFC2396 is that you have hard time knowing where they stop. Take +for example http://www.plt-scheme.org/: why is the slash included but +the colon notDon't tell me that properly quoted URI's won't have colons in +such positions. People tend not to properly quote URI's.? (Another example is +http://c2.com/cgi/quickChanges, or http://sange.fi/~atehwa/index.html...) + +Here is also an + +inline image +. Please jump back. + + +
hunk ./regression/link-abbrev.html 1 + + + + + + + + + + +

Testing link abbreviations

+ +

First paragraph. It does +not have anything weird. + +

Second paragraph. It doesn't have anything weird, either. There's +just a line that begins with something that looks quite a lot like a +[1] block. Do we manage it? +
[1] linkdata
+ +

Okay, now for the real thing. There should be all kinds of +links here. See Testing link abbreviations to get a hold of what +they all mean. [2]. +
[2] This is a longer footnote, +possibly spanning multiple lines.
+ +

There are longer links: ftp://ftp.rfc-editor.org/in-notes/rfc1355.txt and friends. The problem with +URI's[3] is that you have hard time knowing where they stop. Take +for example http://www.plt-scheme.org/: why is the slash included but +the colon not[4]? (Another example is +http://c2.com/cgi/quickChanges, or http://sange.fi/~atehwa/index.html...) +
[3] RFC2396
+[4] Don't tell me that properly quoted URI's won't have colons in +such positions. People tend not to properly quote URI's.
+ +

Here is also an inline image. Please jump back. + + + hunk ./regression/link-abbrev.latex 1 +\documentclass[a4paper,notitlepage]{article} + +\usepackage[T1]{fontenc} +\usepackage[latin1]{inputenc} +\newcommand{\strongemph}[1]{\textbf{#1}} +\newcommand{\litfmt}[1]{\texttt{#1}} +\title{} +\author{} +\date{} +\usepackage{url} +\usepackage{graphicx} +\begin{document} +\maketitle + + +\section*{\label{label.1}Testing link abbreviations} + +First paragraph. It does +not have anything weird. + +\label{label.2}Second paragraph. It doesn't have anything weird, either. There's +just a line that begins with something that looks quite a lot like a +\footnote{linkdata} block. Do we manage it? + +Okay, now for the real\footnote{\url{mailto:some.email@address.fi}} thing. There should be all kinds of\footnote{\url{ftp://ftp.spoogle.com/}} +links here. See ``Testing link abbreviations (\pageref{label.1})'' to get a hold of what +they all mean\footnote{\url{http://www.meaning.org/}}. \footnote{This is a longer footnote, +possibly spanning multiple lines.}. + +There are longer links: \url{ftp://ftp.rfc-editor.org/in-notes/rfc1355.txt} and friends. The problem with +URI's\footnote{RFC2396} is that you have hard time knowing where they stop. Take +for example \url{http://www.plt-scheme.org/}: why is the slash included but +the colon not\footnote{Don't tell me that properly quoted URI's won't have colons in +such positions. People tend not to properly quote URI's.}? (Another example is +\url{http://c2.com/cgi/quickChanges}, or \url{http://sange.fi/~atehwa/index.html}...) + +Here is also an \includegraphics{pictures/zebra.eps}. Please jump back (\pageref{label.2}). + +\end{document} hunk ./regression/link-abbrev.man 1 +.TH "" "" "" "" +.SH Testing link abbreviations +.PP +First paragraph. It does +not have anything weird. +.PP +Second paragraph. It doesn't have anything weird, either. There's +just a line that begins with something that looks quite a lot like a +\& +.SM [1] +\& block. Do we manage it? +.br +\& +.SM [1] +\& linkdata +.br +.PP +Okay, now for the real\& +.SM [2] +\& thing. There should be all kinds of\& +.SM [3] +\& +links here. See \(lqTesting link abbreviations\(rq to get a hold of what +they all mean\& +.SM [4] +\&. \& +.SM [5] +\&. +.br +\& +.SM [2] +\& mailto:some.email@address.fi +.br +\& +.SM [3] +\& ftp://ftp.spoogle.com/ +.br +\& +.SM [4] +\& http://www.meaning.org/ +.br +\& +.SM [5] +\& This is a longer footnote, +possibly spanning multiple lines. +.br +.PP +There are longer links: \fCftp://ftp.rfc-editor.org/in-notes/rfc1355.txt\fP and friends. The problem with +URI's\& +.SM [6] +\& is that you have hard time knowing where they stop. Take +for example \fChttp://www.plt-scheme.org/\fP: why is the slash included but +the colon not\& +.SM [7] +\&? (Another example is +\fChttp://c2.com/cgi/quickChanges\fP, or \fChttp://sange.fi/~atehwa/index.html\fP...) +.br +\& +.SM [6] +\& RFC2396 +.br +\& +.SM [7] +\& Don't tell me that properly quoted URI's won't have colons in +such positions. People tend not to properly quote URI's. +.br +.PP +Here is also an +.PSPIC "pictures/zebra.eps" +. Please jump back. + + hunk ./regression/link-abbrev.test 37 +Here is also an [inline image][6]. Please jump back[Second paragraph]. + }