Discussion:
[Haskell wikibook] links to Examples in section 2
P. R. Stanley
2007-02-26 04:39:03 UTC
Permalink
Hi
the example links seem to lead nowhere in particular. Am I missing
something or, are they effectively redundant and, if so, shall I get
rid of them?
You can find one at Haskell Lists and Tuples after the line
"...build a couple of lists"

Regards
Paul
apfelmus at quantentunnel.de ()
2007-02-26 10:40:35 UTC
Permalink
Post by P. R. Stanley
the example links seem to lead nowhere in particular. Am I missing
something or, are they effectively redundant and, if so, shall I get rid
of them?
You can find one at Haskell Lists and Tuples after the line
"...build a couple of lists"
Ah, like the following <a name="Building_lists"
id="Building_lists"></a>? Missing the href attribute, these are not
links in the original sense, they act as link targets. In the graphical
interface, a click on a related link <a href="#Building_lists">link
text</a> will center the document text around the link target
"Building_lists". Note the # character. Thus, link targets allow to jump
to particular positions on a single page. Of course, links usually jump
between different pages.

In wikibooks, such link targets are created automatically for every
section heading. I don't know whether you can profit from them. Maybe
it's easier for you to read the text from the page where you can also
edit the text. For example, here is the full Internet address of the
edit page of "Haskell/Lists and Tuples":
http://en.wikibooks.org/w/index.php?title=Haskell/Lists_and_tuples&action=edit

Regards,
apfelmus
David House
2007-02-27 15:42:11 UTC
Permalink
Post by apfelmus at quantentunnel.de ()
Ah, like the following <a name="Building_lists"
id="Building_lists"></a>? Missing the href attribute, these are not
links in the original sense, they act as link targets. In the graphical
interface, a click on a related link <a href="#Building_lists">link
text</a> will center the document text around the link target
"Building_lists". Note the # character. Thus, link targets allow to jump
to particular positions on a single page. Of course, links usually jump
between different pages.
Just so you know, the standard way of doing this now is to attach an
id="target" attribute to any element you like. That makes it easier
to, say, give a target to a section header:

Old: <h2><a name="foo">Foo</a></h2>
New: <h2 id="foo">Foo</h2>

(Of course, MediaWiki does this automatically for every header
anyway.) I can't remember browser compatability off the top of my
head, though.
--
-David House, ***@gmail.com
Loading...