Tree of Life Template‑class | |||||||
|
Lists Template‑class | |||||||
|
The function uses gsub() to deitalicize connecting forms such as 'subsp.' or 'f.' in taxon names. A downside of this general function is that listing subspecies in abbreviated form (e.g. F. l. cafra for Felis libyca cafra) produces a surprising result with the species initial deitalicised. Would it be better to explicitly deitalicise the connecting forms? Or are there a lot of different connecting forms and variants in use? Jts1882 | talk 14:54, 20 December 2017 (UTC)
@ Plantdrew: Jts1882 has pointed above that if {{ Species list}} is used with an abbreviated species name/epithet, it de-italicizes incorrectly. Thus {{Species list|A. beta subsp. gamma||A. b. subsp. gamma||A. b. gamma|}} gives
The last two are wrong because of the way I've coded the Lua module – starting from the second 'word', it de-italicizes the first 'word' it finds that ends with a period/stop. At first I thought the answer was to de-italicize the third 'word' of a four 'word' taxon name, but then I realized that if {{ Genus list}} was used to list the sections of a genus, the connecting term is the second word. At present {{Genus list|A. sect. beta|}} correctly gives
You almost certainly look at more taxoboxes than anyone else; have you ever seen botanical subgenera or sections listed using the "taxon list" templates? Do we need to worry about such cases? Peter coxhead ( talk) 17:35, 20 December 2017 (UTC)
@ Peter coxhead: On further investigation, I'm not sure whether it's worth making the templates sense and automatically deitalicize connectors. Many connectors were manually deitalicized already, and depending on the precise spacing format, the automatic sensing may override the deitalicization, leaving them in italics. Compare red-eared slider, where '' var. '' is unitalicized to Alnus glutinosa where ''var.'' results in italics. It appears that the majority of (attempted) manually deitalicized connectors are the product of your edits; see e.g. this search. Plantdrew ( talk) 20:13, 20 December 2017 (UTC)
Another weird case of manual/automatic deitalic methods conflicting: Fraxinus texensis. Plantdrew ( talk) 20:17, 20 December 2017 (UTC)
@ Peter coxhead: I fixed a {{ Linked species list}} error with this . I assume the issue must be with the italicizeTaxonName() function and the handling of parenthetic term in the redirect. The link is correct, but the displayed text is the page title surrounded by pumas. If Puma (genus) is used directly (not as redirect), Puma and genus are in italics and the parenthesis are normal text, i.e. Puma (genus). Jts1882 | talk 08:23, 4 September 2018 (UTC)
{{Linked genus list|''[[Puma (genus){{!}}Puma]]'' | Jardine, 1834}}
→Puma_(genus){{!}}Puma
only "Puma" is passed to the italics function? The italics function seems to be behaving correctly, but wasn't expecting input with a pipe.
Jts1882 |
talk
09:38, 4 September 2018 (UTC)
italicizeTaxonName
were, say, (link, name, linked, abbreviated)
, with link
defaulting to name
if not supplied. But this wouldn't help in the TaxonList module, since it uses purely positional parameters, so there's no way of specifying an additional 'link' parameter to match a name | authority
pair, and if you have to supply a pipe, you might as well supply the rest of the expected output.italicizeTaxonName
not to specify |linked=yes
, and then make up the wikilink via [[ link | italicizeTaxonName_result ]]
.italicizeTaxonName
, can successfully handle italicization in so many contexts: taxonomy templates, taxoboxes, taxonbars, taxon lists, ... I think there will always be special cases, which is why the function completely skips input with outer manual italics.
Peter coxhead (
talk)
09:54, 4 September 2018 (UTC)
{{#invoke:TaxonItalics|main|Puma (genus)|linked=yes}}
should output ''[[Puma (genus)|Puma]]''
, i.e. contrary to what I wrote above, a lower-case parenthesized word should be stripped off completely in the link text, not left de-italicized. However, this implies that {{#invoke:TaxonItalics|main|Puma (genus)}}
would output ''Puma''
, not ''Puma'' (genus)
. I'm not sure that this is what is always wanted. Automating all the possible cases is even more tricky than I thought!
Peter coxhead (
talk)
10:24, 4 September 2018 (UTC)italicizeTaxonName
. It expects a Taxonname, not a link-pipe-taxonname combination. The {{
Linked genus list}} template shouldn't pass the combination. The problem arose from the change in the template to handle more complex forms using the new function. The old p.italicize() function handled it simply by putting italics around the whole parameter entry. There are plenty of choices and workarounds when setting up such lists, its only legacy pages where it is an issue. It turns out that it was my edit that changed the list to use the list template, when it only worked using the pipe trick, so you can blame me.
Jts1882 |
talk
10:56, 4 September 2018 (UTC)This
edit request to
Module:TaxonList/testcases has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change content model to Wikitext and redirect to Template:Taxon list/testcases; the current page is a soft redirect serving a purpose that could be better served by a hard redirect. * Pppery * it has begun... 20:52, 10 February 2020 (UTC)
Given that (apparently) there is opposition to cross-namespace redirects, Module:TaxonList/testcases is useful because it helps anyone editing the module to find its test cases. Peter coxhead ( talk) 22:14, 11 February 2020 (UTC)
Would it be possible to include an option that makes a list collapsible? This could be handy for long lists of synonyms that are not of interest for a casual reader. Micromesistius ( talk) 14:07, 17 March 2020 (UTC)
Hi, I think I've found a bug with this one. I shall demonstrate:
This only seems to occur when using {{ extinct}}, so using †
works fine (but I don't like it). Thanks. YorkshireExpat ( talk) 16:11, 22 March 2022 (UTC)
<abbr>
whereas
Module:TaxonList expects <span>
. A simple change on lines 36-37 seems to work. I'll make the change tomorrow when I can check it properly, if not beaten to it. —
Jts1882 |
talk
20:44, 22 March 2022 (UTC)
I have corrected one issue with the plainlist use here today by making it a class rather than a style in the module. What a typo! (Yes I have made this typo in just the past few days. :)
An issue remains: The class is being added to the <ul> element, when it is only defined in CSS for the <ul>'s container. Is the display today acceptable in all cases where it is used? I.e., can the use of plainlist be removed? Or should it be using a container? Its use in e.g. Almond as part of {{ Speciesbox}} is one primary use (see Synonyms) where I think I would expect a plainlist. Is the module used in other places, such that the list output should be a normal list rather than a plainlist?
(I am here today for another reason entirely pertaining to reducing the surface area of plainlist for TemplateStyles support.) Izno ( talk) 00:56, 8 December 2022 (UTC)
plainlist
should be removed?
Izno (
talk)
18:59, 9 December 2022 (UTC)
Tree of Life Template‑class | |||||||
|
Lists Template‑class | |||||||
|
The function uses gsub() to deitalicize connecting forms such as 'subsp.' or 'f.' in taxon names. A downside of this general function is that listing subspecies in abbreviated form (e.g. F. l. cafra for Felis libyca cafra) produces a surprising result with the species initial deitalicised. Would it be better to explicitly deitalicise the connecting forms? Or are there a lot of different connecting forms and variants in use? Jts1882 | talk 14:54, 20 December 2017 (UTC)
@ Plantdrew: Jts1882 has pointed above that if {{ Species list}} is used with an abbreviated species name/epithet, it de-italicizes incorrectly. Thus {{Species list|A. beta subsp. gamma||A. b. subsp. gamma||A. b. gamma|}} gives
The last two are wrong because of the way I've coded the Lua module – starting from the second 'word', it de-italicizes the first 'word' it finds that ends with a period/stop. At first I thought the answer was to de-italicize the third 'word' of a four 'word' taxon name, but then I realized that if {{ Genus list}} was used to list the sections of a genus, the connecting term is the second word. At present {{Genus list|A. sect. beta|}} correctly gives
You almost certainly look at more taxoboxes than anyone else; have you ever seen botanical subgenera or sections listed using the "taxon list" templates? Do we need to worry about such cases? Peter coxhead ( talk) 17:35, 20 December 2017 (UTC)
@ Peter coxhead: On further investigation, I'm not sure whether it's worth making the templates sense and automatically deitalicize connectors. Many connectors were manually deitalicized already, and depending on the precise spacing format, the automatic sensing may override the deitalicization, leaving them in italics. Compare red-eared slider, where '' var. '' is unitalicized to Alnus glutinosa where ''var.'' results in italics. It appears that the majority of (attempted) manually deitalicized connectors are the product of your edits; see e.g. this search. Plantdrew ( talk) 20:13, 20 December 2017 (UTC)
Another weird case of manual/automatic deitalic methods conflicting: Fraxinus texensis. Plantdrew ( talk) 20:17, 20 December 2017 (UTC)
@ Peter coxhead: I fixed a {{ Linked species list}} error with this . I assume the issue must be with the italicizeTaxonName() function and the handling of parenthetic term in the redirect. The link is correct, but the displayed text is the page title surrounded by pumas. If Puma (genus) is used directly (not as redirect), Puma and genus are in italics and the parenthesis are normal text, i.e. Puma (genus). Jts1882 | talk 08:23, 4 September 2018 (UTC)
{{Linked genus list|''[[Puma (genus){{!}}Puma]]'' | Jardine, 1834}}
→Puma_(genus){{!}}Puma
only "Puma" is passed to the italics function? The italics function seems to be behaving correctly, but wasn't expecting input with a pipe.
Jts1882 |
talk
09:38, 4 September 2018 (UTC)
italicizeTaxonName
were, say, (link, name, linked, abbreviated)
, with link
defaulting to name
if not supplied. But this wouldn't help in the TaxonList module, since it uses purely positional parameters, so there's no way of specifying an additional 'link' parameter to match a name | authority
pair, and if you have to supply a pipe, you might as well supply the rest of the expected output.italicizeTaxonName
not to specify |linked=yes
, and then make up the wikilink via [[ link | italicizeTaxonName_result ]]
.italicizeTaxonName
, can successfully handle italicization in so many contexts: taxonomy templates, taxoboxes, taxonbars, taxon lists, ... I think there will always be special cases, which is why the function completely skips input with outer manual italics.
Peter coxhead (
talk)
09:54, 4 September 2018 (UTC)
{{#invoke:TaxonItalics|main|Puma (genus)|linked=yes}}
should output ''[[Puma (genus)|Puma]]''
, i.e. contrary to what I wrote above, a lower-case parenthesized word should be stripped off completely in the link text, not left de-italicized. However, this implies that {{#invoke:TaxonItalics|main|Puma (genus)}}
would output ''Puma''
, not ''Puma'' (genus)
. I'm not sure that this is what is always wanted. Automating all the possible cases is even more tricky than I thought!
Peter coxhead (
talk)
10:24, 4 September 2018 (UTC)italicizeTaxonName
. It expects a Taxonname, not a link-pipe-taxonname combination. The {{
Linked genus list}} template shouldn't pass the combination. The problem arose from the change in the template to handle more complex forms using the new function. The old p.italicize() function handled it simply by putting italics around the whole parameter entry. There are plenty of choices and workarounds when setting up such lists, its only legacy pages where it is an issue. It turns out that it was my edit that changed the list to use the list template, when it only worked using the pipe trick, so you can blame me.
Jts1882 |
talk
10:56, 4 September 2018 (UTC)This
edit request to
Module:TaxonList/testcases has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change content model to Wikitext and redirect to Template:Taxon list/testcases; the current page is a soft redirect serving a purpose that could be better served by a hard redirect. * Pppery * it has begun... 20:52, 10 February 2020 (UTC)
Given that (apparently) there is opposition to cross-namespace redirects, Module:TaxonList/testcases is useful because it helps anyone editing the module to find its test cases. Peter coxhead ( talk) 22:14, 11 February 2020 (UTC)
Would it be possible to include an option that makes a list collapsible? This could be handy for long lists of synonyms that are not of interest for a casual reader. Micromesistius ( talk) 14:07, 17 March 2020 (UTC)
Hi, I think I've found a bug with this one. I shall demonstrate:
This only seems to occur when using {{ extinct}}, so using †
works fine (but I don't like it). Thanks. YorkshireExpat ( talk) 16:11, 22 March 2022 (UTC)
<abbr>
whereas
Module:TaxonList expects <span>
. A simple change on lines 36-37 seems to work. I'll make the change tomorrow when I can check it properly, if not beaten to it. —
Jts1882 |
talk
20:44, 22 March 2022 (UTC)
I have corrected one issue with the plainlist use here today by making it a class rather than a style in the module. What a typo! (Yes I have made this typo in just the past few days. :)
An issue remains: The class is being added to the <ul> element, when it is only defined in CSS for the <ul>'s container. Is the display today acceptable in all cases where it is used? I.e., can the use of plainlist be removed? Or should it be using a container? Its use in e.g. Almond as part of {{ Speciesbox}} is one primary use (see Synonyms) where I think I would expect a plainlist. Is the module used in other places, such that the list output should be a normal list rather than a plainlist?
(I am here today for another reason entirely pertaining to reducing the surface area of plainlist for TemplateStyles support.) Izno ( talk) 00:56, 8 December 2022 (UTC)
plainlist
should be removed?
Izno (
talk)
18:59, 9 December 2022 (UTC)