As those in the know, er, know, on Wikipedia there's a preprocessor syntax trick known as the 'pipe trick' which strips parentheticals, usually disambiguators, from the display of a link:
[[kingdom (biology)|]] turns into: [[kingdom (biology)|kingdom]]
so that it shows in the text as simply "kingdom", which is usually what you want.
It's a nice trick, but there are two things wrong with this system:
First, since the replacement is done at save time instead of at display time, newbies (who learn the finer points of wiki syntax primarily by looking at how existing articles are written) can't learn the trick without hearing about it or poring through the documentation. The tilde signature system has the same problem; we have to tell newbies about it.
Second, and more importantly, *it's backwards.*
The overwhelming majority of the time we link to a page whose title has a parenthetical in it, we want to hide the parenthetical and let the main word stand alone. I'd be very hard pressed to think of a counter-example that isn't a demonstration of the pipe trick or a discussion about how to phrase a disambiguation.
Wouldn't it be more sensible if [[kingdom (biology)]] _automatically_ displayed as "kingdom", and in the much rarer cases we had to add a pipe to force the long form?
After all, we don't need to add a special character to hide the brackets! They're just part of the markup, telling the wiki parser that it's dealing with a link. Parentheticals are essentially just more markup, telling the parser that the link should point to one of several otherwise ambiguously identified pages.
Thoughts, comments?
What about handling of namespaces and interwiki links? Currently they're displayed be default, and the pipe trick strips them just like parentheticals.
-- brion vibber (brion @ pobox.com)
Brion Vibber brion@pobox.com writes:
Wouldn't it be more sensible if [[kingdom (biology)]] _automatically_ displayed as "kingdom", and in the much rarer cases we had to add a pipe to force the long form?
I'm inclined to say "no". We use the current behavior when we write a disambiguation page (translated from the German Wikipedia):
'''Marburg''' #city in Hesse, Germany: [[Marburg (Lahn)]] #city in Steiermark, Austria: [[Marburg (Drau)]]
(Thus far, both these article do not exist ;) ]
The less tricks, the better. That's also the XML philosophy.
--- Brion Vibber brion@pobox.com wrote:
As those in the know, er, know, on Wikipedia there's a preprocessor syntax trick known as the 'pipe trick' which strips parentheticals, usually disambiguators, from the display of a link:
[[kingdom (biology)|]] turns into: [[kingdom (biology)|kingdom]]
so that it shows in the text as simply "kingdom", which is usually what you want.
It's a nice trick, but there are two things wrong with this system:
First, since the replacement is done at save time instead of at display time, newbies (who learn the finer points of wiki syntax primarily by looking at how existing articles are written) can't learn the trick without hearing about it or poring through the documentation.
You know what ? I feel a newbie, I didnot know about this trick :-)
__________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com
Well, the trick would be a lot more tricky and useful if some genius converted the various [[German language]] links to [[German (language)]] so we wouldn't have to type [[German language|German]] all the time. (And [[Spanish language]] and [[Latin language]] etc.)
|From: Jimmy Wales jwales@bomis.com |Date: Tue, 18 Feb 2003 10:49:27 -0800 | |Anthere wrote: |> You know what ? I feel a newbie, I didnot know about |> this trick :-) | |Yeah, me too! | |--Jimbo |_______________________________________________
Well, the trick would be a lot more tricky and useful if some genius converted the various [[German language]] links to [[German (language)]] so we wouldn't have to type [[German language|German]] all the time. (And [[Spanish language]] and [[Latin language]] etc.)
Yup, this is a general principle we should apply. See my message from a couple of weeks ago:
http://www.wikipedia.org/pipermail/wikien-l/2003-February/000978.html
Regards,
Erik
Ortolan88 wrote:
Well, the trick would be a lot more tricky and useful if some genius converted the various [[German language]] links to [[German (language)]] so we wouldn't have to type [[German language|German]] all the time. (And [[Spanish language]] and [[Latin language]] etc.)
I've created quite a few of these already as redirects. I would support moving [[German language]] to [[German (language)]], period; but in the meantime, you can still link [[German (language)|]] if you like, because [[German (language)]] redirects to [[German language]]. (And if you find one that doesn't redirect, then make it!)
-- Toby
Toby Bartels wrote:
Ortolan88 wrote:
Well, the trick would be a lot more tricky and useful if some genius converted the various [[German language]] links to [[German (language)]] so we wouldn't have to type [[German language|German]] all the time. (And [[Spanish language]] and [[Latin language]] etc.)
I've created quite a few of these already as redirects. I would support moving [[German language]] to [[German (language)]], period; but in the meantime, you can still link [[German (language)|]] if you like, because [[German (language)]] redirects to [[German language]]. (And if you find one that doesn't redirect, then make it!)
Way back when we were arguing about hoe to disambiguate place names, knowing the "pipe trick" would have swayed my vote in favour of [[Paris (Texas)|]] instead of [[Paris, Texas]].
Ec
One of the neat things about reading all these messages is the feeling I get that although a newbie, I'm feeling pretty confident about wiki-editing. I feel a wiki attack coming on... Ay ay ay!!! Wiki'ing is wiki good.
But seriously, thanks for all these neat tricks that keep coming in my inbox. We've made some progress on our ia.wiki.com and it only keeps getting better, thanks to you all! Jay B.
----- Original Message ----- From: "Brion Vibber" brion@pobox.com To: "wikipedia-l" wikipedia-l@wikipedia.org Sent: Tuesday, February 18, 2003 2:05 PM Subject: Re: [Wikipedia-l] The pipe trick (ceci ne soit pas une pipe)
wikipedia-l@lists.wikimedia.org