Jump to content

Template talk:Plainlist

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Endplainlist)

End template

[edit]

Nice work. Do we need {{Endplainlist}}? Under what circumstances would the alternative method not work? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:09, 22 November 2011 (UTC)[reply]

plain/flat
  • foo bar
  • foo
  • bar
ubl/flat
  • foo bar
    • foo
    • bar
We should probably have it, so this can match {{flatlist}}. I don't like using the end-forms, but they are a bit less of a server burden as thay don't have the parsing code involved. Mostly we should use the class. There will be circumstances where the templates are most appropriate (like nesting them;). Alarbus (talk) 11:30, 22 November 2011 (UTC)[reply]
Hmm... "plain/flat" gets the flat wrong; "ubl/flat" is working. Shouldn't they be the same? The plain rules are reaching down into the flatlist. Alarbus (talk) 11:39, 22 November 2011 (UTC)[reply]

Standalone class

[edit]

Presumably, the class plainlist will be available for use in infoboxes, or other containers, without the need for this template, in the manner of hlist? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:17, 22 November 2011 (UTC)[reply]

The class is there; more templates will need updating to allow classes to be passed in. We should be moving everything towards only accepting classes (or having them built in) and not accepting styles. This will rein-in some of the weird shit people get up to. Alarbus (talk) 11:30, 22 November 2011 (UTC)[reply]
Correct. plainlist works exactly the same as flatlist/hlist. Edokter (talk) — 11:59, 22 November 2011 (UTC)[reply]

Syntax

[edit]

Hello. Is there a way to use this template in a more compact fashion, e.g.

{{plainlist |{{flagcountry|Russia}} |{{flagcountry|Finland}} |{{flagcountry|Poland}} |{{flagcountry|Estonia}} |{{flagcountry|Latvia}} |{{flagcountry|Lithuania}} |{{flagcountry|Belarus}} |{{flagcountry|Moldova}} |{{flagcountry|Ukraine}} |{{flagcountry|Georgia}} |{{flagcountry|Armenia}} |{{flagcountry|Azerbaijan}} |{{flagcountry|Kazakhstan}} |{{flagcountry|Uzbekistan}} |{{flagcountry|Turkmenistan}} |{{flagcountry|Kyrgyzstan}} |{{flagcountry|Tajikistan}} }}


rather than the space-consuming

{{plainlist |
* {{flagcountry|Russia}}
* {{flagcountry|Finland}}
* {{flagcountry|Poland}}
* {{flagcountry|Estonia}}
* {{flagcountry|Latvia}}
* {{flagcountry|Lithuania}}
* {{flagcountry|Belarus}}
* {{flagcountry|Moldova}}
* {{flagcountry|Ukraine}}
* {{flagcountry|Georgia}}
* {{flagcountry|Armenia}}
* {{flagcountry|Azerbaijan}}
* {{flagcountry|Kazakhstan}}
* {{flagcountry|Uzbekistan}}
* {{flagcountry|Turkmenistan}}
* {{flagcountry|Kyrgyzstan}}
* {{flagcountry|Tajikistan}}
}}

...?
213.246.91.158 (talk) 11:53, 24 November 2012 (UTC)[reply]

The whole point of this template is to be able to accept wikilists (which are easier to edit). However, {{Unbulleted list}} does what you want. Edokter (talk) — 11:57, 24 November 2012 (UTC)[reply]
Aha, thanks (and for the speediness!). I believe plainlist (and flatlist) are also used to ensure accessibility, so I was thinking of occasions where a "wikilist" nature isn't necessary. 213.246.91.158 (talk) 12:03, 24 November 2012 (UTC)[reply]
There is no shortage of space in Wikipedia (it is all compressed anyhow). You should avoid using Unbulleted lists without any spacing. Clarity is more important than leaving out a few spaces or line breaks, editors are supposed to try and read and improve the Wiki sources. Notincludingspacesmakesthingshardertoread, editors should include at least as much a spacing in Wikisource as they would in punctuation of normal prose, you'd normally put a space after a comma you should be putting at least one after every | and most = signs, unless you are trying to be mean to editors who read the wikisource and make corrections (so many authors in citations automatically filled with the wrong information). -- 109.78.203.40 (talk) 23:54, 26 January 2014 (UTC)[reply]

