Jump to content

Template talk:Speciesbox/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 2Archive 3Archive 4

Upgrading to the next version of {{str find}}

Per the recent modifications to {{strfind short}}, it has been advised this faster and more capable template take the place of {{str find}} where possible. Because {{PAGENAMEBASE}} is a structural template at the foundation of the code of this template, this edit could potentially cause havoc if not evaluated first for soundness.

I'm requesting anyone who has enough know-how to evaluate this proposed modification respond to the RfC listed at Template talk:PAGENAMEBASE. The template is being used in this template. Bob the WikipediaN (talkcontribs) 03:27, 6 February 2011 (UTC)

Authority

I assume that in all cases the "authority" will be identical to the "binomial authority"? Martin (Smith609 – Talk) 16:53, 1 February 2011 (UTC)

Of course. But glad you asked. I applaud your efforts here; does this template handle species that contain subspecies, and does it handle subspecies? Bob the WikipediaN (talkcontribs) 01:26, 4 February 2011 (UTC)
Subspecies can be displayed using the |subdivision= parameter, as with a normal taxobox. I'm not sure whether it's better to accommodate subspecies within this template, or to make a "subspeciesbox", which would make the coding simpler (better performance, easier to maintain, less prone to bugs). I'm inclined to do the latter; what do you think? Martin (Smith609 – Talk) 13:42, 4 February 2011 (UTC)
If you deem it appropriate, go for it. I don't know of any instance where a species has become a subspecies or vice versa-- the rank always stays the same for those. Bob the WikipediaN (talkcontribs) 16:24, 4 February 2011 (UTC)
Actually, its worth noting that species become subspecies, and vice versa, all the time - its really quite common. Himalayan wolf is just one example that comes to mind, since I happened to be reading about it last week (the WP article currently lists it as a species, but it was a subspecies until 2007, and may yet change back). Anaxial (talk) 12:54, 12 February 2011 (UTC)

Use where article title is the common name

User:Stemonitis and I have failed to get this template to work with articles where the title is the common name. (An example where we failed is White asphodel.) Putting "taxon = latin_name | name = common_name" doesn't work as it does with Automatic taxobox. Are we doing something wrong or does it not work in this case? Peter coxhead (talk) 15:23, 7 May 2011 (UTC)

Fill in two parameters, |genus= and |species=. Bob the WikipediaN (talkcontribs) 20:03, 7 May 2011 (UTC)
Thanks, Bob. [Comment added later: I should have read the documentation more carefully.]
[Material removed because it explained something which has now changed so could be misleading.] Peter coxhead (talk) 21:01, 7 May 2011 (UTC)
The genus and species parameters should be used instead of the taxon parameter. I wasn't aware the taxon parameter did anything on that template. Bob the WikipediaN (talkcontribs) 21:22, 7 May 2011 (UTC)
Actually, you're right: it doesn't do anything; the template picks up the page title. I've been misled (as have others since, as usual, rather than read the documentation I copied working examples :-) ). However the documentation is misleading when it says "Usage is exactly the same as Template:Automatic taxobox" since this is not correct; taxon is the correct parameter for the Automatic taxobox template, but not for the Speciesbox template. It would be much better if the parameters were indeed the same. This seems a matter of allowing "taxon = GENUSNAME EPITHET" in using the Speciesbox template and converting it to "genus = GENUSNAME |species = EPITHET". I personally prefer to explicitly put the taxon parameter in rather than pick up the page title (a) for documentation purposes (b) in case the page gets moved. Peter coxhead (talk) 08:45, 8 May 2011 (UTC)

Italics

Not working, e.g. in Polypodium_hydriforme. Martin (Smith609 – Talk) 22:54, 12 February 2011 (UTC)

Weird...I don't have time to do any deep debugging right now-- sorry. Is this the only article doing this? Surely not... Bob the WikipediaN (talkcontribs) 01:27, 13 February 2011 (UTC)
No, all pages where the binomen is the article title are not italicizing. Hope to get the chance to investigate soon, but would be delighted if someone beat me to it! Martin (Smith609 – Talk) 15:07, 14 February 2011 (UTC)
Oh, what I would give to have the time to do that right now instead of writing AI for a Blokus agent! Bob the WikipediaN (talkcontribs) 16:42, 14 February 2011 (UTC)
It's still an issue, but I'm still busy.... Bob the WikipediaN (talkcontribs) 17:41, 3 March 2011 (UTC)
I seem to have fixed this; see e.g. Polypodium hydriforme which no longer contains an explicit {{italictitle}} but has an italic title.
For the technically minded (perhaps only Martin and Bob), the problem seemed to be that there was a space character where I've put a '+' in this expression, which was in the label of a #switch statement: {{{genus|{{first word|{{PAGENAME}} }}+}}}. When genus was not defined, the value of the expression was not the genus name picked up from the page name but the genus name plus a space character, which caused the evaluated label not to match the test string. The exasperating thing is that if you try to see whether a space where I have '+' matters by displaying the result of the expression (rather than making it the label of a #switch statement), the wikimedia software converts multiple spaces to a single space, so it looks ok. It really is a ghastly language in which to write code. Peter coxhead (talk) 20:09, 8 May 2011 (UTC)
[Previous post here removed as no longer correct.]
I've made another change to the template, so that when this template is used it is now no longer necessary to specify {{italictitle}} in any situation where the article title should be italicized. Peter coxhead (talk) 22:44, 9 May 2011 (UTC)
Thanks for tackling that! Welcome to the WP:TAXFORCE! Bob the WikipediaN (talkcontribs) 23:30, 9 May 2011 (UTC)
The problem was in the same piece of code, i.e. where the decision is made whether to add {{italictitle}} to the value of |name=. In the original version, it was never added if |name= was given. So when the page had the latin name as the title but |name= was used to give the displayed taxobox the common name as its title, it didn't work. It could be argued that editors shouldn't use different titles for the page and the taxobox, but they do, so the template needs to deal with it. Peter coxhead (talk) 06:25, 10 May 2011 (UTC)

Use with hybrids

Currently (15:04 UTC, 12 May 2011) the template fails if it encounters a × character, either in the |taxon=, |genus= or |species= parameters, or in the title of the article, so it can't be used with hybrids.
I think this is because some string handling templates which it uses in turn use {{str index/getchar}}, which does not provide for the × character; I've left a request for it to be added (protected template), so we'll see if this fixes it. Peter coxhead (talk) 15:05, 12 May 2011 (UTC)

