Template talk:Tlx
From Wikipedia, the free encyclopedia
Contents |
[edit] Documentation
{{Tlx}} is a generalization of {{Tl|x}}, {{Tlp|x|y}}, {{Tl2|x|y|z}}, etc. with arguably better readable output. This depends on the browser, but too narrow uses of "{", "|", "}" in conjunction with links can be hard to read.
[edit] Usage
- {{Tlx|template name}}
- {{Tlx|template name|param}}
- {{Tlx|template name|1|2|3}}
- {{Tlx|template name|1|2|3|more}}
- {{Tlx|template name|param=value}}
Up to three placeholders for parameters of the specified template
[edit] Example
Code | Result | Remark |
---|---|---|
{{Tlx|x0}} | {{x0}} | |
{{Tlx|x1|one}} | {{x1|one}} | |
{{Tlx|x2|one|two}} | {{x2|one|two}} | |
{{Tlx|x3|1|2|3}} | {{x3|1|2|3}} | |
{{Tlx|x4|1|2|3|4}} | {{x4|1|2|3|etc.}} | up to 3 parameters |
{{Tlx|x4|1|2|3|4}} | {{x4|1|2|3|4}} | | for more |
{{Tlx|x1|x=u}} | {{x1}} | = won't work |
{{Tlx|x1|x=u}} | {{x1|x=u}} | = is okay |
{{Tlx|x1|<nowiki>x=u</nowiki>}} | {{x1|x=u}} | sticky nowiki is okay |
{{Tlx|x2| |two}} | {{x2|two}} | empty won't work |
{{Tlx|x2| |two}} | {{x2| |two}} |   is okay |
{{Tlx|x2| |two}} | {{x2| |two}} | is okay |
{{Tlx|x2| | two}} | {{x2| | two}} | | is okay |
{{Tlx|x2| {{!}} two}} | {{x2| | two}} | {{!}} is dubious |
{{Tlx|x2|2=|3=two}} | {{x2|two}} | empty really doesn't work |
{{Tlx|x2|2=one|two}} | {{x2|two}} | two clobbers 2=one |
{{Tlx|x2|3=two|2=one}} | {{x2|one|two}} | right to left okay |
[edit] Comparison
- As usual we got a zoo of similar templates, * marks redirects to {{Tlx}}:
Usage | Code | Result |
---|---|---|
0 Tlx | {{Tlx|Tl}} |
{{Tl}} |
0 Tl | {{Tl|Tlx}} |
{{Tlx}} |
1 Tlx | {{Tlx|Tlp|one}} |
{{Tlp|one}} |
1 Tlp | {{Tlp|Tlp|one}} |
{{Tlp|one}} |
1 Tetl | {{Tetl|Tlp|one}} |
{{ Tlp|one }} |
2 Tlx | {{Tlx|Tl2|one|two}} |
{{Tl2|one|two}} |
2 Tlp2 * | {{Tlp2|Tlp|Tl|param}} |
{{Tlp|Tl|param}} |
2 Tl2 * | {{Tl2|Tlp|Tl|param}} |
{{Tlp|Tl|param}} |
3 Tlx | {{Tlx|Tl3|1|2|3}} |
{{Tl3|1|2|3}} |
3 Tlp3 * | {{Tlp3|Tl3|1|2|3}} |
{{Tl3|1|2|3}} |
3 Tl3 * | {{Tl3|x3|1|2|3}} |
{{x3|1|2|3}} |
[edit] See also
[edit] Discussion
Add issues below as you see fit, sign with ~~~~
[edit] Thin space
Using <small> </small> is a kludge, putting it mildly, but the proper   is translated to UTF-8 by the server on the fly, and it doesn't work with old browsers. The code column in the example shows this effect - there is of course no such thing as a monospaced  , neither emulated nor real.
Another trick used by {{Tlx}} is <tt>|</tt> for the pipe symbol (vertical bar), a monospaced | adjacent to other text is better visible in the output for proportional fonts. I hope you like it, it's not ideal for text mode browsers. -- Omniplex 21:57, 24 March 2006 (UTC)
[edit] Space should not show up in copy/paste
The extra space between the braces and the name of the template seems like a problem to me. This template is showing up in the main lists of templates (WP:Templates). It is important that editors be able to copy and paste from these lists directly. The extra spaces mess this up. Some css code is needed to insert spacing, without inserting a character. If this "breaks" on older browsers such that the see output similar to {{tl}}, that's fine.--Srleffler 05:57, 11 July 2006 (UTC)