Plain list

[edit]

Please move this Template from Plainlist to "Plain list". At the time of writing both versions work. Some web browsers include spell checking and the first instance "Plainlist" is marked as an error by the spell checker. This is distracting and unhelpful. It is a bad API that includes deliberate spelling errors. Unfortunately many works in Wikipedia are marked by the spell checker. So many words are marked that it makes it more difficult to see and correct the true spelling mistakes (and there are also many horrid neologisms, jargon words and various other junk many editors are so very fond of using). So please change the default to be "Plain list" the version that does not add yet another spelling error that editors have to pretend not to see. I've been doing this already, I've only had one person actually complain about my wanting less to see spelling mistakes, but one was too many so I'm now making a formal request to make the default be the version that does not annoy the spell checker. -- 109.77.17.179 (talk) 01:39, 22 April 2014 (UTC)[reply]

Ordered lists

[edit]

The markup:

{{Plainlist|
# foo
# bar
# bas
}}

renders as:

  1. foo
  2. bar
  3. bas

The numbers should not show. Can somone fix this, please? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:55, 2 June 2014 (UTC)[reply]

Plainlist only accepts unordered lists. What is the use case for this? Edokter (talk) — 20:40, 2 June 2014 (UTC)[reply]
Yes, and it should accept ordered lists. The use case is the same as for unordered lists; so that they may be styled like <BR> separated items. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 21:14, 2 June 2014 (UTC)[reply]
I get that. What I mean is, what would be the use case to display an ordered list as a plainlist? They would look exactly the same, so why use <ol>? Edokter (talk) — 21:22, 2 June 2014 (UTC)[reply]
Because semantically they are different. The list of ingredients of a pie ("apple, blackberries, redcurrants") can be reordered without changing the meaning ("apple, redcurrants, blackberries"); an ordered, chronological, list of Pink Floyd albums ("Dark Side..., "Wish You Were Here, Animals") cannot. I note that the sister template {{Flatlist}} can accept ordered lists. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 21:55, 2 June 2014 (UTC)[reply]
Flatlist (hlist) can accept any list; it also shows the difference between list types. I'll add it, but I have reservations about hiding different semantics from view. Edokter (talk) — 23:30, 2 June 2014 (UTC)[reply]

Consistency

[edit]

Why is it "plainlist" and not "plain list"? Why is it "unbulleted list" and not "unbulletedlist"?

My preference is for spaces but these should be all be named consistently. -- 109.76.86.206 (talk) 02:56, 22 November 2014 (UTC)[reply]

{{plain list}} works; it is set up as a redirect to {{plainlist}}. --Redrose64 (talk) 10:52, 22 November 2014 (UTC)[reply]
It works but that isn't enough, as editors keep asserting that the version without spaces "plainlist" is somehow more correct. There are a lot of Wikipedia editors who think removing spaces and avoiding indentation are somehow a good idea. The very idea of wiki markup is that it should be simpler and more human readable than alternatives such as HTML. -- 109.76.150.178 (talk) 17:35, 2 April 2018 (UTC)[reply]
There is nothing wrong with using "plainlist" as a template name and when it is used in an article it should not be changed arbitrarily just because you don't like it. It's been a while, but I'm going t ping @Redrose64: as the only other registered user to edit here. --AussieLegend () 18:31, 2 April 2018 (UTC)[reply]
I didn't say there was anything objectively wrong with using "plainlist" but you asserted it was "correct" and that it was somehow wrong to use "Plain list" rather than a simple difference in formatting choices.
My personal preference is to write "Plain list" as it doesn't get flagged yet another as a spelling mistake. The option is there so I want to use it.
If the the templates were named consistently and there were no options and I'd use what was available. Make the rules clearer and consistent, that's what we all want right? -- 109.76.150.178 (talk) 21:55, 2 April 2018 (UTC)[reply]
I didn't say there was anything objectively wrong with using "plainlist" but you asserted it was "correct" and that it was somehow wrong to use "Plain list" - You arbitrarily changed the spelling in an article to suit your personal preference, which was not the correct spelling for the template name. We don't do that. If everybody edited according to their personal preferences there would be chaos.
as it doesn't get flagged yet another as a spelling mistake - Personally, I've never had that problem in the 12 years that I've been editing so I don't understand why you are. --AussieLegend () 22:01, 2 April 2018 (UTC)[reply]
Neither form is more "correct" than the other. Both work equally well. Changing one to the other without making some other significant change can be seen as disruptive; people have been blocked in the past for doing that. --Redrose64 🌹 (talk) 00:08, 3 April 2018 (UTC)[reply]

Indented lists

[edit]

@Edokter: I added the bit about starting this template on a new line because it doesn't work when indented. Clearly the correct solution is to use the indent= parameter, but I thought it was worth explaining why this doesn't work:

:{{plainlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}

See:

Mark Hurd (talk) 11:51, 24 December 2014 (UTC)[reply]

There are sooo many things that can go wrong, and the above example is just one of them (and one which rarely happens anyway). We cannot list every possible mistake and pitfall; documentation should be concise. -- [[User:Edokter]] {{talk}} 12:42, 24 December 2014 (UTC)[reply]

White space?

[edit]

Hi. Is it possible to leave an empty line or additional white space between items in a list using this template? I want to use the plainlist template in the infobox of an organization to display their motto in 2 different languages, but when I do, the words in the 2 mottos look like they're running together making them difficult to read. If I use <br /> then they are spaced in a way that makes them much easier to read but I'm trying to avoid using line breaks in infoboxes. Any suggestions? Thank you in advance. Rystheguy (talk) 16:43, 25 March 2015 (UTC)[reply]

@Rystheguy: Blank lines would fall foul of WP:LISTGAP. --Redrose64 (talk) 17:22, 25 March 2015 (UTC)[reply]
@Redrose64: Thank you for your quick response, that's what I had assumed. Do you happen to know what should be done in this particular situation? The article I'm working on is User:Rystheguy/Amal Women's Training Center and Moroccan Restaurant and the issue is with the "Motto" field within the infobox. Is my only option to leave the two items as they are and sacrifice readability? Rystheguy (talk) 17:40, 25 March 2015 (UTC)[reply]
You could put the French one in italics, which would be entirely consistent with MOS:ITALICS#Foreign terms. --Redrose64 (talk) 17:50, 25 March 2015 (UTC)[reply]
Good idea. Thanks again for the help! Rystheguy (talk) 18:36, 25 March 2015 (UTC)[reply]

One </div> too many?

[edit]

Hello, I notice there is only one oprning <div>, but two closing </div>s... is that intended? 37.152.251.226 (talk) 21:24, 25 June 2016 (UTC)[reply]

It is. The first one is only emitted when {{{1}}} is present so it closes itself. -- [[User:Edokter]] {{talk}} 21:38, 25 June 2016 (UTC)[reply]
Oh I see thanks, so the second one is only because the template page does not have a param1, so it needs to close the div so the documentation can show... right? Might be worth putting a comment to explain this. 37.152.251.226 (talk) 00:27, 26 June 2016 (UTC)[reply]
Correct. A comment is not needed; most template editors are aware of this practice, which is quite common. -- [[User:Edokter]] {{talk}} 07:07, 26 June 2016 (UTC)[reply]

Printable version problem

[edit]

Hello. I would like to know why this template and {{Unbulleted list}} formats incorrectly with printable versions. For example, the printable version of Barack Obama shows his parents and alma maters indented, whereas with the non-printable version there isn't any indentation. Is there any way to fix this? Thanks.--Nevéselbert 22:15, 21 October 2016 (UTC)[reply]

@Redrose64 and EEng: Sorry to bother (again), but do you know anything about this?--Nevéselbert 08:43, 22 October 2016 (UTC)[reply]

My experience with both "Print page" and "Download as PDF" is that they're completely incabale of dealing with anything but the most vanilla formatting features. It's my further experience that no one's ever going to fix any of that, at least not in this century. EEng 08:54, 22 October 2016 (UTC)[reply]
(edit conflict) I would guess at one of two things: either the CSS files don't have code for printed media, or that the software that produces the printed output ignores the CSS files. --Redrose64 (talk) 08:55, 22 October 2016 (UTC)[reply]

Indent size

[edit]

I recently tried to use plainlist to match a set of group references at Jacques Cousteau #Legend. There is a mismatch between the indent used for the footnotes and the indent produced by plainlist. So I experimented in the sandbox and found that a better match occurred when 1.8em was used as the unit for indents, rather than the 1.6em supplied by plainlist. That set me wondering just where the 1.6em comes from, and where it is actually used? Was this just a guess at the size of a "standard" indent, or is it actually accurate for some indents?


Plainlist behaviour
No [A] Year (Fr/En) [B] French English [C] Cousteau Film
  1. ^ actual order, it is incorrect on the official filmography
  2. ^ actual years, they are incorrect on the official filmography
  3. ^ actual names, they are incorrect on the official filmography
  • S – short film
  • F – full-length film
  • <only number> – length of the film is about 45 minutes
Plainlist sandbox behaviour
No [A] Year (Fr/En) [B] French English [C] Cousteau Film
  1. ^ actual order, it is incorrect on the official filmography
  2. ^ actual years, they are incorrect on the official filmography
  3. ^ actual names, they are incorrect on the official filmography
  • S – short film
  • F – full-length film
  • <only number> – length of the film is about 45 minutes

I can work around the misalignment in Jacques Cousteau #Legend by using |indent=1.2 so it's not a big deal (although the documentation could mention that non-integer indent sizes are usable), but I wondered whether we might be better off just increasing the "standard indent" used here, if it doesn't actually match any real indents. Thoughts? --RexxS (talk) 23:38, 23 December 2017 (UTC)[reply]

I use Opera 36, and they're not aligned - the A/B/C are slightly further to the right than the S/F. A/B/C are in an ordered list, which has no margin-left; any apparent "indent" of this list will be browser-specific. --Redrose64 🌹 (talk) 07:32, 24 December 2017 (UTC)[reply]
@Redrose64: I checked in Chrome and Firefox, which give the same result as Opera, so I don't think it's browser-specific. I only had a rough alignment using 1.8em to demonstrate the effect, but have a look at Jacques Cousteau #Legend where I used 1.2 * 1.6em = 1.92em and I think that aligns exactly in all the browsers I have.
If we have a style (ordered list), that has no margin-left set, we do leave ourselves at the mercy of browser implementations, though. Maybe that style needs to be globally set to avoid those sort of dependencies? — Preceding unsigned comment added by RexxS (talkcontribs) 12:31, 24 December 2017 (UTC)[reply]
The alignment in Firefox 57.0.2 isn't perfect, but is much better than in Opera 36. --Redrose64 🌹 (talk) 23:51, 24 December 2017 (UTC)[reply]

Template-protected edit request on 1 January 2018

[edit]

Looks to me like there is a stray </div> following the <noinclude> ... Anomalocaris (talk) 22:40, 1 January 2018 (UTC)[reply]

The </div> is for when |1= is empty, which means it should be followed by {{endplainlist}} (</div>). — JJMC89(T·C) 22:58, 1 January 2018 (UTC)[reply]
Indeed, see One </div> too many? above. --Redrose64 🌹 (talk) 00:03, 2 January 2018 (UTC)[reply]
@JJMC89 and Redrose64: Thank you for your explanations. Sorry for the wild goose chase. —Anomalocaris (talk) 02:52, 2 January 2018 (UTC)[reply]

terminating double-brackets

[edit]

I mostly use this template inside infoboxes. When I do so, I typically put the terminating brackets on the same line as the last entrant. I've seen many edits where the inexperienced (and possibly vandalistic) editor will see the double-brackets on its own line and carelessly treat it as the end of an infobox, and I've not seen that happen when the }} accompany the last list item. I've recenly encountered several IP editors who insist on putting the brackets on their own line because the examples here show that. Are there any reasons we can't include an explanatory line at template:plainlist/doc to explain the harmlessness and potential helpfulness of my habit? Thanks, all. — Fourthords | =Λ= | 17:23, 22 July 2021 (UTC)[reply]

