Template talk:Indent

Source 'test lines'

 * 1) I think that the end is near      but not yet...   but coming soon!
 * 2) Second test line merely reverses the words {indent} with {space}.
 * 3) Line 3: I think that the end is near&lt;br>but not yet.
 * 4) Line 4: Without a #-number or asterisk bullet, the end is near      but not yet..(etc.).

Results for the End is near
Line 4: Without a #-number or asterisk bullet, the end is near    but not yet...but coming soon!
 * 1) I think that the end is near    but not yet... but coming soon!
 * 2) I think that the end is near but not yet...    but coming soon!
 * 3) Line 3: I think that the end is near but not yet.

Demonstration: Table in a bullet
The templates indent & space were created to align text in places where wikitables seemed excessive, such as within a bullet-entry: Coding:
 * * America has several car manufacturers, making cars:   GM, Ford & Chrysler-Dodge- The "Big 3"    Toyota (world's biggest)- In Tennessee    Mercedes (German)- Also in Alabama & other states. There are many other auto makers in America.

Result:
 * America has several car manufacturers, making cars:   GM, Ford & Chrysler-Dodge- The "Big 3"    Toyota (world's biggest)- In Tennessee    Mercedes (German)- Also in Alabama & other states. There are many other auto makers in America.

Note that the spacing doesn't always align evenly, due to template space generating a mixture of en-size & em-size spaces, so instead use template in to generate equal-size spaces:

Coding: * America has manufacturers:   GM, Ford & Chrysler-Dodge$$- "Big 3"    Toyota (world's biggest)$$- Tennessee    Mercedes (German)$$- Also.

Result: Using $$ allowed the Mercedes-text to better align with the others. In general, usage of requires more effort than in to align the spacing. -Wikid77 (talk) 10:46, 3 May 2009 (UTC)
 * America has manufacturers:   GM, Ford & Chrysler-Dodge$$- "Big 3"    Toyota (world's biggest)$$- Tennessee    Mercedes (German)$$- Also.

Genesis History
I ported this over from wikisource. Seems useful for when a wikitable is contraindicated, yet one wants to line up several short columns of material. That makes the assumption that it can be used in-line, and does not generate a linefeed. (I'm acting boldly, as it displays poorly as you can see below! Fra nkB (User:Fabartus at 21:33, 26 May 2006)
 * 03-May-2009: After dealing with the newline issue, User:Fabartus created space in June 2006, to allow the in-line spacing needed to align text outside a wikitable. After that, quick templates were added for: sp2, sp3, sp4, sp5 plus i2 & i5. -Wikid77 (talk) 09:46, 3 May 2009 (UTC)

If it's just space
If the only difference between this and the template space is the line break, then replace the current code with. Jɪmp 07:15, 21 June 2007 (UTC)
 * 03-May-09: (2 years later) The coding has remained separate, and for 3 important reasons: redundancy, variation, and tracking. Many people often think that reducing any duplication to just one copy is undeniably better; however, here in the real world, "redundancy is good redundancy" because having only a single, central copy would mean that any coding error (or vandalism) could disable all functionality, everywhere. Instead of using Template:space as the basis of all these templates, the duplication of coding has extended beyond mere redundancy to even allow variation, so that each template is independent of hacking to others, and each can offer separate options, such as different default values within the similar coding sections. Also, usage problems could be better tracked to the specific template, rather than use indent and have error messages reporting the problem from "space" which the user did not use, or used elsewhere, leading to possible confusion as to where the coding problem actually started. Plus, tracking could count the use of indent without implicitly using space. Those 3 reasons (redundancy, variation, and tracking) are why the coding should remain separate. -Wikid77 (talk) 08:50, 3 May 2009 (UTC)

Fixed double-space bug from August 2006
03-May-09: I have fixed the 3-year coding bug in Template:Indent that caused numbered or asterisk-bullet lines to double-space, and caused auto-numbering to reset to 1. The bug was introduced in the revision of 16:09 on August 22, 2006. The problem was fixed by adding an HTML comment to prevent the implicit newline after the ending tag "&lt;/includeonly>" as follows: {{#switch: {{{1}}} The problem was fixed (after nearly 3 years) as version Ver F.1 of the {{tl|indent}} template on English Wikipedia. -Wikid77 (talk) 08:50, 3 May 2009 (UTC)

Retrofit talk-page year headers/subpages
03-May-2009: I have added subheaders above as "Topics from 2006" (etc.) to emphasize the dates of topics in the talk-page. Older topics might still apply, but using the year headers helps to focus on more current issues as well. Afterward, I dated/named unsigned comments. Then I added "Talk-page subpages" beside the TOC. -Wikid77 (talk) 09:46, 3 May 2009 (UTC)

Archived old topics to Archive_1
I have created the talk-page archive subpage: Template_talk:Indent/Archive_1 for topics from 2006 to May 2007. -Wikid77 (talk) 09:46, 3 May 2009 (UTC)

Attempting to clarify the confusing part
Hey, nerd passing by and saw [//en.wikipedia.org/w/index.php?title=Template:Indent/doc&oldid=593451753#Analysis_of_uneven_spacing this] (same as below):

. Notice that neither indent nor space use true space-size, but rather mix en+em spaces, whereas "n" will actually skip n count of spaces, as if inserting n repetitions of an "&amp;nbsp;" space.

I did my best to clarify it [//en.wikipedia.org/w/index.php?title=Template:Indent/doc&oldid=599242464#Analysis_of_uneven_spacing here], but may have introduced more confusion:

This was formerly marked as unclear. If it remains unclear, tag it and/or discuss on talk

As computers optimize code, they occasionally risk displaying unsavory results after condensing monotonous strings of characters (such as spaces). Thus, many templates around Wiki choose to avoid this hurdle by alternating different types of spaces (with the intention of displaying no differently than regular spaces).

Spaces come in two main size varieties: em spaces and en spaces. Em spaces are generally defined as the width of one character, and en spaces exactly half that size. However, there is no requirement that browsers must conform to this standard, and so templates that code in en spaces may not display uniformly across all browsers. Neither indent nor space use true space-size (that is, em-size spaces), but rather mix en and em spaces, whereas n avoids en spaces altogether and will actually skip n count of spaces, as if inserting n repetitions of an em space. This is done by alternating em spaces with an em-size non-breaking —by definition, it must be the same—in order to skip a wide area.

I took a peek at the module, looked up en and em spaces, looked at the talk pages of all the different modules, and began working on this.

Honestly, I question whether people who use this template need to know this stuff. Should I just take this out, or archive this, or something? meteor_sandwich_yum (talk) 05:32, 12 March 2014 (UTC)

Equivalence to ":"
The template's documentation states that 5 matches indentation of a colon-shift (":"), but on my browser (firefox 57.0), this results in a bigger indentation. The value that seems to match the colon-shift is not 5, but 3. Any thoughts as to why this might be happening? – Uanfala (talk) 20:04, 7 December 2017 (UTC)
 * I believe this has to do with the way Module:Indent is implemented in code vs how ":" is implemented in code and how your browser treats those underlying implementations compared to how other browsers do. I believe the module indentations are implemented in terms of &nbsp and &emsp but regarding ":", I have no clue. Maybe try asking at WT:LUA? Someone there should know more. - Vanstrat ((🗼)) 07:36, 10 December 2017 (UTC)