Template talk:Tlx

= Documentation =

{&#123;Template:&#125;} is a generalization of, , , 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. Its purpose is to make well-formatted links to pages easier to type.

Usage

 * {&#123;|template name&#125;}
 * {&#123;|template name|param&#125;}
 * {&#123;|template name|1|2|3&#125;}
 * {&#123;|template name|1|2|3&amp;#124;more&#125;}
 * {&#123;|template name|param&amp;#61;value&#125;}

Up to three placeholders for parameters of the specified template

Comparison

 * As usual we have a zoo of similar templates, * marks redirects to :

Thin space
Using &lt;small&gt;&amp;#160;&lt;/small&gt; is a kludge, putting it mildly, but the proper &amp;thinsp; 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 &amp;thinsp;, neither emulated nor real.

Another trick used by is &lt;tt&gt;&amp;#124;&lt;/tt&gt;</tt> for the pipe symbol (vertical bar), a monospaced |</tt> 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. --&#160;Omniplex 21:57, 24 March 2006 (UTC)

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)

No spaces
I really don't see any need for them. They look hideous; they make the output take up much more space; they're inconsistent with ; and they cause the output to break across lines.  Λυδ α  cιτγ  04:03, 30 January 2007 (UTC)

Now virtually illegible in Safari
The template name is so small, and bold, as to be nearly unreadable in the Safari web browser (actually unreadable, for many people with poorer eyesight than I have). Please just make it look like tl. &mdash; SMcCandlish &#91;talk&#93; &#91;contrib&#93; ツ 02:04, 6 February 2007 (UTC)
 * Thanks, that got it. &mdash; SMcCandlish &#91;talk&#93; &#91;contrib&#93; ツ 15:35, 6 February 2007 (UTC)

Forcibly lower-casing initial letter looks very silly
Please fix this to stop enforcing lower-case initial letters. It looks silly and is confusing, e.g. . "What's a PBiography?" &mdash; SMcCandlish &#91;talk&#93; &#91;contrib&#93; ツ 15:04, 6 February 2007 (UTC)
 * Done. SgeoTC 02:40, 11 February 2007 (UTC)

editprotected Automatic lower-casing of the first letter of the template name seems to be happening again. I typed in

but get the display:

Can that be fixed? Thanks! Libcub (talk) 05:37, 3 March 2008 (UTC)
 * The original change fixed the template to enforce lower-case initial letters if and only if all the other letters of the template name were lowercase; this seems to have been deliberate. Do you think that the template should be changed to preserve the case of all letters in all circumstances instead? --ais523 19:26, 10 March 2008 (UTC)
 * I think so. I would like to be able to control how the text displays. I don't see other templates doing this sort of thing. Is there some advantage I'm missing? Libcub (talk) 20:07, 10 March 2008 (UTC)
 * ✅. —Random832 20:28, 10 March 2008 (UTC)

Docs need updating, above
The "empty really doesn't work" and "empty really won't work" stuff is referring, from what I can tell, to tlx's own internal "2, 3" parameter logic, which I don't think is how most people use this template, so it's a bit confusing. As noted, "=" can be made to work with an escape, so empty does in fact work just fine, but only if you are using the target template's parms, not tlx's:

I would suggest splitting the doc table into two tables, one about passing other template's parms to tlx, and one about tlx's internal "2, 3" parm logic.

Also, as the =-escaping hint suggests, effectively empty would work just fine with tlx's own parms, with "&amp;nbsp;": yields the intended  instead of the mangled  in the documentation.

Hope that helps. &mdash; SMcCandlish &#91;talk&#93; &#91;contrib&#93; ツ 15:35, 6 February 2007 (UTC)

tlx looks different than tl when you see them together
When you use both tlx and tl in a list they now produce noticeably different output - this looks fairly strange in places like CorporisPublica:Image_copyright_tags/Free_licenses. —RP88 13:18, 27 February 2007 (UTC)
 * I agree with this, so I was bold and removed it. If anyone disagrees, feel free to revert and discuss (or even discuss first). <font color="#960">Grace <font color="#000">notes <font color="#960">T &#167; 05:02, 1 March 2007 (UTC)
 * They still seem to look different, which is bad. For example template:reqimage - Stevage 02:12, 27 March 2007 (UTC)


 * This still isn't resolved, after months and months. Please copy the formatting (CSS and such) from tl into tlx so that they have a mutually consistent appearance (or vice versa; an argument can certainly be made that the monospaced font helps distinguish between otherwise similar-looking characters (in some fonts), like 1, l and |, or 0 and O).  The only difference between these templates should be tlx's handling of additional parameters. Some samples to compare (bigger than those in the Reqimage sample template above: reqdiagram vs.


 * Also, while we're at it, this template should have a permprot template on it (don't care which one; the little top-right lock icon is fine). —  SMcCandlish  &#91;talk&#93; &#91;cont&#93; ‹(-¿-)› 16:19, 27 September 2007 (UTC)
 * I'm not there's consensus for this change. Template:Tlx has used a monospace font for the past seven months.... --MZMcBride 00:29, 28 September 2007 (UTC)
 * Not done This change requires more consensus before it's appropriate for an admin to do it immediately; maybe you could start a discussion about it somewhere like WP:VPR? --ais523 16:46, 28 September 2007 (UTC)


 * I'm skeptical there was ever consensus to change it in the first place; I remember a time when tl and tlx looked identical as to their output formatting. But rather than fight about this, I suggest a code fork, tlx and tlxcode, with the latter being monospaced, since the only reason to have it look that way is when giving code examples. It would probably be wise to do this in a metatemplated fashion so that all code other than this difference is transcluded, and that way the two versions stay 100% in synch at all times. —  SMcCandlish  &#91;talk&#93; &#91;cont&#93; ‹(-¿-)› 18:47, 27 November 2007 (UTC)
 * Rescinded. One can use tlx as if it were tl when ones wants to use both side by side and have them be consistent with each other; and there really isn't any reason to use tlx at all unless giving code examples, so my objection didn't make much sense. —  SMcCandlish  &#91;talk&#93; &#91;cont&#93; ‹(-¿-)› 09:49, 29 November 2007 (UTC)

Needs more parameters
Adding more parameters to this is pretty much just a copy-paste job. It needs to support at least 25, and there are probably instances needing more, though I'm not personally aware of any. A good example of where more parameters are needed: Template:CompactTOC8/doc. —  SMcCandlish  &#91;talk&#93; &#91;cont&#93; ‹(-¿-)› 18:42, 27 November 2007 (UTC)

There are size limits - for those rare cases why not just do the markup by hand? (leaving template in case someone more knowledgeable than me thinks this will work well).—Random832 01:47, 29 November 2007 (UTC)


 * Well, of course there are size limits. I didn't say it needs 100 parameters. :-) Why not do it by hand? It's a pain in the neck, esp. if you need to illustrate 10 different complicated uses of a multip-field template.  The entire point of tlx is that is it useful for very quickly illustrating the use of complex templates, so it is defeating itself by having so few fields.  The case mentioned is only one of many; this too-small limitation of tlx bites me in the soft bits about 3x a week. —  SMcCandlish  &#91;talk&#93; &#91;cont&#93;  ‹(-¿-)› 09:46, 29 November 2007 (UTC)


 * I'll increase the capability of this template to 10 parameters (that is, the template will have 11 parameters, since the first is devoted to the example template's name), but beyond that (as an arbitrary limit, rather than a reasoned one) it seems ridiculous, especially considering that templates with so many parameters are usually laid out vertically, and does not support vertical layout. If you want a template for displaying the syntax of templates with more than 10 parameters, they should probably should be laid out vertically for the sake of readability. After upgrading this template, I'll check if such a template exists - if not, I will create it. <font color="#275CA9">Nihiltres { <font color="#000">t .<font color="#000">l } 15:29, 29 November 2007 (UTC)
 * ✅ Done - As per my comment. <font color="#275CA9">Nihiltres { <font color="#000">t .<font color="#000">l } 15:41, 29 November 2007 (UTC)
 * If the need ever does arise, create a separate template like tlxtra to handle templates with more than 10 parameters, so this one doesn't have to do a bunch of unnecessary #if's. –Pomte 16:28, 20 January 2008 (UTC)

Help
I need help editing this template and a few others at --MahaPanta (talk) 02:30, 25 December 2007 (UTC)

Simple explanation needed
Could someone please explain in plain English at the top of the documentation what this template is for? The current explanation baffles me. Thanks. --Dweller (talk) 10:14, 22 February 2008 (UTC)
 * Hi there, I've just asked more or less the same question over at WP:VPT - you may want to watch that post for replies. It Is Me Here (talk) 16:44, 1 September 2008 (UTC)

Proposed format change
editprotected I think there is no need for the parameters to be uppercase, and an if parser can be used to add a colon as well.--Ipatrol (talk) 20:17, 17 December 2008 (UTC)
 * I'm not sure what change is being requested here.--Aervanath lives in  the Orphanage  21:58, 24 December 2008 (UTC)

Documentation transcluded incorrectly
editprotected I suggest altering the transclusion  in Template:Tlx to. --Rogerb67 (talk) 16:10, 23 January 2009 (UTC)
 * --Aervanath (talk) 18:14, 23 January 2009 (UTC)
 * Fab. Thanks. --Rogerb67 (talk) 21:25, 23 January 2009 (UTC)

Change format to easily stylable and more semantic
I suggest that this template would be changed from  to , because this way, it could be changed by user styles and is also more semantic. uses this way. I personally would like to see this change, because in Vector, all monospaced texts are too small, so I created user styles for myself, but they don't work for this template. Svick (talk) 23:05, 25 October 2009 (UTC)
 * ✅ Plastikspork <sub style="font-size: 60%">―Œ <sup style="margin-left:-3ex">(talk) 01:16, 26 October 2009 (UTC)
 * Thanks. Svick (talk) 02:17, 26 October 2009 (UTC)


 * I reverted the edit. This template has been used for years, is transcluded onto 100,881 pages, and is used in many different Wikimedia projects. Its style should not be changed, it should stay compatible with the other tl templates both here and at the other Wikimedia projects.
 * But when I reverted I didn't use the old, since that breaks in some browsers (see discussion at MediaWiki talk:Common.css) and as Svick pointed out, can not be styled. I instead used </tt>, which causes the same look as the span tag on all non-broken browsers, and causes better output than before on the broken browsers.
 * --David Göthberg (talk) 20:16, 27 October 2009 (UTC)


 * If by compatibile, you mean consistent, then should probably be changed to   too, as it currently uses  . I thought that   would be better, because it is more semantic, but   works for me too. Svick (talk) 20:28, 27 October 2009 (UTC)


 * Haha, it was I who made the template, and yes it uses &lt;code>. But it also has two sister templates:  that uses &lt;tt>, and  that uses normal text. So there is one for every taste in that group. Here are links to them if you want to take a closer look: tld and tlf.
 * If you want code colour for most of the other tl related templates then you have to manually surround them with <code ></code>, sorry. Unfortunately we can not do the other way around, that is, we have no tag to put around something that has  to reverse it to normal text.
 * Of course, if you just want to personally style them, then tell us what templates you want to style and we can add some class names to them so you can style them as much as you want. Here at the English we have the unofficial policy that if any one asks for a class name so they can style something, then we always add it. It's so simple to add and it keeps everybody happy. :)
 * --David Göthberg (talk) 22:55, 27 October 2009 (UTC)

Nesting tlx results in inconsistent formatting
See the first line of User:Mendaliv/templates. Specifically:

produces:

Notice the difference in the nested ? The final pair of curly braces (not part of the nested ) also lacks the formatting. Just thought I'd mention this. No idea what a fix would entail, if one is even necessary or desirable. &mdash;/M endaliv /2¢/Δ's/ 19:40, 1 December 2010 (UTC)
 * That's an interesting bug. After some investigation, I think it's a bug in MediaWiki, so I filed it. Svick (talk) 22:52, 2 December 2010 (UTC)
 * Agreed: it's not a problem with per se, but a consequence of nesting one   tag inside another. The problem is replicable using raw HTML. -- Red rose64 (talk) 14:53, 3 December 2010 (UTC)

Weak font?
Why does look so thin and unreadable now? tl still looks ok. What happened? Can we make it look like tl again? Gigs (talk) 22:51, 16 December 2010 (UTC)
 * was never intended to look like tl - tlx deliberately uses a monospace font, so that it looks like the code in an edit window; tl uses the normal proportional font, to look like normal page text. -- Red rose64 (talk) 23:27, 16 December 2010 (UTC)
 * It didn't used to look this bad. Gigs (talk) 00:16, 17 December 2010 (UTC)
 * For me, it's same as it ever was. Have you changed browser or skin recently? -- Red rose64 (talk) 00:57, 17 December 2010 (UTC)


 * No. Check it out in the image  Gigs (talk) 01:54, 17 December 2010 (UTC)

The normal text in this section appears to be weaker than the normal text in your screenshot; but the monospace text</tt> looks stronger in this section that in your screenshot. We clearly have different setups. For comparison, I have generated my own screenshot - I am using Windows XP, Firefox 3.6.13, Monobook skin. If I switch to Vector skin (which is now the default for most users), I see no significant change to the text in either font. Let's try an experiment: These look the same for me as regards font; but gives a grey background. However, whilst they're the same size as each other in Monobook skin, the third (span) one is absolutely tiny compared to the others in Vector; in fact, it looks the same as used in conjunction with  : but your problem is definitely not to do with small text. In case you hadn't already checked, uses the   method, and has done since 27 October 2009. It was written this way, but periodically somebody changed the method: the longest time when another method was used was 23 March 2007 to 26 October 2009, when the span method was used. -- Red rose64 (talk) 12:33, 17 December 2010 (UTC)
 * Here's my rendering, Linux, Firefox 3.6.13: font-test.png Gigs (talk) 19:54, 18 December 2010 (UTC)
 * It was the change from span to tt that made it look really bad. spanvstt.png Gigs (talk) 20:03, 18 December 2010 (UTC)

HTML5 and
HTML5 does not support the tag. Browsers will probably support the tag forever, but as we move towards HTML5, the use of  will result in validation errors. We should consider whether to migrate to or CSS styling. ---— Gadget850 (Ed)   talk 12:05, 6 October 2011 (UTC)


 * Now that HTML5 is enabled, this series of templates causes validation errors. Any objection to updating to use ? ---— Gadget850 (Ed)   talk 13:39, 23 September 2012 (UTC)

✅ ---— Gadget850 (Ed)   talk 18:22, 23 September 2012 (UTC)

Template talk:Tlu
FYI, someone unredirected Template talk:Tlu, so that no longer redirects here. 76.65.128.198 (talk) 13:58, 11 December 2011 (UTC)

Doesn't work with more than 3 arguments?
For example from the guide for IPsock it has username But if you try to do username it comes out like this:

username

Which means it can't be properly listed on CorporisPublica:Template messages/User namespace/CorporisPublica:Template messages/User namespace/Sockpuppets

? -- Mistress Selina Kyle   ( Α⇔Ω ¦ ⇒✉ )  09:30, 15 February 2012 (UTC)


 * Not a problem specific to this template. When the value includes an equals sign, you have to do some tricks: see the examples section for three different ways to fix this. ---— Gadget850 (Ed)   talk 10:29, 15 February 2012 (UTC)