Technically speaking, it doesn't make a scrap of difference whether there is a newline before the closing double brace (n.b. not bracket) or not. Anybody whose only edit to the page is to add or remove such a newline (whilst making no other change), and is not making identical changes on hundreds of other pages, is a straight-up good-faith editor, and must not be treated as a vandal. Nor should you edit-war with them. --Redrose64 🌹 (talk) 10:15, 23 July 2021 (UTC)[reply]
While there's no technical difference, I've seen the extra carriage return be the cause of editors' errors with infoboxes. Basically I'm just asking whether we can add to the /doc, it doesn't make a scrap of difference whether there is a newline before the closing double brace […] or not.Fourthords | =Λ= | 19:11, 23 July 2021 (UTC)[reply]

could someone add parity with {{ubl}}? specifically around centering in tables?

[edit]

So just discovered centered lists can't be done with {{plainlist}} in tables because there's no way to set the CSS for the <ul> element generated by {{plainlist}} and the CSS for <ul> and <ol> elements is explicitly set in the "wikitable" class to be left aligned (why, I do not know):

.wikitable td ul,.wikitable td ol,.wikitable td dl {
    text-align: left

As a result, setting style="text-align:center;" for the <ul> or <ol> elements is necessary to have a list render its <li> elements centered in a cell in a table of class "wikitable" (which is most tables in Wikipedia). You can do this with {{ubl}} already:

{{ubl|list_style=text-align:center;|item 1|item 2|item 3}}

in a table cell renders as:

Header 1 Header 2 wide Header 3
cell 1
  • first item
  • second item
  • third item
cell 3

but there's no equivalent way to set the style of the <ul> element using the {{plainlist}} template:

{{plainlist|list_style=text-align:center;|
* item 1
* item 2
* item 3
}}

in a table cell renders as:

Header 1 Header 2 wide Header 3
cell 1
  • item 1
  • item 2
  • item 3
cell 3

and setting the |style= parameter in {{plainlist}} does nothing (since it is passed to the containing <div> and not the <ul> element:

{{plainlist|style=text-align:center;|
* item 1
* item 2
* item 3
}}

renders as:

Header 1 Header 2 wide Header 3
cell 1
  • item 1
  • item 2
  • item 3
cell 3

So since in the documentation we describe {{plainlist}} and {{ubl}} as pretty much equivalent other than how you format the list elements (separating elements using * and newlines vs. |), I was hoping someone could add support in {{plainlist}} for all of {{ubl}} parameters, namely:

|class     = class
|style     = style
|list_style  = style for ul tag
|item_style  = style for all li tags
|item1_style = style for first li tag |item2_style = style for second li tag |...

I would attempt to do so myself but a) I don't have template editor privileges, b) I'm not familiar with Lua, and c) I am definitely not experienced enough to be comfortable editing a template that's used on ~1% of all pages. 😅 —Joeyconnick (talk) 19:58, 25 June 2023 (UTC)[reply]