The template now works with hybrid species, i.e. taxa where the × character appears between the genus name and the specific epithet, with or without a space before the latter (e.g. Narcissus × medioluteus or Narcissus ×medioluteus.
Technical details: An admin has now added the × character to {{str index/getchar}}. I have created a new template {{Remove first word/any}} which can handle any of the characters specifically defined in {{str index/getchar}} (unlike {{Remove first word}} which is limited to the ASCII subset). I have then revised {{select species}}, which is used by {{Speciesbox}}, to use {{Remove first word/any}}.
Technical query (probably addressed to Martin or Bob): I suspect that the revised {{Speciesbox}} is slower and less efficient because of this change. Does this matter? If so, as hybrid species are rarely the subject of articles, there could be a parameter |hybrid-species=, say, which if set to yes selects {{Remove first word/any}} rather than {{Remove first word}}. Peter coxhead (talk) 19:58, 12 May 2011 (UTC)
Speed's always been an issue with this template family. If there's anything you can do to make it faster most of the time, go for it. Bob the WikipediaN (talkcontribs) 04:38, 13 May 2011 (UTC)

Revision to allow parameter taxon

I've uploaded a revised version of the template which allows |taxon= to be used as an alternative to |genus= and |species=. All the cases I've checked seem to work, but if you encounter any problems, please revert the template! I'll update the documentation when I'm sure the template is ok. Peter coxhead (talk) 09:02, 10 May 2011 (UTC)

User:Stemonitis fixed a few cases where there was a problem (because the value of the taxon parameter wasn't the correct latin name without any formatting). Otherwise the revised template seems to be ok. I'll now update the documentation. Peter coxhead (talk) 12:42, 10 May 2011 (UTC)
Great! That was fast! Bob the WikipediaN (talkcontribs) 14:39, 10 May 2011 (UTC)
The advantage of using separate genus and species parameters is that there is less processing for the template to do (probably increasing speed). It might be worth checking whether your modifications had a measurable effect on the speed of the template. If not - wonderful! Martin (Smith609 – Talk) 17:56, 13 May 2011 (UTC)
How do you accurately determine the processing time for a template? The change probably did slightly increase the time since I used two auxiliary templates. Their code could instead be made inline (at the cost of making the template even more unreadable). Also to minimize the chance of introducing an error I did a global replace of particular existing expressions with uses of the two auxiliary templates. Now I'm sure that the logic is right, there's at least one place where the use of taxon can be made more efficient: the old version and the current version both construct a binomial to test for a match against the page title from the genus and species values, whereas taxon already contains the binomial (if it's present at all). I'll happily work on optimizing if I can easily determine the difference in processing time.
In general, though, I believe that the advantages of having the same parameter outweigh a small increase in processing time.
I'm more concerned about the change I made to allow the multiply character to be processed – see below. Peter coxhead (talk) 18:57, 13 May 2011 (UTC)
The method I've used is several identical trials. The trial I prefer is as follows:
  • Load time of Tyrannosaurus including no taxobox.
  • Load time of Tyrannosaurus including a normal taxobox.
  • Load time of Tyrannosaurus including an automatic taxobox (or related template).
  • Load time of Tyrannosaurus including an automatic taxobox (or related template) with |taxon=Eukaryota (or relevant upper-level taxon).
These trials should produce numbers which can be used to calculate several things, including
  • Back-end processing time for a taxobox
  • Time required for calculating deep taxa
  • Time sacrificed for automation of the taxobox
When performing such trials, you need to fully clear your Internet cache for every single test. Also, don't hit the save button, just the preview button (of course). The reason I chose this article is because it's a very large article that takes a considerable amount of time to load (imagine trying to weigh air-- it's easier with the help of a balloon to put the air inside of). When I ran this trial several months ago, I found that the automatic taxobox added approximately 6-8 seconds of back-end processing time to articles that would otherwise use a manual taxobox (which I see is no longer the case!). Martin, you used to use a tool for calculating the memory used, didn't you? Bob the WikipediaN (talkcontribs) 19:08, 13 May 2011 (UTC)
I've started a new section #Timing and optimization because this discussion relates to both changes I made which are described in separate sections. Peter coxhead (talk) 19:33, 13 May 2011 (UTC)

Timing and optimization

A couple of points (so far).

  • Bob: when you say measure the load time, do you mean just timing it manually on your machine? I was looking for some way to directly measure the server processing time.
  • Martin (or Bob): in the version of the template before I made changes, usually when the genus is needed the expression used is {{{genus|{{first word|{{PAGENAME}} }} }}}. However, in determining the value for |binomial=, the expression used is {{first word|{{{genus|{{PAGENAME}} }}} }} which seems unnecessarily different and slower if genus has been specified. I haven't changed this logic since there could be a reason for it. Is there?

In terms of processing time, if the template is properly optimized (which it isn't yet), I would expect that the time taken order would be: genus + species given < taxon given < name picked up from page title. Specifying taxon can be faster than using the page title because it can avoid the need to use the string processing involved in {{PAGENAMEBASE}} (although it doesn't in the current version). Peter coxhead (talk) 19:47, 13 May 2011 (UTC)

I use a stopwatch. The time for it to load on your own machine is trivial-- if you have a look at the HTML source for a taxobox, you'll see it's plain HTML, no scripts for your machine to process. In other words, your end is only delayed by the rate at which however many bit of data can be transferred over the link (by the way, you should run these tests when the connection is not busy).
Ok, well, I'll try it, but I find that the load time on this side of the Atlantic varies considerably by time of day (much faster when it's night-time in North America), so even with a quick comparison of two versions I worry about what exactly is being measured. I was hoping there was some way of getting at the server processing cycles or some equivalent. Peter coxhead (talk) 20:30, 13 May 2011 (UTC)
I don't think there's any legitimate reason to pull the first word from the genus, only the PAGENAME. Bob the WikipediaN (talkcontribs) 20:07, 13 May 2011 (UTC)
No, I couldn't see any reason. I'll try changing it in my user space version first. Peter coxhead (talk) 20:30, 13 May 2011 (UTC)
  • Caching query: Bob noted that you must clear the cache when timing. However, there are (at least) two caches which matter: the one your browser maintains and the one that the WP server maintains. Reloading a page clearing the local cache doesn't clear the WP cache, so the template is not re-evaluated. To check when it was, I included {{TIMESTAMP}} in a copy of {{Speciesbox}} in my user-space. The only way I could get the time stamp output to change was to use edit/preview or edit/save. Now discovered from [1] how to purge the WP cache. So then I tried putting {{TIMESTAMP}} both before and after the Speciesbox template expansion. In every case I got back the same time. I conclude that I simply don't know enough about what is happening server-side to understand what timing in the way that Bob suggests actually measures. Can anyone help? Peter coxhead (talk) 07:57, 14 May 2011 (UTC)

Colors messing up

All plant articles which are using {{Speciesbox}} with the color field filled in (|color=lightgreen) currently shows up like this: click

It can easily be fixed by removing the color field entirely, but yeah, it's probably currently messing up articles now that specify lightgreen.-- ObsidinSoul 03:28, 16 May 2011 (UTC)

For the record, this was caused by an error in {{Taxobox/core}}, so affected more than just articles using {{Speciesbox}}. Now fixed. Peter coxhead (talk) 08:30, 16 May 2011 (UTC)
Resolved
\o/ -- ObsidinSoul 09:06, 16 May 2011 (UTC)
I'll take credit for breaking it...when copying and pasting a bit of code, I didn't see I left the output in that bit. My thanks to those who saw it and took action. Bob the WikipediaN (talkcontribs) 18:23, 16 May 2011 (UTC)

Species vs. Binomial

Is there any particular reason this template includes the binomial name twice? It displays Species: etc. and Binomial Name: etc., which are the same thing. MMartyniuk (talk) 14:49, 24 May 2011 (UTC)

That's a very good question, which I've thought about too. Here's my conclusion to date.
When a taxobox ends at the rank of genus or higher, the list of ranks and rank names is entirely homogeneous: a rank name paired with a one word taxon name. The difference comes when the taxobox ends at a species or lower, because here the taxon name is no longer one word. To make the point, consider Aloe buettneri. A self-consistent list would be:
....
Family: Xanthorrhoeaceae
Subfamily: Asphodeloideae
Genus: Aloe
Specific epithet: buettneri
Now it's obvious that the list should end with a separate entry for the full species name, since this hasn't appeared.
So I think the duplication occurs because it's unusual to see the term "specific epithet" outside highly specialized taxonomic sources, and once you substitute "species" you can't avoid some duplication (note that the genus name is reduced to the first letter on the first occurrence).
A different issue is why the term "Binomial name" is used instead of some more general term like "Scientific name", which I would prefer.
Incidentally, there's a template {{Subspeciesbox}} which works for zoological names which are always trinomials without the infraspecific rank shown (it's currently only used on three pages: see Sonoran Pronghorn). Now the trinomial is repeated. (To cope with botanical names it would have to deal with at least the infraspecific ranks "subsp." and "var.", if not "f." and "cv.", which is more difficult and hasn't yet been done to my knowledge.) Peter coxhead (talk) 17:50, 24 May 2011 (UTC)
I see. This strikes me as somewhat... phylogenetic, for a species box. But isn't the species epithet inherently incomplete? I've never seen it used the way you listed, as species lists the binomial with simply the genus abbreviation. See Human. MMartyniuk (talk) 17:42, 30 May 2011 (UTC)
I've obviously not managed to make my point clear. It's precisely because the specific epithet is meaningless by itself that you have to show the genus, which makes it look as if the name is repeated. But the point of the "Species:" line is not to show the full name, but to show the specific epithet. Peter coxhead (talk) 21:03, 30 May 2011 (UTC)
The {{speciesbox}} (as well as the rest of the automatic taxobox family) are programmed to enforce a long-standing practice at the WP:TOL. When using {{taxobox}}, we've always abbreviated the name in the species parameter (including the genus is mandatory, since the epithet is meaningless by itself) and displayed the full name in the binomial parameter. You've just not noticed this before because you're working on dinosaurs, where the genus is most often the subject of an article, as opposed to the species. Bob the WikipediaN (talkcontribs) 18:27, 30 May 2011 (UTC)
There are actually, I think, two reasons why it does look as if the full name is repeated:
  • The first is as discussed above, and is unavoidable, namely that the genus abbreviation must be shown.
  • The second is that the last entry above "Binomial name" is always in bold, which draws attention to it. I can't see any good reason for this. Each of the lines in the taxobox shows a rank; why should the last line for the lowest rank show its value in bold? Peter coxhead (talk) 21:03, 30 May 2011 (UTC)
Good question, and I've got an answer for you. The short answer is it's what we've always done. But I don't like that answer. Here's the longer answer:
There are three reasons to bold something in a Wikipedia article:
  • Title of the article
  • Alternate name for the subject
  • Circular link
In this case, it's a combination of the second two. In the taxobox, all taxa (usually) link to a relevant article. When constructing a taxobox for an organism whose scientific name is the same as the article title, this automatically bolds the text instead of displaying a link. It's appropriate to bold the redirects as well instead of linking them circularly. That said, all taxa (with the exception of synonyms) shown in any taxobox should ideally be either linked (even if it's a redlink) or bolded. A common exception here is the list of species that appears in many dinosaur taxoboxes, and rightly so, as there are no articles about individual species of dinosaurs.
Thus, all species-centric articles should have the species parameter and the binomial parameter bolded, as well as any immediate monotypic parents. Bob the WikipediaN (talkcontribs) 21:40, 30 May 2011 (UTC)
Bob, you'll not be surprised that I don't find that a very good answer.
  • You wouldn't in the text write something like: "Junkus junkii (also called J. junkii) is a species of ...." The species line in the taxobox gives an abbreviated version of the full name, but not an alternate name.
  • Having circular links bolded is useful in many cases; e.g. by wikilinking genera in {{Clade polysporangiophyte}} it then nicely shows up the 'topic' genus in bold in an article in which it's used. However, there has to be a reason for inserting circular links. You wouldn't start an article on Junkus junkii by writing ''[[Junkus junkii]]'' is a species of .... If you don't insert the circular link, then it won't get bolded.
In a typical article on a species, say Disporum viridescens, which happens to be last one I created, the binomial is displayed three times, bolded each time: twice in full (as the title of the taxobox and as the binomial) and once with the genus abbreviated. I think MMartyniuk was right to be a little surprised by this; we've probably just got used to it. Peter coxhead (talk) 17:23, 31 May 2011 (UTC)
Well, if you guys are interested in changing the way we do it, better make sure it's okay with the rest of the crew at WP:TOL. If we were to unbold either of the two, I'd opt for the full scientific name to be the one unbolded, as the bolding in the classification shows all the taxa described in the article at hand. Bob the WikipediaN (talkcontribs) 18:48, 31 May 2011 (UTC)

Subspecies box for botanical names (again)

I've been investigating how {{Subspeciesbox}} could be modified to display botanical subspecies correctly. The problem unfortunately goes back to {{Taxobox/core}} which embeds the 'title' lines "Binomial name" or "Trinomial name" when |binomial= or |trinomial= are specified. However, as I noted above, "Trinomial name" is a term simply not used in the Botanical Code so should not be displayed. The only term the Code seems to use is "name of an infraspecific taxon" but I wouldn't suggest "Infraspecific name" for the taxobox. The best I could come up with is "Full name". It's fairly easy to produce a different version of {{Taxobox/core}} which parameterizes the term displayed for a trinomial name, with a default of "Trinomial name"; then {{Subspeciesbox/botany}} can ensure that "subsp." is always present and that "Trinomial name" is substituted by e.g. "Full name" or "Scientific name".

Any views on pursuing this line? Peter coxhead (talk) 21:03, 30 May 2011 (UTC)

Instead of duplicating, I'd recommend a check to see what kingdom the taxon is in and display the trinomial label accordingly.
//logic
if(regnum.equals("Plantae")) return "Scientific name"; return "Trinomial name";
Make sense? Or are we on two different pages? Bob the WikipediaN (talkcontribs) 21:45, 30 May 2011 (UTC)
I would support changing this field to "Scientific name" for all taxobox templates. It's easier to understand for a general audience than Binomial or Trinomial name. (and "Binomial name" is itself a redundancy! "Two name name"? If anything it should be simply Binomen). MMartyniuk (talk) 21:48, 30 May 2011 (UTC)
Bob the WikipediaN (talkcontribs) 21:54, 30 May 2011 (UTC)
1. I strongly agree with MMartyniuk.

Speciesbox/Archive 1
Scientific classification Edit this classification
Kingdom: Plantae
Clade: Tracheophytes
Clade: Angiosperms
Clade: Monocots
Order: Asparagales
Family: Amaryllidaceae
Subfamily: Allioideae
Genus: Allium
Species:
Subspecies:
A. c. cepa
Trinomial name
Allium cepa cepa
2. Bob, see the taxobox opposite, created with {{Subspeciesbox}}. Because the regnum is Plantae, the text "Trinomial name" is supposed to be linked to Ternary name not Trinomial nomenclature (see the code of {{Taxobox/core}}). If you create the same taxobox with {{Taxobox/core}} by filling in the taxonomic hierarchy, it does indeed link in this way. I've tried (but not too hard!) to understand why when {{Taxobox/core}} is driven from {{Subspeciesbox}} this doesn't work. So at present including a test of the kind you suggest, although sensible, didn't work when I tried it. (Oh, and of course it's not just Plantae but all the groups to which the ICBN rather than the ICZN applies.) Peter coxhead (talk) 17:39, 31 May 2011 (UTC)
My apologies...that smiley was intended to indicate my astonishment that an unknown problem had been pointed out and solved in an ingenious manner. I approve. But again, this affects the entire WP:TOL, so we better take it to them. Thumbs up icon I support this change, too. Bob the WikipediaN (talkcontribs) 18:51, 31 May 2011 (UTC)
P.S. I hadn't intended for that code to be used as presented...it would need converted in a more relevant manner to MediaWiki, of course. Only problem I foresee in that solution (which doesn't matter as I like Matt's solution better) might be slowing down the system in finding the kingdom to the point that the template doesn't finish loading. Bob the WikipediaN (talkcontribs) 18:54, 31 May 2011 (UTC)

extant genus extinct species

What is the correct coding to get an extinct species to display a dagger when the genus is extinct (eg Osmunda wehrii)? --Kevmin § 00:11, 23 August 2011 (UTC)

{{extinct}} will do it. Bob the WikipediaN (talkcontribs) 01:49, 23 August 2011 (UTC)
I'm having similar problems to Kevmin above with an extinct species but an extant genus. The species field shows the extinction dagger but not the binomial field when |extinct= is set to yes. See Araucaria mirabilis. How does the workaround work exactly? (i.e. where should I place {{extinct}}?)-- Obsidin Soul 14:40, 13 November 2011 (UTC)
Should the dagger be displayed in the binomen box? (It's not part of the binomial name, after all.) If it should, it'd be easy to modify the template accordingly (per Template:Speciesbox/sandbox). Martin (Smith609 – Talk) 16:19, 13 November 2011 (UTC)
I thought we did! Can't remember, but I copied that style after another article here. :P Now that you ask it though, I'm not so sure. I've always included a dagger in the binomen field, as well as the type if appropriate. If nobody else does that, I guess its fine as of now. So... anyone?-- Obsidin Soul 16:29, 13 November 2011 (UTC)
In response to Martin, well, it's not part of the "Species" either... However, it does seem to me to be a bit redundant to display a dagger twice. Also suppose you have a list of synonyms below the binomial name: you wouldn't put a dagger on each of them, so perhaps it would be a bit odd to have it on the first binomial. (I guess in zoological names, where both parts of the binomial are names, you could have two daggers for an extinct species in an extinct genus – only joking!) Peter coxhead (talk) 20:16, 13 November 2011 (UTC)
Haha, I did put a dagger on the synonyms. I think keeping the daggers on the list of ranks should be good enough. Thanks all.-- Obsidin Soul 03:02, 14 November 2011 (UTC)

Redundancy

 – Pointer to a relevant discussion elsewhere.

The structure of this and related templates is the subject of discussion at Template talk:Taxobox#Redundancy. — SMcCandlish   Talk⇒〈°⌊°〉 Contribs. 00:35, 23 February 2012 (UTC)

Great idea

I just found this site, what a fantastic idea. It won't work every time, but sure sounds like an easier way to update taxonomy than doing it manually. So I'm assuming in order to put up a species automatic taxobox, everything with a higher classification to it needs to to be done first? I also read that for the species autobox, it wont pick up any subclassifications between genus and family, so not worth doing yet for those? I spend some time at the Wikibird project, and we also have issues with keeping regional lists up to date. Perhaps down the road the automated taxobox can be adapted (or something like it) to keep up with those changes? Perhaps other taxa that maintain regional lists could benefit?.....Pvmoutside (talk) 21:30, 25 June 2012 (UTC)

Hi, and sorry for the late response! Several questions were asked...I'll provide several answers:
  • In order for any type of {{automatic taxobox}} to work, all higher taxa for that taxon must exist already in the template database. The {{speciesbox}} belongs to this family, and requires the genus to exist in the database, and its parent, and its parent's parent, etc, all the way up to {{Taxonomy/Life}}. Most of the time, you won't need to enter more than a small handful of these, since the higher-level taxa are already entered.
  • While in-between (minor) taxa will be omitted from the speciesbox, it's important to include these anyway, since they might be called by the automatic taxobox for a different article about a higher-level taxon. For example, an article about the genus would benefit from someone having included the subfamily in the genus temple, since any subfamily ought to be included in the genus article's taxobox.
  • The regional lists are a very interesting idea! I'm not sure we have a powerful-enough MediaWiki functionality in the to do that just yet, though. But WikiData seems to offer hope for a bright future in this sort of topic-- I look forward to seeing what can be done with it.
  • Also-- if you're interested in regional lists, I think it would be wonderful if we could get a collaboration going between Wikipedia and iNaturalist, which specializes in exactly that sort of thing. I've been making efforts lately to add as much data as possible to their databases.
Hope that helps! Bob the WikipediaN (talkcontribs) 04:39, 13 July 2012 (UTC)
Thanks Bob......It was very helpful. I am stumped a bit though. I tried creating Template:Taxonomy/Accipitrinae and Template:Taxonomy/Lophonetta but they aren't working quite right. Can you help?....Pvmoutside (talk) 01:03, 15 July 2012 (UTC)
Ah. Looks like you tried to put a taxobox on a template page-- that's not what goes there. I've repaired both templates and added a reference for {{Taxonomy/Accipitrinae}}.[2][3] Bob the WikipediaN (talkcontribs) 20:01, 15 July 2012 (UTC)

expansion depth

Something is wrong with this template. I clicked on a few randomly chosen pages that use this template, and they all were in the category Category:Pages where expansion depth is exceeded (and yes, the category does not exist). RockMagnetist (talk) 01:36, 8 May 2012 (UTC)

Wikipedia:Village pump (technical)#Page exceeded the expansion depth? ---— Gadget850 (Ed) talk 02:26, 8 May 2012 (UTC)
To clarify: the template has not changed, but a new version of the MediaWiki software produces an error report not previously generated. If the Speciesbox template worked before, it still does; to this extent it's a false report. Peter coxhead (talk) 08:52, 8 May 2012 (UTC)
As {{speciesbox}} is a fork of {{automatic taxobox}}, I think it's best if discussion is focussed at Template talk:Automatic taxobox/Archive 8#Expansion depth, where this issue is also under discussion. --Stemonitis (talk) 09:56, 8 May 2012 (UTC)

This is under discussion again at Wikipedia:Village_pump_(technical)#Templates_and_expansion_depth. -- Alan Liefting (talk - contribs) 23:03, 31 August 2012 (UTC)

Colors messed up again

The light brown color for animals is not showing up in these articles: Ecnomiohyla and Ecnomiohyla rabborum. And yes, it was correctly displaying before. Any idea what changed with the template?-- OBSIDIANSOUL 00:12, 1 September 2012 (UTC)

This edit was the culprit. User:Wikid77 has been commenting some templates trying to reduce expansion depth limit. I think we need Smith609's supervision for these changes. I have restored the template and the colors are showing up now. Ganeshk (talk) 18:42, 1 September 2012 (UTC)
Thanks for tracking that down. -- OBSIDIANSOUL 19:14, 1 September 2012 (UTC)

Whitespace at top?

At eg. Galápagos tortoise and Albertosaurus, there's a line of whitespace at the top that I can't diagnose/cure properly. (Removing the linebreaks (smushing all the template onto a single-line) works, but shouldn't be necessary).

Is it coming from this template, or {{taxobox}}, or {{pp-move-indef}} ? —Quiddity (talk) 18:37, 8 September 2012 (UTC)

Gah. Found explanations: Template talk:Pp-move-indef#Use and Template talk:Pp-move-indef#Fix the unnecessary linebreaks added by this template. It seems that we do have to smush templates together onto one line, if those templates add categories. Hence all the articles that aren't displaying this problem already do put the templates on the same line. Ie. {{pp-move-indef}}{{Speciesbox....
I'll just 'fix' them as I see them, individually. —Quiddity (talk) 18:42, 8 September 2012 (UTC)
Yes, it's annoying but seems unavoidable. A classic source of an extra line is the use of {{italictitle}} with a non-automated taxobox. These must be on the same line. This template doesn't cause problems so often because there isn't usually another template before it. Peter coxhead (talk) 16:55, 9 September 2012 (UTC)

Edit request

As noted at Template talk:Automatic taxobox, it would be greatly beneficial if this template could detect if the focal species is in a monotypic genus (which will almost always manifest as {{{PAGETITLE}}} matching the genus parameter), and automatically show the next higher taxon in the hierarchy (equivalent to setting display_parents to at least 2). My template programming isn't up to it, but it looks like it should be easy enough. --Stemonitis (talk) 07:18, 9 November 2012 (UTC)

Please see Template talk:Automatic_taxobox#Speciesbox in genus articles before responding to this edit request. Peter coxhead (talk) 10:49, 9 November 2012 (UTC)
Update. The background issues seem to have been sorted out, and there is acceptance that {{speciesbox}} can be used in such cases. My request can therefore be resurrected; please modify the template to detect if the focal species is in a monotypic genus and automatically show the next higher taxon in the hierarchy. --Stemonitis (talk) 19:35, 23 November 2012 (UTC)
  • Proposed change in {Speciesbox/sandbox} for display_taxa: I have modified Template:speciesbox/sandbox to check for {PAGENAME} rank as "genus" as a possible method to detect a monotypic genus. The Taxobox/core parameter is display_taxa to handle display_parents, which would be set to 2 when {PAGENAME} is a genus. I think that should work, and I have tested the depth to ensure that the added markup would not affect the depth limit. If display_taxa=2 is not enough, then it could be 3, 7 or whatever higher. -Wikid77 (talk) 13:31, 24 November 2012 (UTC)
I've tried it out on a few test cases, and it looks fine to me. If there are no objections, I suggest we implement it. --Stemonitis (talk) 07:48, 26 November 2012 (UTC)
I seem to be a lone voice in not liking this form of taxobox on genus pages, so it seems sensible to implement this change. Peter coxhead (talk) 16:13, 27 November 2012 (UTC)
Does not seem to work in my testing. Please see Template_talk:Speciesbox/sandbox#Mononykus. It should have displayed the branch, Mononykini. Ganeshk (talk) 03:54, 29 November 2012 (UTC)
  • Also test {Speciesbox/sandbox} on a genus talk-page: For a more-complete test (to show a branch taxon), then {Speciesbox/sandbox} should also be tested on the talk-page of a species or genus article, rather than just subpages here, because {Speciesbox} will check the {PAGENAME} of the specific talk-page as being the name of a genus taxon, and a subpage ("/sandbox") is not a genus name. For example, check the use of {Speciesbox/sandbox} at page:
That page "Talk:Mononykus" has the PAGENAME "Mononykus" (a genus) and is detected as having rank "genus" by {Speciesbox}. Testing here only confirms the general infobox format, rather than the format as shown in a genus article. -Wikid77 13:10, 29 November 2012 (UTC)
 Done Looks good. Thanks Wikid77. I have implemented the change. Ganeshk (talk) 13:30, 29 November 2012 (UTC)

Italics

Any ideas on why Omphalomargarites sagamiensis is not getting the italic title? Also, the species and binomial have the genus repeated twice. Thanks. Ganeshk (talk) 14:45, 29 November 2012 (UTC)

Now fixed. Looks like {{speciesbox}} requires genus= and species= rather than taxon=. --Stemonitis (talk) 15:01, 29 November 2012 (UTC)
Thanks. Ganeshk (talk) 17:14, 29 November 2012 (UTC)
I am still intrigued by this. Why is that Cantharidoscops frigidus looks okay without the genus and species parameters, but Omphalomargarites sagamiensis doesn't? Ganeshk (talk) 17:57, 29 November 2012 (UTC)
  • Seems to be a complex bug in default settings: I will examine Template:Speciesbox to see why a species article title would default to repeat the genus-genus name and also stop page-name italics, which can handle 50-letter names. If anyone else pinpoints the problem, then reply here. Thanks.
    FIXED: The problem was in Template:Remove_first_word, which only checked for 15-letter names, now expanded to allow 30-letter names:
  • Formerly:  {{remove first word|Omphalomargarites sagamiensis}} → Omphalomargarites sagamiensis
  • Currently: {{remove first word|Omphalomargarites sagamiensis}} → sagamiensis
Because the prior processing treated the entire name as having the first word removed, then the first word became repeated in the species or binomial name, rejected as no longer matching PAGENAME when trying to italicize. Thanks for noting the 2 problems were triggered by a long genus name. -Wikid77 (talk) 18:19/21:29, 1 December 2012 (UTC)
Thanks for figuring this out. Ganeshk (talk) 23:27, 1 December 2012 (UTC)

Code in pages

Actually there might be a problem with this template. If you see pages, where it is used there is a code displayed within the taxobox.--Juandev (talk) 18:11, 23 September 2013 (UTC)

Could you please provide links to pages where you see this happening so we can check it out?--Kevmin § 18:45, 23 September 2013 (UTC)

Obscure template error

Something seems to have recently changed, which is causing an {{error}} to be transcluded by Thalassocystis: "Unrecognised rank: Informal group Caca". Sorry, I don't find much about taxobox templates that is self-explanatory. Can someone fix this? Thanks. Wbm1058 (talk) 14:30, 3 April 2014 (UTC)

It was due to vandalism at a higher level taxonomy template. Fixed. Peter coxhead (talk) 15:51, 3 April 2014 (UTC)


Extinct

Why do we need |extinct=yes ? Shouldn't it get that from the template? Is this just too much trouble to get right or is there some reason why this is desirable? Thanks, ErikHaugen (talk | contribs) 22:17, 5 May 2014 (UTC)

If it can figure out that a species is extinct if the genus is, that would be great. Also, in the template code, could we please use {{extinct}} instead of just the raw symbol? That way if people mouse over it, it tells them what the symbol means (in case they can't figure it out). – Maky « talk » 18:57, 22 March 2015 (UTC)
Looking at the code, it is supposed to pick up a dagger from a taxonomy template, if not specified here. I'll look into this when I have time – prod me if I forget. [It does.]
I don't see that {{extinct}} does produce a link: example. Peter coxhead (talk) 15:54, 23 March 2015 (UTC)
No, it doesn't produce a link. Maky said it produces mouseover text, which I am seeing in your example Peter. ErikHaugen (talk | contribs) 16:56, 23 March 2015 (UTC)
Ah, sorry, my mistake. But is the mouseover text really helpful? I wasn't aware that it was there, and it requires very precise mouse positioning. Peter coxhead (talk) 22:53, 23 March 2015 (UTC)
It's better than nothing (if a user doesn't know what it means), and linking might generate complaints about overlinking. That's why I'm using it. There was a discussion about this somewhat recently, but I forget where, and I don't have time to look for it. It was on one of the Wikiprojects... It's just a suggestion. – Maky « talk » 16:44, 24 March 2015 (UTC)
I use |extinct=yes quite frequently actually in my writing on Tertiary insects and plants. I always set up an Automatic taxobox for the article, and often the species I am writing about is placed into an extant genus, see Calocedrus huashanensis, Sassafras hesperia, and Mastotermes electromexicus.--Kevmin § 00:00, 24 March 2015 (UTC)

Speciesbox/Archive 1
Scientific classification Edit this classification
Kingdom: Plantae
Clade: Tracheophytes
Clade: Lycophytes (?)
Genus: Adoketophyton
Species:
A. parvulum
Binomial name
Adoketophyton parvulum
Precisely. And if the genus is extinct and labelled as such in the taxonomy template, then the species is marked with † automatically according to my tests. Thus the taxobox opposite is created by {{Speciesbox |taxon=Adoketophyton parvulum }}. So it now seems to me that except for the mouseover issue, the template behaves correctly: if the genus is marked as extinct, you don't need to use |extinct=yes; if the genus isn't extinct but the species is, you do.
What's not quite right is the difference in position of the †. The genus has it next to the name (and included inside the wikilink) – a placement produced by the core template code – whereas the species has it separated, unless you have |extinct=yes or |extinct=no(!!), when there's no space. This needs to be fixed.
Since there's no mouseover for the genus †, surely it wouldn't be useful for the species? Peter coxhead (talk) 10:02, 24 March 2015 (UTC)
My suggestion was to replace the symbol in all templates with {{extinct}}. The individual taxa templates only record a true or false value for extinct, and though I haven't tried digging through the code, I'm sure it's processed in one central place. I figured it would be a simple fix. – Maky « talk » 16:44, 24 March 2015 (UTC)

Also, there is a difference in behavior between using the |extinct= in a speciesbox versus the automatic taxobox. See Megaladapis vs. Hadropithecus and note the "Conservation status" portion of the box. Both use the same code, but the automatic taxobox places the extinction date in the box and speciesbox doesn't. I'm not sure if this was intended, but I picked it up from somewhere when I was using {{Taxobox}}. If this is an intended effect, I can't make my taxoboxes consistent because monotypic extinct genera can't display extinction dates, while polytypic genera will. – Maky « talk » 16:59, 24 March 2015 (UTC)

@Maky: in response to both your comments above, looking at the code, the extinct parameter is processed differently. As I understand it, {{Automatic taxobox}} just passes the value of the parameter to {{taxobox/core}}, so if, say, a family is labelled extinct, this does not pass down to a genus belonging to that family. I'm very reluctant to touch {{taxobox/core}} to change the behaviour of the generated †. This is a complex template, used by all the others. Only User:Smith609 and then User:Bob the Wikipedian have ever extensively edited it. {{Speciesbox}} does some processing of the extinct parameter itself, since it does inherit from the genus (as noted above). I'm happy to look at changing the sandbox version of this template. Peter coxhead (talk) 23:15, 24 March 2015 (UTC)

Handling unclear genera

The species 'Anchomomys' milleri is known throughout the literature as needing a new generic name. To quote Fleagle, 2013 (source in the article):

A very similar species from the Late Eocene of Egypt, 'Anchomomys' milleri, seems to belong in the same group. A. milleri is almost certainly a djebelemurid rather than a member of the genus Anchomomys, and needs to be given a new generic name. However, the fact that this species was originally allocated to the European genus Anchomomys suggests dental similarities between these North African stem strepsirrhines and European cercamoniines , particularly to the genus Anchomomys.

Similarly, ? Nycticebus linglom was assigned to Nycticebus, using open nomenclature.

How would you suggest handling these cases? – Maky « talk » 21:07, 25 March 2015 (UTC)

Off the top of my head, I'd use a manual taxobox, and use the "query notation" as at ? Nycticebus linglom. Automatic taxoboxes require some degree of certainty as to the classification, it seems to me. Peter coxhead (talk) 21:25, 25 March 2015 (UTC)
Please see Template:Automatic taxobox/doc/advanced#Questionable assignments. Bob the WikipediaN (talkcontribs) 19:21, 18 April 2015 (UTC)
 Done Bob the WikipediaN (talkcontribs) 19:38, 18 April 2015 (UTC)
It might work as far as the article namespace is concerned, but Template:Taxonomy/Anchomomys milleri is still in Category:Automatic taxobox cleanup. Can that be fixed, too? --Stemonitis (talk) 05:41, 19 April 2015 (UTC)
@Bob the Wikipedian: it doesn't actually "work" since it doesn't produce a correctly formatted taxobox for a species, in which the last "sub-box" should be headed "Binomial name" (as per ? Nycticebus linglom). Instead you get a kind of bastardized genus box with a single species listed twice. Peter coxhead (talk) 09:01, 19 April 2015 (UTC)

Redundant species heading

Would it be possible to eliminate some of the redundancies in the template? For example, the species name is listed twice, e.g. Species: T. rex (with no listed authority) and then Binomial name (itself redundancy): Tyrannosaurus rex (authority). It would be more streamlined to simple eliminate the first Species: line and change the heading "Binomial name" to "Species". MMartyniuk (talk) 13:12, 10 August 2013 (UTC)

Actually, you've already asked this question above, in slightly different terms.
It would not be sensible to change this template without changing the standard (non-automated) taxobox template which can also be used to display the classification hierarchy for a species.
The issue of redundancy has been discussed a number of times in the past (not just here, I think, but also at one of the other talk pages for taxobox templates). To take a particular example, I agree that it seems odd that the taxobox for Roscoea ends with the "target" taxon, i.e. the one the page is about, whereas the taxobox for Roscoea alpina repeats the "target" taxon, first against "Species" and then in a completely new section of the taxobox as a binomial name.
But your suggestion doesn't change the inconsistency in the treatment of a genus and a species when they are the "target" of the taxobox. Further, looking down the taxon ranks you wouldn't see "Species" where you would expect it; it would be in a different place.
It would seem more logical, if you want to eliminate redundancy, to remove the extra section at the bottom for a species, whether this is headed "Binomial name" or "Species". But then you would need to repeat the genus name, i.e. in my example have something like:
Kingdom: Plantae
...
Genus: Roscoea
Species: Roscoea alpina Royle
which also looks redundant.
Ultimately the problem comes down to Linnaeus' choice of two-part names for species, of which the first is the genus. This forces species to be treated differently from other ranks. (There's also the issue of making the box suitable for names under both the botanical and zoological codes, which treat binomials somewhat differently – the second part is a name in the ICZN but not in the ICN.) We seem to have agreed in the past that the current structure is the least worst. Peter coxhead (talk) 15:32, 10 August 2013 (UTC)
"Which also looks redundant" but it's not actually redundant, as you say, and it's also less redundant than listing the binomial twice in a row. I would suggest the following options: 1) Drop the "Binomial Name" section entirely and leave everything else the same while adding an authority for Species. 2) Drop the Species line and change "Binomial Name" to "Species". Listing the binomial twice doesn't become less redundant just because the first time lists the abbreviation and lacks the authorship--this just makes it look broken or incomplete. Furthermore, the phrase "Binomial name" is itself redundant and non-standard use that seems to have been invented by this template. It should read either "Binomial" or "Scientific name", which are essentially synonyms. Using your example, for Roscoea alpina, the full or abbreviated specific epithet is listed in the taxobox no less than three times! Once in the header (which should really be the common name, if available), once under Species, and once under Binomial Name. Only one (the third one, for some reason) list the authority. I think once should do it, maybe twice if it also needs to be in the header. Dinoguy2 (talk) 09:14, 11 May 2016 (UTC)
Scientific classification
Kingdom: Plantae
Clade: Angiosperms
Clade: Monocots
Clade: Commelinids
Order: Zingiberales
Family: Zingiberaceae
Genus
Roscoea Sm.
Scientific classification
Kingdom: Plantae
Clade: Angiosperms
Clade: Monocots
Clade: Commelinids
Order: Zingiberales
Family: Zingiberaceae
Genus: Roscoea
Species
Roscoea alpina Royle
@Dinoguy2: Let's leave the header out of the discussion; it seems to be agreed that infoboxes generally have headers and these aren't the scientific name where the English name is well known.
It has always seem anomalous to me that the "target taxon" just appears at the end of the list for ranks higher than species, but is put in a special box for species. If there were general agreement that this should be fixed for both automated and non-automated taxoboxes, I would suggest always having a special box for the target taxon, so you would get taxboxes with the patterns shown to the left.
But this would be a big change, and would need a lot of discussion and a strong consensus, given how many articles would change appearance if the various taxobox templates were changed. Peter coxhead (talk) 16:22, 11 May 2016 (UTC)
Or we could simply drop the special box, which is clearly redundant, and just standardize them to the Genus type box. To the avergae reader, using the special box (green highlight, centered title as in the examples you posted) almost make the "Genus" and "species" seem like distinct categories from the Scientific classification heading, which they should fall under. The next header within the taxobox should be whatever specialty section is added next, like range maps or synonyms. I don't think this is that big a change and I doubt anybody not intimately familiar with taxoboxes would even notice. As for consensus, there seem to be very few people actually watching this page... Dinoguy2 (talk) 20:08, 11 May 2016 (UTC)
But this template is less used than the non-automated taxobox, and should be kept in line with it. It's important that switching between the standard {{Taxobox}} and {{Speciesbox}} doesn't radically change the layout. So it would need a wide discussion involving WP:TOL and descendant wikiprojects. Peter coxhead (talk) 20:58, 11 May 2016 (UTC)
I disagree. There's no reason two different templates should be kept in line with each other. In fact it would be good to differentiate them, otherwise we might as well abandon this one and just use the standard Automatic taxobox for everything. Dinoguy2 (talk) 12:54, 15 May 2016 (UTC)
Note that I wrote "Taxobox" not "Automatic taxobox". The way that taxoboxes for species are laid out is quite independent of which template you use, whether {{Taxobox}}, {{Automatic taxobox}} or {{Speciesbox}}. ({{Speciesbox}} is just an easier way of invoking {{Automatic taxobox}} for a species.) See Template:Taxobox#Animal species for example. The "extra box at the bottom" style is also used for subspecies and other infra-specific ranks, whether these are set up with {{Taxobox}}, {{Automatic taxobox}}, {{Subspeciesbox}} or {{Infraspeciesbox}}. So there would definitely need to be a consensus over all the "tree of life" projects to make the change. Peter coxhead (talk) 16:53, 15 May 2016 (UTC)

"Invalid color"

Last week, the WP:BIRDS cleanup listing got a slew of new articles, all with the error message "Taxoboxes with an invalid color". All are extinct species using the {{speciesbox}} template; Abavornis is an example. I have no idea what's wrong, or how to fix it. There is no color parameter currently set in the articles. Should there be? Is that the problem? Any ideas or help appreciated. MeegsC (talk) 11:34, 9 September 2016 (UTC)

I'm not absolutely sure, but I think the problem is that the template expansion depth is being exceeded. If I'm right, somewhere along the taxonomic hierarchy extra nodes have been inserted. Right now, the problem affects all articles from Enantiornithes downwards in the taxonomic hierarchy. I'm looking into it, but the automatic taxobox system is complex and hard to debug!
I've now asked the editor who wrote the topmost levels of the display of automated taxonomies – see User_talk:Wikid77#Automated_taxonomy_system_errors. Peter coxhead (talk) 15:12, 9 September 2016 (UTC)
Thanks Peter! Let me know what you find out. MeegsC (talk) 19:58, 9 September 2016 (UTC)
No joy so far. If it doesn't get fixed, the only solution will be to use a manual taxobox in the relevant articles. Peter coxhead (talk) 09:22, 10 September 2016 (UTC)

See User talk:Peter_coxhead#Automated taxonomy system errors. The cause of the error is clear: the taxonomic hierarchy stored in the "Template:Taxonomy/..." templates is too deep. What's puzzling is why this has shown up now, since I still can't find any changes that may have caused it. There are two solutions:

  • The "one off" solutions are to edit all the affected pages to use manual taxoboxes.
  • The "global" solution is to cut out levels in the taxonomic hierarchy, i.e. bypass some of the "Template:Taxonomy/..." templates.

This needs wider discussion involving WP:Birds and WP:Dinosaurs at the least. Peter coxhead (talk) 08:36, 11 September 2016 (UTC)

See Wikipedia talk:WikiProject Dinosaurs#Automated taxonomy system errors. Peter coxhead (talk) 08:55, 11 September 2016 (UTC)

Incorrect code for default display_parents

If |display_parents= was not present, the template had some code which, if I understand its purpose correctly, was meant to set a default based on whether on not the page was actually at the genus, although using a taxobox for a species – which would be the usual situation for a monospecific genus. However, this code did not work correctly:

  • it did not deal with the case where the genus name needs disambiguating, so the page was at the species name or (contrary to normal practice) at the disambiguated genus name
  • it did not, and could not, deal with the page being at the English name.

The defaults set were also not in line with the HTML comment in the code explaining that the default should be 1 level (above genus), to provide some context (they were 0 in most cases and 2 for a correctly detected monospecific genus). So I've removed the faulty code and set a default of 1 above genus whenever |display_parents= is absent.

It's also worth noting that when set as a parameter, |display_parents= refers to the levels above species in {{Speciesbox}}. The genus is displayed regardless; to get N extra levels above genus, set |display_parents=N+1. Peter coxhead (talk) 14:06, 6 December 2016 (UTC)

Taxonomy templates updated

Please see Wikipedia talk:Automated taxobox system#Taxonomy templates updated. Peter coxhead (talk) 23:00, 1 February 2017 (UTC)