Misplaced Pages

Template talk:Chembox: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 21:02, 12 February 2015 editLeyo (talk | contribs)Autopatrolled, Administrators22,349 edits Tracking parameter errors: PS notice← Previous edit Latest revision as of 17:57, 14 January 2025 edit undoArthurfragoso (talk | contribs)Extended confirmed users, Template editors4,591 edits dark mode fix 
Line 1: Line 1:
{{hatnote|See also: {{tlt|Navbox Chembox}}, {{tlt|Drugbox}}}}
{{notice|This page is for discussion about format, layout, content (parameters), and application howto of the Chemical infoboxes. Discussions older than several months, and now outdated, are archived. Planning and progress of implementation of these infoboxes to the numerous articles is discussed and (where possible) organized in the ], part of the Chemistry WikiProject.}}
{{Permanently protected}}
{{Chemistry|class=template}}
{{Talk header}}
{{archives|search=yes}}
{{Notice|This page is for discussion about format, layout, content (parameters), and application howto of the Chemical infoboxes. Discussions older than several months, and now outdated, are archived. Planning and progress of implementation of these infoboxes to the numerous articles is discussed and (where possible) organized in the ], part of the Chemistry WikiProject.}}
{{Old TfD|date= 2018 November 26 |result=withdrawn |disc=Template:Chembox}}
{{WikiProject banner shell|
{{WikiProject Chemistry}}
{{WikiProject Chemicals}}
{{WikiProject Medicine}}
}}

{{User:MiszaBot/config {{User:MiszaBot/config
|archiveheader = {{aan}} |archiveheader = {{Aan}}
|maxarchivesize = 200K |maxarchivesize = 200K
|counter = 6 |counter = 13
|minthreadsleft = 5 |minthreadsleft = 3
|algo = old(60d)
|minthreadstoarchive = 1
|archive = Template talk:Chembox/Archive %(counter)d
|algo = old(90d)
|archive = Misplaced Pages talk:Chemical infobox/Archive %(counter)d
}} }}
== Solubility in water ==
In "Solubility in water", water links to ]; I suggest it should be changed to ], e.g. in {{tl|Chembox Properties}}:
: <nowiki>]</nowiki> → <nowiki>]</nowiki>
] (]) 21:42, 10 November 2014 (UTC)


== Drug_class field not working ==
:For {{tlf|Chembox}}, {{tlf|Chembox Properties}} is the single place to edit indeed (AFAIK). Note that {{tl|Infobox drug}} has this data element too. -] (]) 23:20, 7 December 2014 (UTC)
Hello. The "Drug_class" field in Section6 "Chembox Pharmacology" (see ] for documentation) does not seem to be working. The field does not show in the drugbox when filled and instead this text is deposited on the page: "]". Hoping for a fix so that this field can be used. Thank you. – ] (]) 10:33, 7 November 2024 (UTC)
::{{done}} in {{tl|Chembox Properties}}: . No changes in {{tlf|drugbox}} by this. ] (]) 23:36, 7 December 2014 (UTC)
:That support template was deleted last year because editors noted it was not used at that time (maybe no chemical article actually filled out that field, or possible difficulty in diagnosing a complex template suit). It's documented, so it should be supported (or un-documented). And it's useful and usable, so it should be supported. Working on it... ] (]) 13:14, 23 December 2024 (UTC)
* Also added (in the sandbox now) in {{tlf|infobox drug}}. Talked ]. -] (]) 15:02, 18 December 2014 (UTC)
::{{fixed}} via ]. ] (]) 13:37, 23 December 2024 (UTC)
:::{{ping|AlyInWikiWonderland}}, based on note on IP-talkpage:) ] (]) 03:09, 24 December 2024 (UTC)


:::: @]: That's great to hear, thank you! – ] (], ]) 02:28, 7 January 2025 (UTC)
:: As I have stated ], I think it would be better to change the text to "] in water". Solubility is as much a property of the solute as it is of the solvent. Furthermore water is a common term that does not need to be linked. ] (]) 16:09, 18 December 2014 (UTC)
:::Good point, fine with me. {{U|Christian75}}, what do you think? -] (]) 17:09, 18 December 2014 (UTC)
:I do not agree that water is a common term in regards to chemistry. Because is has technical dimensions that are specifically relevant to the topic. But antoher target could be ] which is a redirect ]. ] (]) 11:49, 2 January 2015 (UTC)
::That's a better link. I am undecided. Note that {{tl|infobox drug}} follows this thread. Since I updated that box yesterday, it now has water unlinked. But depending on the outcome here we'll adjust that of course. In the end, {{tlf|Chembox}} and {{tlf|infobox drug}} will be the same in this. -] (]) 12:23, 2 January 2015 (UTC)
:::I agree that ] is a much better target for the link. My preference would be the piped link "<nowiki>]</nowiki>" as "water solubility" is slightly ambiguous (i.e., water can act as either a solvent or a solute). ] (]) 00:08, 3 January 2015 (UTC)
::::We are closing in ;-). You mean to label it:
:::::1. ]
:::::2. ] ]
:::::3. ] in ]
::::-] (]) 11:13, 3 January 2015 (UTC)
::::: #1 is simplest (least number of links). #2 is bad style (two adjacent wikilinks so it is not immediately apparent if there is one or two links). #3 is most accurate but somewhat redundant. I am leaning toward #3. ] (]) 11:46, 3 January 2015 (UTC)
::::::I used #1 "]" in {{tl|drugbox}} for its relaxed link view. One link should do. {Chembox} will follow. -] (]) 09:38, 9 January 2015 (UTC)
* {{Done}} in {{tl|Chembox}} too. I consider this closed. -] (]) 16:12, 6 February 2015 (UTC)


== Request, page break for each CAS No == == Dark mode support for images ==


Can we add skin-invert-image to the images in this box or give them a white background?
Would it be possible for each CAS No (and indeed for each value for every 'identifier') to start on a new line? Currently the text wraps, which leads to problems when the CASNo_Comment option is used, or even worse problems when it's used for some enties but not other. For example: ] - I know the formatting behind chembox, so I can figure out what referes to what, but our readers most certainly can't. --] (]) 13:24, 17 December 2014 (UTC)
:Yep, I will go into the sandbox shortly. Each CASNo to get their own datarow; makes a nicer list anyway. (I don't exactly understand what you mean by "worse problems", but could be solved by this already). Any other identifiers you are thinking of? -] (]) 13:39, 17 December 2014 (UTC)
::I've only seen the problem with CAS No's as its more common for compounds to have several of them (hydrates etc) but I certainly haven't been everywhere so it may also effect pubchem, chemspider etc. This might create a new issue though; some people have been using <nowiki><BR></nowiki> to try and sort out the formatting themselves (i.e. ]). --] (]) 14:00, 17 December 2014 (UTC)
:::Seems like a good idea to me, just insert a &lt;br /> before the next ones. For the ones that already are 'fixed', they will probably still be better than the ones without, and that will clear out in time (maybe someone can figure out a search-trick to find them and repair them by AWB?). --] <sup>] ]</sup> 19:12, 17 December 2014 (UTC)
::::1. Aha, hadn't seen that indexes like {{para|CASNo1}}, {{para|CASNo2}} already exist: . {{para|CASNos}} and {{para|CASOther}} is for the unstructured leftovers only.
::::2. Indeed, the &lt;br/> should be (and so will be) added by {{tlf|chembox}}. Internally, Chembox will check & remove any &lt;br/> that was added with the article input. I expect, that would have broken the CAS-link so it won't have happened that often. -] (]) 20:46, 17 December 2014 (UTC)
{{od}}I'll take on the CAS numbers first. Question: currently we can enter 6 ({{para|CASNo}} and indexes 1&ndash;5 as in {{para|CASNo3}}). Today ] uses them all, so I suspect that limit may be too low for some others. I can quite easily change that now. What number of CASNo's should we cover? (=max number of CASNo's in a chembox, with no need to use {{para|CASOther}})? Note: this number should also cover each other possible identifier: SMILES, InChI, etc. In other words, the one max number to cover (say 8) must do for each and every indentifier. If there are 8 CASNo options possible/needed, and 11 SMILES, the number should be 11 for all. (Background reasoning on request). -] (]) 11:27, 18 December 2014 (UTC)
:{{para|CASNo6}} and {{para|CASNo7}} added to the sandbox (that's 8 controlled CASNo's max). Building full support in {chembox} and by the bot. -] (]) 15:20, 18 December 2014 (UTC)
*(''edit conflit'') Good question - the answer it appears is lots. Hydrates seem to be the most common reason for a page needing multiple CAS No's. The highest hydrates I've found on chemical pages are octadecahydrates (] and ]). Assuming that CAS No's exist for each distinct hydrate, we would need a maximum of 18 (say 20 to make it a round number)... I admit that does seem like a lot, is 20 possible? --] (]) 15:31, 18 December 2014 (UTC)
::Possible yes, practicable no. I'll build for indexes <s>0&ndash;9 (that's 10)</s> all right. ''0&ndash;7 (that's 8)''
::In my grander design, all identifiers and properties can have all these indexes (0&ndash;9 then): SMILES, InChI, PubChem, and also MeltingPt, ... . Then, any editor can make them correspond in one article: CASNo7=SMILES7=PubChem7=MeltingPt7 etc. Next step, an extra parameter {{para|use_index|yes}} can be added and voila, every id has its sub-dentifier added ("''R'', ''S'', (dodecahydrate)"). (For images there is another route). So that is why I want this index for all those params, and how to use it.
::Now when we start this before having an chembox module (in Lua), this is nigh impossible for 20 indexes. We'd have to hardcode all 20 params for each (today there are 500 params already). But the Lua module can ''easily'' look for & find an index when it is present in the article (not by hardcoding the number, but by looking for it in the used parameters only). That Lua chembox I'm thinking of is not available yet (don't expect it this year ;-) ).
::So, meanwhile we can start serving 10 indexes in core parameters, the editor can add & check carefully. More can be added in the {{para|CASOther}}, {{para|CASNos}} freetext parameters, uncontrolled. (I note that the two links only have two CAS registry numbers added, so there is no ''pressing'' need right? No editor is actually waiting for this to add 11&ndash;18 ;-) ). I must say that I do know about data structures, but I have no deep knowledge of ''chemical'' data definitions; I'm learning.
::This way, <s>ten</s> should do for now. Questions left? -] (]) 17:05, 18 December 2014 (UTC)
::Make that eight max. Is huge already, and we'd better have the principle in there widespread (less deep). -] (]) 17:45, 18 December 2014 (UTC)
:::No, there's no urgent need for 18 or 20. If it were easy to do then we could future-proof ourselves, but as it is not then 8 should be plenty. Thank you for this. ] (]) 22:03, 18 December 2014 (UTC)


The chemical formulae are not readable in dark mode e.g. https://en.wikipedia.org/Borax?vectornightmode=1&useskin=vector-2022 <span style="background:white; color: black;">🐸</span>&nbsp;] (]) 00:40, 25 November 2024 (UTC)
What I am mainly afraid of here is massive table-creep. 18 CASNo's!? Of most compounds that have more than 5 CASNo's, only 2-3 are really important (e.g., generally: the water-free variety, the water-full variety, and sometimes a stable one inbetween. I know, MgSO4 could have 8 varieties (0-7), and one could possibly force to make all 8 (well, it looks like s.o. did ..) .. but I guess that about 3 of them have hardly any 'real life' meaning). I would really consider to have a not-too-high max built in, and let the rest be covered by the CASOther or CASNos fields. Remember, the page is about MgSO4, not about MgSO4.5 H2O, and in some cases that page may have it's own Misplaced Pages page (some hydrates are so important that they have their own page next to the parent salt-page). --] <sup>] ]</sup> 09:56, 20 December 2014 (UTC)
==ChEMBL links no longer work==
The ChEMBL links in the chembox no longer work. Eg from ] it leads to https://www.ebi.ac.uk/chembl/db/index.php/compound/inspect/ChEMBL501154 which returns a 404 page not found. Wikidata though links are working eg https://www.ebi.ac.uk/chembl/explore/compound/CHEMBL501154 . Can this be fixed please? ] (]) 04:12, 27 November 2024 (UTC)
:Thanks for catching that and providing the fix! I updated the links in both chembox and drugbox. ] (]) 08:04, 27 November 2024 (UTC)


==Discussion at ]==
In a way, see it that the individual fact should pass our notability guidelines as well, ánd it should be verifiable that it really exists (is it a mixture of 6 MgSO4 and 1 MgSO4.7 H2O, or 8 distinct units of MgSO4.1H2O ...). Especially for CAS, it is not in their task to check how reliable the data is that assigns a certain formula to it. --] <sup>] ]</sup> 10:01, 20 December 2014 (UTC)
]&nbsp;You are invited to join the discussion at ]. ] (]) 12:54, 23 December 2024 (UTC)<!-- ] -->
::Sure, but that would be a Feature Article, where everything & their neighbors is clear out. Until that quality level, there might be a period where the inclusion/exclusion of substances is not stable or clear, the expected separate articles do not exist yet, etcetera: the editor might need some extra CAS mentionings. Or, more simple: the {chembox} could be applied into a List of MgSO4-related chemicals (my layman's example begs some belief, but the important word is: "List"). Or a List could be made from a bunch of stub individual articles.
::In general, IMO the quality of edits should not be enforced by such a chosen template-suffocation. (That would be waaaay to difficult to document. The documentation saying: "If you need more than 5 CASNo's, you must create more articles" - ouch). In this situation, I prefer that grey-area substances & CASNo's are added, up for improvement (reasoned removal) later on. A removal could be into a new article too.This also covers the 'notability' check mentioned: needed is indeed, but not by forbidding addition; a notability ''talk'' can follow.
::As for using {{para|CASOther}} for more related CASNo's: better not. Any CASNo worth entering or maybe worth it (the grey area), should be under control (bot). CASOther is for non-controlled data, outside of article topic (like <code>|CASOther=See also <nowiki>]</nowiki> for 1234567-89-0</code>). Or any other prose that does not need control.
::(I note that I propose in the code a change of behaviour: ''all'' entered CASNo's are shown, there is no requirement to fill in {{para|CASNo|}} first. All CASNo's are equal-ly important in this. And another simplification of documentation btw).
::'''In short''', I propose to ''not'' use a low number in the template to 'enforce' a quality somehow someway. Inclusion/exclusion of a CASNo for quality reasons is part of the wiki edit process. {{para|CASNOther}} shold be used for data that does not need a check, only. A wiki List article does not have a number restriction at all (so could have many CASNo's). With this, 5 is too low, ~8 I like. -] (]) 21:22, 21 December 2014 (UTC)
* {{U|Project Osprey}}, see below ]. Took some time, worth it ;-). -] (]) 23:06, 26 January 2015 (UTC)
* {{done}} {{U|Project Osprey}}. Piece of cake really. ] looks good right away, without edit :-) Have a nice edit. -] (]) 16:15, 6 February 2015 (UTC)


== Recent dark mode change has some janky results ==
===Do we need both CASNos and CASOther?===
We have parameters {{para|CASNos}} and {{para|CASOther}} that can have input as free text(unchecked, unstructured). I don't see any benefit having two. I propose to '''merge them''', and deprecate {{para|CASNos}}. (Technically: CASNos is removed from documentation, and categorised for edit . When not used any more in articles, it can be removed from code). ] (]) 20:08, 22 December 2014 (UTC)
:I think it comes from a merging of fields, following a new format. Something archaic. Choose one, deprecate the other, merge their use and hope people forget. For some fields we had an autocategorisation into ']', this could be added to that until that cat becomes empty. --] <sup>] ]</sup> 20:39, 22 December 2014 (UTC)
::Yes, as you describe. I'm already using that (and sibling) maintenance cat to list such to-edit pages. -] (]) 09:17, 23 December 2014 (UTC)
* Deprecated: {{!xt|CASNos|}} &rarr; use {{xt|CASNoOther}}. For all these indexed params.
:-] (]) 18:45, 8 February 2015 (UTC)

== Whitespace in {Chembox}: a standard ==

In article code, whitespace can be very helpful & distracting. Irregularities are distracting & confusing.

For {{tl|Chembox}} I propose to use whitespace one way {{aye}}:
<pre>
{{Chembox
| Name = Amonia
| ImageFile =
| Section1 = {{Chembox Identifiers
| ChemSpiderID = 217
| ChemSpiderID_Ref = {{chemspidercite|correct|chemspider}}
| StdInChI = 1S/H3N/h1H3
| StdInChI_Ref = {{stdinchicite|correct|chemspider}}
}}
}}
</pre>
;That is
:Use single space after parameter pipe, before/after =symbol when value present
:But: inner section-closing <code> }}</code> on newline and with ''double'' space (to align with the opening Sectionparameter).
:Also: ''No'' space at end of line. No empty whitelines in between.
This does not have any effect on presented result.

This is to prevent iregualrities like {{nay}}:
<pre>
{{Chembox| Name =Amonia
|ImageFile1=
| Section1= {{Chembox Identifiers
| ChemSpiderID = 217
| ChemSpiderID_Ref = {{chemspidercite|correct|chemspider}}
| StdInChI = 1S/H3N/h1H3

| StdInChI_Ref = {{stdinchicite|correct|chemspider}}
}} }}
</pre>
Any comments? -] (]) 11:50, 22 December 2014 (UTC)

{{od}}
The space after the pipe is unnecessary, and it is more usual to see equals signs aligned:

<pre>
{{Chembox
|Name = Amonia
|ImageFile =
|Section1 = {{Chembox Identifiers
|ChemSpiderID = 217
|ChemSpiderID_Ref = {{chemspidercite|correct|chemspider}}
|StdInChI = 1S/H3N/h1H3
|StdInChI_Ref = {{stdinchicite|correct|chemspider}}
}}
}}
</pre>

which aids readability. However, editors may use any form; it's not clear what you're proposing, It would be impractical to impose one style on all editors, and it would not be acceptable to make mass edits solely to change the use of whitespace. <span class="vcard"><span class="fn">]</span> (<span class="nickname">Pigsonthewing</span>); ]; ]</span> 10:30, 23 December 2014 (UTC)
::All spaces are unnecessaryu; I'd like to have the indented inner "}}" to show the sttructure, aligninh the "=" looks good for the editor but is a hell to maintain (esp in AWB). I did not write about imposing or mass-edit, but about voluntary keeping the same standard. -] (]) 11:06, 3 January 2015 (UTC)
I think this is going to be very dependent on the editor. Personally I like a variation of option II above:
<pre>
{{Chembox| Name =Amonia
| ImageFile1=
| Section1= {{Chembox Identifiers
| ChemSpiderID = 217
| ChemSpiderID_Ref = {{chemspidercite|correct|chemspider}}
| StdInChI = 1S/H3N/h1H3
| StdInChI_Ref = {{stdinchicite|correct|chemspider}}
}}
}}
</pre>
Main template parameters with one space, the in-section parameters with 2 spaces (but this may be my programming-instinct at work). In the end it does not really matter, except for being able to see what is in where. I think this is why I made CheMoBot putting two spaces before the _Ref parameters and 1 space before the 'verified'-parameters in the body of the template. I don't have any preference in any form. --] <sup>] ]</sup> 11:21, 23 December 2014 (UTC)
:I know the programmers habit to indent. But here it ends up in a chaos, also because other indent-rules are applied (like indent the nested {{ }} section). -] (]) 11:06, 3 January 2015 (UTC)

== New: Odor threshold value ==

I think that odor threshold value is a very important piece of information (see ]). Various sources are available:
* http://www.timestream.com/vgh/downloads/NO2articles/Ruth%201986.pdf
* http://www.ncbi.nlm.nih.gov/pubmed/8472679
* https://books.google.ca/books?isbn=093262734X
* chemical-specific publications in various journals
What do you think? ] (]) 00:50, 3 January 2015 (UTC)
:Dunno, but what would a data row look like? (label text & link, expected/fixed unit)?
::<small>''']'''&nbsp;{{!}}&nbsp;7&times;10<sup>2</sup> ppm</small>
:-] (]) 11:02, 3 January 2015 (UTC)

== Chemical infoboxes ==
{{resolved}}<br/>
Many articles with chemical infoboxes such as ] look really bad, with the infobox taking up 50% or more of the screen width (in this case, more than 100% of the screen width, and the thing doesn't scroll either, so overflow over the edge of the browser window is not readable) Is there some way to make all infoboxes scroll automatically when the exceed the display area of an article? (ie. before they start impinging on the sidebar that says "Main Page", "Contents", etc) (Better, if they start scrolling when they take up 50% of the content area width) -- ] (]) 01:35, 8 January 2015 (UTC)
:] ] The Teixobactin infobox is formatted correctly and of modest width as viewed on my setup; however it is as described above when the "InChI" section is expanded. Is this a recent change? Forcing the value to wrap would solve this. <span class="vcard"><span class="fn">]</span> (<span class="nickname">Pigsonthewing</span>); ]; ]</span> 10:55, 8 January 2015 (UTC)
::InChI text wraps for me (viewing in IE). ] (]) 11:44, 8 January 2015 (UTC)
:::No recent changes. As Andy describes, with me it is too wide when show (which is not the default/initial page status). (Firefox). AFAIK, long ago it was made this way keep the string 'findable', it is an identifier. -] (]) 11:55, 8 January 2015 (UTC)
:::... but in mobile view, it opens bad (show not hidden). -] (]) 11:57, 8 January 2015 (UTC)
:::Working on this. I'm optimistic. -] (]) 12:28, 8 January 2015 (UTC)
:::: {{fixed}} (I think) by cropping the ] figure with ] to remove surrounding white space . ] (]) 14:42, 8 January 2015 (UTC)
:::::{{U|Boghog}} Not fixed I think. The problem is that the very long InChI string (525 characters) is not wrapped. (this was done to keep this searchable web-wise, it is an identification). You can check this by unfolding the InChI data row, or by checking the "mobile view" (a link on the very very bottom of the article). With me, it was still tooooo wide.
:::::I am changing that in {{tl|chembox}}, but it needs testing before spreading it into 10,000 articles.
:::::Meanwhile, I have ''added spaces'' in the long InChI string. That allows wrapping in this article. There is a lot of edit activity, so a nice page will help. After my solution change, I'll have another lookj here. (btw, your image edit looks like an improvement in itself, it caught my eye before). -] (]) 15:19, 8 January 2015 (UTC)
::::::The problem is that there is no way to force-wrap a long string. It will only wrap at certain characters, but there is no way to say that it should wrap randomly at a certain max-width in the boxes. That is why it was hidden, but on systems without javascript it defaults to unhidden. Manually breaking the string is a solution, but I am afraid whether search engines would be able to find the full string if it is broken, and InChI is a string that one would Google for (some online databases have that hardcoded on their identifiers to enable finding other sources/databases). It is a recurring theme, where we either have to find a solution, or implement the one that has the least collateral damage (either a few viewers get a very broken page, or some viewers can't find the page). --] <sup>] ]</sup> 16:17, 8 January 2015 (UTC)
::::::: I wouldn't say that the addition of spaces will be too much of a problem as regards to searching for the InChI in Google - its known that Google doesn't handle long InChIs - this was the specific reason for the introduction of the InChIKey. A much bigger issue is that the spaces actually corrupt the InChI - if anyone wants to use the InChI - to generate a structure - search a database or any other task that the InChI is useful for you have to fix it, in such long strings it may not be easy to see that there are spaces causing the issue. --] (]) 16:44, 8 January 2015 (UTC)
::::::::Still, if the InChI is broken on-wiki, even searching a sub-part of the InChI may not show up, and what determines what InChI is long - a 15-character InChI gives a 21-character-string (including the 'InChI='), which may for some pages already define as 'long'. Also using the InChI as an entrance into a search might end up in problems (external sites may not understand a 'broken' InChI. I am thinking, is it an idea to write a module that force-wraps long strings by just breaking them every #-characters without addition of hyphens? --] <sup>] ]</sup> 07:37, 12 January 2015 (UTC)
:::::::::Can't we do that with CSS, rather than code? That would leave the underlying text unchanged. <span class="vcard"><span class="fn">]</span> (<span class="nickname">Pigsonthewing</span>); ]; ]</span> 10:26, 12 January 2015 (UTC)
::::::::::I am working on this and yes in css. And I am optimistic. Within a few days I'll put up a proposal on this page, to invite scrutiny. Note that, with other improvements in {{tlf|chembox}}, this involves 30+ templates in the {chembox} suite (30+ are in /sandbox development now, all related).
::::::::::Halfway-results are in the /testcases pages for those interested, but in my proposal I'll ask for specific checks (like: check browsers, check mobile/desktop). In other words, you can help by checking my proposals, in a few days. -] (]) 10:48, 12 January 2015 (UTC)
:::::::::::I think we have tried things before like that, the problem is that some InChIs do not 'break' according to grammatical rules. We have been unable to set tablewidth (with Java(script) turned off) for Wiki-tables - on computers which have that turned off, it simply does not 'break' and shows the string in one continuous line (and the 'hide'/'show' function does not work, so it is standard shown), widening the table to page-width (or even wider and giving a horizontal scroll-bar). But lets see, it has been some time since this was last tried to be resolved. --] <sup>] ]</sup> 11:01, 12 January 2015 (UTC)
:::::::::::By the way, with code I did mean LUA-module to enforce a max length/width. --] <sup>] ]</sup> 11:02, 12 January 2015 (UTC)
* {{Done}}. The long InChI now line-break within the chembox, without a need for extra code (no spaces etc needed). Especially mobile view shows good now. Meanwhile, hot article ] has moved to a {{tl|drugbox}}. -] (]) 16:18, 6 February 2015 (UTC)

== Missing links ==
* What should '''Atmospheric OH rate constant''' link to, or what does it mean? Used in ] ( = 1.95E-12 cm<sup>3</sup>/molecule·s). -] (]) 07:37, 9 January 2015 (UTC)
* A link for '''EU Index'''? Is not ] (EU Classification) -] (]) 09:26, 9 January 2015 (UTC)
* '''3DMet'''? ] has http://www.3dmet.dna.affrc.go.jp/html/B00115.html broken link. More. Remove? -] (]) 09:30, 9 January 2015 (UTC)

== New: Identifier linking to MetaboLights database ==
The MetaboLights database (http://www.ebi.ac.uk/metabolights/) was created by the ] (EBI) with the aim of filling a gap in bioinformatics resources for storing and searching data from metabolomics studies. It is already the fastest-growing database at the EBI and is the recommended resource for deposition of metabolomics data by several leading journals including and . The addition of a new Chembox link to the MetaboLights database would be of considerable value, providing not only structural information but also details of metabolomic studies where the compound has been reported including the study species, the metabolic pathway(s) involved in the production of the compound, reference spectra (NMR, MS) and literature references. See, for example (3-methyl-2-oxobutanoic acid).] (]) 16:25, 14 January 2015 (UTC)
:I have no judgement on whether it should be in. But for the case of adding it, can you describe or propose:
:*label text & links (in lefthand side in the infobox)
:*{{para|parametername?}} and data value to be added (by article editor)
:*Structure in resulting data value = article page result (visible text+link expected)
:*Any other notes expected? (reference, unformatted freetext, ...)
:*Preferred position in the Chembox: under which header, above/below which other data.
:-] (]) 01:26, 15 January 2015 (UTC)
:] is in article ] (you know what: I copied the InChI from that website, pasted and let the wikiSearch do the job. Bingo). -] (]) 01:33, 15 January 2015 (UTC)
:Bleulink ] or ] expected. -] (]) 02:36, 15 January 2015 (UTC)
::Just a note, if this parameter is to be added, please put it in the ChemBox as with all identifiers, the whole set of them, with possibility for bot verification, comments etc. We should however first see it's notability (articles should be created and stick). --] <sup>] ]</sup> 03:16, 15 January 2015 (UTC)
::::Agree. Didn't see yet what new data that database adds (next to combining existing data). The link in Chembox be a (automated) &lt;ref>erence? I hope the future article brings clarity. -] (]) 09:57, 15 January 2015 (UTC)
::::::As mentioned above, MetaboLights is the first open access, general-purpose open-access repository for metabolomic studies that acts both as an archive for metabolomics studies and a reference database for annotated metabolites. Metabolic profiling is an important tool for an insight into a biological functioning and perturbations induced due to various endogenous and exogenous factors. Linking a Misplaced Pages chemical or drug article to the corresponding MetaboLights entry would provide details about the occurrence of the compound at species level, the basic unit of classification, the '''Reference Spectra''' and associated '''metadata''', biological roles, cellular locations, concentrations, and raw data from the metabolic experiments. See another entry, for example , ], gives information about the different species in which the compound could be found, metabolic pathways in the respective organisms, spectral details including NMR and Mass and additional literature references. Additionally, the associated metabolic studies would also allow users to compare and analyse metabolomics data for different species on different platforms and techniques along with details about other metabolites that could be found under similar conditions.] (]) 14:30, 15 January 2015 (UTC)
:::::::Yes. Why not create ]? And what kind of link should it be, from {chembox}? Why is this not a &lt;ref> kind of link? ] confirmed? -] (]) 14:54, 15 January 2015 (UTC)
::::::::You would envisage that an identifier for MetaboLights (e.g MTBLC16765) in Chembox/Drugbox would directly link to the corresponding entry in the MetaboLights database analogous to the existing identifiers such as KEGG and ChEBI giving the additional details. Although the name "MetaboLights" itself might initially seem to apply to a restricted (metabolomics) community, the inclusion of spectroscopic reference data and experimental procedures in "MetaboLights" could be considered useful for a much broader user community including the organic and biochemical chemists.] (]) 15:40, 15 January 2015 (UTC)
:I'd be inclined to start by setting it up as a parameter in ], and to adding values to appropriate items there. <span class="vcard"><span class="fn">]</span> (<span class="nickname">Pigsonthewing</span>); ]; ]</span> 17:56, 15 January 2015 (UTC)
::Andy, fuck off of talks and works I am doing. First you have to apologise or retract your other threads you disrupted & PA'ed. After that you maybe could contribute. Only then. -] (]) 00:04, 8 February 2015 (UTC)
:::::::::re ChEBI Namrata: Big chance that KEGG will be removed some time per ] and ]. Skipping twice the request to at least ''create a wiki article'' about that database, does not support its suggested importance. -] (]) 18:00, 15 January 2015 (UTC)

== Creating section 'Other names' in {Chembox} ==
{{Done}} -] (]) 16:21, 6 February 2015 (UTC)<br/>
<pre style="float:right">
|OtherNames =
|IUPACName =
|PIN =
|SystematicName =
</pre>

{{Chembox/sandbox
| Name = ], ]
| ImageFileL1 = Carbon-monoxide-3D-balls.png
| ImageNameL1 = Ball-and-stick model of carbon monoxide
| ImageSizeL1 = 80px
| ImageFileR1 = Carbon-monoxide-3D-vdW.png
| ImageNameR1 = Spacefill model of carbon monoxide
| ImageSizeR1 = 80px
| IUPACName = 1,1,1-Trichloro-2,2-bis(4-chlorophenyl)ethane<!-- DDT -->
| OtherNames = 2-Ketoglutaric acid<br>alpha-Ketoglutaric acid<br>2-Oxoglutaric acid<br>Oxoglutaric acid
| PIN = 3-propanoic acid
| SystematicName = 3-propanoic acid
|Section1={{Chembox Identifiers/sandbox
| CASNo = 123-45-6
}}
}}
I propose to '''change the presentation of the other names''' in {{tl|Chembox}}. They can have their own section (-header). To the right is a demo version, with more in the testcases.

;Changes
* An infobox Section header is added '''Other names'''. It shows right below the images, where the names are already.
* All '''line width is limited''' for all names to ~infobox width (max row width is 22 em). This affects long names. No more expanding into the lefthand screen side. Of course, this is a very important change (current situation could be called page destroying).
* The '''order''' is changed into OtherNames, IUPACName, PIN, SystematicName. This prevents repeating names like 'Other' in subheaders, see next point.
* Subdivision: the existing four data entries have their own sub-section. With the new order, there is no need to repeat section name "Other names" or "IUPAC name". The more below, the more specific a name is. IMO this is a clear structure, and makes a natural reading flow. Also when some data & headings are not present (see the variants in testpage4).
* The subheader "IUPAC names" (-s) is pluralised when multiple names are detected. The editor can also enforce this by using {{para|IUPACNames}} (-s).
* See below for the "hide/show" option. "show" is default.
* Names are left-aligned.

;Not changed
* The four name entries are not changed. Data now present in the articles is shown unedited.
* The names are right below the images.
* No data, no header. In variants.
* The {{para|name}} (infobox title, usually the article name) is not affected by this.
* Note: the {{legend-inline|#a1ffc3|green}} color is used here to show it's a sandbox. It will be the soft yellow color when going live: {{legend-inline|#F8EABA}}.

;Effects
* The names, which can take up a number of lines, now are grouped under one infobox header. No suggestion as if they relate to a picture above.
* Whitespace has disappeared, esp vertically. Sometimes a 20&ndash;25% height reduction in the names block shows.
* Only one show/hide button in the names, not <s>two</s> ''four''.
* All changes are checked in mobile view too. At least, this should not worsen (it doesn't).

;Useful links:
Testcases have the sandbox/live Chembox versions side by side (with same input). Some other changes like formatting are being developed too.
: ] -- Testing other names and identifiers, also long names
: ] -- General testcases
: ] -- All parameters used.

===Comments?===
Any Remarks? The focus is on the new structure and setup. The ] issue is minor (& comment separately below, pls). The ''mobile view'' is available via the very last link on every wikipage. You might notice other changes in {{tlf|Chembox}}, they will be opened in an other section soon. If you want to add cases to the testpages, you can ask me (or: in your pet article, preview simply with <code>{{chembox/sandbox ...</code>). -] (]) 02:22, 16 January 2015 (UTC)

===The hide/show button===
The Other names section has a button "hide/show" to collapse/uncollapse the IUPAC names (three IUPAC data entries). The top row 'Otehr names' does not collapse ever. Default setting is "uncollapsed" (show all). Collapsing can be set in a {{tlf|Chembox}} by {{para|IUPACNames_hidden|yes}} (or <code>=collapse, =hide, =hidden</code>). Existing parameters {{para|IUPACName_hidden}} and {{para|PIN_hidden}} will have the same effect. They are kept for compatibility.

;Why hide?
Per ], information should ''not'' be hidden (do not require extra user action, like a mouseclick). So the default setting should be "show". Also, in ''mobile view'', the show/hide option does not appear and all will be shown always. In short, an article should show good in uncollapsed form.

{{tlf|Chembox}} has added these options because many names are technicxally and very long. That is, they should be on the page for e.g. search engines, but the reader would not need to see them. This is the (old) reason to hide them. However, since the wiki is approached by mobile device &mdash;which does not "hide" at all&mdash; that argument is moot. A modern rule would be: if it must not be shown, don't add it to the infobox! -] (]) 02:22, 16 January 2015 (UTC)

===Other issues===
* {{Done}}. Implemented. Long names do not break the page (they line-break within the infobox). -] (]) 16:21, 6 February 2015 (UTC)

== REL, short-term exposure, and international limits ==

Hi! I'm here with a suggestion for a couple small additions to the chembox. We already include the ] from OSHA, but NIOSH publishes the ], which is often different from the PEL, as well as short-term exposure limits, which also typically differ from the PEL. Another parameter would be the IDLH, the concentration where the substance becomes "immediately dangerous to life and health". I think it'd be helpful to have these as extra parameters in the box. Also, per discussion on ], I'm working on getting international standards so we can include those in order to be less US-centric. NIOSH has collaborating agencies all over the place, so they shouldn't be too hard to include. Are there already parameters for any of these? (I'm still learning the ins and outs of the chembox, doesn't help that I'm bad with templates.) Please let me know what you think, and thank you! Best, ] (]) 06:15, 24 January 2015 (UTC)
:Just linking: the WT:CHEMICAL discussion is ]. NIOSH is ] ("is the U.S. federal agency responsible for ..."). And to give comfort: Emily, the {{tl|Chembox}} is complicated for every one. There are ~500 parameters ;-). A question: is there any overlap with the topic of {{tl|Infobox drug}} aka {{tlf|drugbox}}? In the background, we have in mind that these two infoboxes could merge in the future. -] (]) 16:52, 25 January 2015 (UTC)
:I can not advise on whether we should add them (I'll read & follow this thread). I'll start a subthread to explore the what-if options (what-if we add them). I note that, since we already have US-relaterd PEL, another US-related data can be acceptable. Some country-raleted data (esp in {{tlf|drugbox}}) mention the country in the datarow ('CA'). -] (]) 17:30, 25 January 2015 (UTC)
::{{ping|DePiep}} Thanks so much for this mockup! More below. :) ] (]) 19:04, 25 January 2015 (UTC)
:::Please spend time (your're payed I read :-) ) -- please spend time on the {{tl|drugbox}} for this. Ask me if you don't see why that's important. -] (]) 19:21, 25 January 2015 (UTC)
::::I'm not sure what exactly you're getting at - though I will be looking at adding safety data via the drugbox. If there's something else I'm missing (only one cup of coffee today - clearly I need more) please let me know! ] (]) 19:58, 25 January 2015 (UTC)

::::{{tl|Chembox}} and {{tl|Drugbox}} are 'the same', but just have different accents from wiki history reasons. In the far future, they will be merged (same parameters, same meaning, just accents in prescriptions and so). So I suggest you take a look at how REL and IDLH would apply in sister {{tlx|drugbox}} (the same parameter treatment, full?). -] (]) 20:02, 25 January 2015 (UTC)
:::::Ooh, didn't realize they were going to be merged. REL and IDLH would apply the same, as far as I can see. ] (]) 20:06, 25 January 2015 (UTC)

::::::There is no Law that they will be merged, we just keep it in the back of our minds ("let's not make it more difficult to merge"). 'Algorithm' is just 'logic', what you do in your mind (and what others like me want to hear&learn from you). -] (]) 20:13, 25 January 2015 (UTC)
:::::::{{ping|DePiep}} Hi, so I've been super busy the past few days and I'm just now getting back to this, sorry. Can we open a discussion to get consensus for adding these two values to the infobox? I'm happy to start an RfC or whatever. Best, ] (]) 05:17, 30 January 2015 (UTC) <small>(moved this post to this section, is about adding yes/no. -] (]) 08:33, 30 January 2015 (UTC))</small>
:{{od}} This thread is a correct proposal in itself. No RfC needed (that's for heavier policies & conflicts IMO). People can discuss & comment here. It's just that {{tl|Chembox}} and {{tl|infobox drug}} do not gain much talk traffic. If no one opposes, that's an outcome too. A few more days before concluding seems fine. (My personal opinion follows below). Oh, and stop saying 'sorry' for doing nothing wrong. Will make feel better &mdash; both of us. -] (]) 08:42, 30 January 2015 (UTC)
* IMO: I have looked deeper into REL and PEL, and the agency NIOSH. Although US-only, and non-legal (as PEL is), the data is well-founded enough to add. In other substances (like medicine) we already have country-specific data (esp. {{tlf|drugbox}}:"AU, CA, UK, US"). Our REL article is much older that this proposal (another canceling out of ''possible'' COI pushing). Given that we have ~150 data rows already in {{tl|chembox}}, often with multiple data facts, REL can have the benefit side of any grey area too. Todo: exact wording is to be fleshed out (see ], below), and {{tl|infobox drug}} aka {{tlf|drugbox}} should strongly consider following. -] (]) 08:54, 30 January 2015 (UTC)
:::{{ping|DePiep}} I'm okay with the wording of "PEL + foo ppm" for the REL, the reason I want to include it at all is because sometimes there hasn't been a legal limit enacted for a substance by OSHA (the legal agency) when there is still a recommendation from NIOSH (the research agency). And I haven't had anything to do with the REL/IDLH/PEL articles, though I do plan on eventually working on them to make them more accessible & complete. ] (]) 18:13, 30 January 2015 (UTC)
===Would look like===
Without prejudging whether the data will be added to {{tl|chembox}} (''discuss above''), we can explore what it should look like. First suggestions:
:<small>''(This demo is developing, see talks below)''</small>
:{{para|REL}}
:{{para|IDLH|2000 ppm}} (])
:{{para|PEL}} is existing (demo from ]).
:{| class="wikitable"
|-
! colspan=2 style="background:#F8EABA" | Hazards
|-
| style="width:12em" | ] <small>(US)</small>
| 50 ppm (25 ppm ACGIH- TLV; 35 ppm STEL)
|-
| ] <small>(US)</small>
| (demo text?)
|-
| ] <small>(US)</small>
| 2000 ppm
|}
:Questions: where would IDLH wikilink to? A few demo substances with real data available? -] (]) 17:30, 25 January 2015 (UTC)
::We have an article on the ] so that would be an appropriate wikilink. Most every substance that has a PEL in the NIOSH Pocket Guide has an IDLH value. For example, the IDLH value of ] is 2000 ppm. Hope that helps! ] (]) 19:04, 25 January 2015 (UTC)
:::{{aye}} In demo now. More demo data please. -] (]) 19:18, 25 January 2015 (UTC)
::::{{ping|DePiep}} Yay, more data! So in this case the REL is the same as the PEL - TWA 400 ppm (1400 mg/m<sup>3</sup>). Do you want more compounds with a REL/PEL/IDLH? ] (]) 19:22, 25 January 2015 (UTC)
:::::"REL=PEL" I do not understand, and the template won't either unless you specify how and when that notion should be made (made visible in the article). In other words: how shold the template show "REL=PEL" depending on the editors input (in the article page)? And more more simple demo's to get the data feel. -] (]) 19:30, 25 January 2015 (UTC)
::::::{{ping|DePiep}} So when the REL = PEL, I think it's totally sufficient to just put the values in separately. Here's some data for you, from just some random ones I've done so far. ] (]) 19:38, 25 January 2015 (UTC)

''']'''
{| class="wikitable"
|-
! colspan=2 style="background:#F8EABA" | Hazards
|-
| style="width:12em" | ] <small>(US)</small>
| TWA 2 ppm (5 mg/m<sup>3</sup>)
|-
| ] <small>(US)</small>
| TWA 2 ppm (5 mg/m<sup>3</sup>) ST 4 ppm (10 mg/m<sup>3</sup>)
|-
| ] <small>(US)</small>
| 20 ppm
|}

''']'''

{| class="wikitable"
|-
! colspan=2 style="background:#F8EABA" | Hazards
|-
| style="width:12em" | ] <small>(US)</small>
| TWA 10 ppm (25 mg/m<sup>3</sup>)
|-
| ] <small>(US)</small>
| TWA 10 ppm (25 mg/m<sup>3</sup>) ST 15 ppm (37 mg/m<sup>3</sup>)
|-
| ] <small>(US)</small>
| 50 ppm
|}

''']'''

{| class="wikitable"
|-
! colspan=2 style="background:#F8EABA" | Hazards
|-
| style="width:12em" | ] <small>(US)</small>
| TWA 400 ppm (1400 mg/m<sup>3</sup>)
|-
| ] <small>(US)</small>
| TWA 400 ppm (1400 mg/m<sup>3</sup>)
|-
| ] <small>(US)</small>
| 2000 ppm
|}
* About last demo (]): bad. When REL and PEL are the same --not by coincidence--, they should not be repeated. Please describe an algorithm (reasoning) on when/how to say: "PEL=REL", when relevant.
:Note: the prior discussion is more important (include or not?). -] (]) 19:45, 25 January 2015 (UTC)
:::I'm not sure if there is an algorithm, perhaps there could be a parameter that says PEL/REL and use that when it's the same? This is all just data from the NIOSH Pocket Guide which doesn't give reasoning on why OSHA adopts the PELs they do. I'll ask around at NIOSH and see what people say. ] (]) 19:56, 25 January 2015 (UTC)
::::"TWA" and "ST" must be clarified, by either a link or an abbr tooltip: {{abbr|TWA|twa is ...}}. I'm still looking for the overlap (explaining the data repetition). -] (]) 17:41, 26 January 2015 (UTC)
:::::TWA is the time weighted average of the exposure and ST is just short term exposure (<15 minutes, usually). The difference between a REL and a PEL is that the PEL is a guideline put in place from OSHA that must be followed, and the REL is just NIOSH's recommendation, which is usually more stringent than the OSHA PEL. ] (]) 19:21, 26 January 2015 (UTC)
::::::No need to explain it ''here'', it should be explained ''in the infobox''. -] (]) 22:21, 26 January 2015 (UTC)
::::::* I think that any acronyms should be wikilinked to something (e.g. TWA, ST, ppm etc) as their meanings are not obvious. ] (]) 10:00, 30 January 2015 (UTC)
:::::::Agree. Or at least give them that abbr-link: {{abbr|TWA|Trans World Airlines}}. (Can do that in code for REL and PEL). -] (]) 11:39, 30 January 2015 (UTC)
::::::::I don't like the repetition of PEL data at all. Could it be: REL: "PEL, and 15 ppm foo"? -] (]) 12:42, 30 January 2015 (UTC)
:::::::::Does the value for REL always match that of PEL? If they are always the same then we don't need two boxes (REL could be moved inside of the PEL row - REL is a recomended limit but PEL is a legal limit, so I think PEL should 'win' if we were only keeping one). --] (]) 13:18, 30 January 2015 (UTC)
:{{od}} {{ping|Project Osprey}} {{ping|DePiep}} So, the REL does not always match the PEL, when they do I think just having the PEL is fine. The reason I want to have both as parameters is for when there is no PEL but there is a REL. With the abbreviations, I'm happy to change 'TWA' and 'ST' to "TIme Weighted Average" and "Short Term" but if the {{tl|abbr}} works that seems less clunky. I'm flexible. :) ] (]) 18:13, 30 January 2015 (UTC)

==== (REL/IDHL arbitrary break) ====
* '''LH side''' text proposals "demo10":
:{| class="wikitable"
|-
|+ colspan=2 style="" | ] (demo10)
|-
! colspan=2 style="background:#F8EABA" | Hazards
|-
| style="width:20em" |
] health limits (US):<sup></sup>
<br/>]
<br/>]
<br/>]
|
<br/>{{abbr|TWA|Time-weighted average}} 400 ppm (1400 mg/m<sup>3</sup>)
<br/>PEL, and ] 15 ppm (37 mg/m<sup>3</sup>)
<br/>2000 ppm
|}
:{{ping|DePiep}} Hi! I like this a lot! I've tweaked a couple of things (using {{tl|abbr}} and linking ]), does it still look ok to you? ] (]) 20:38, 31 January 2015 (UTC)
::Working on {{tl|chembox}}, but not exactly PEL & REL. Plan to. Notes:
:note. When the editor enters "TWA" (plain text, uppercase), the template will add the abbr. Same for ST. Don't worry
:Question: Is there a ''general'' source link for REL? (i.e., valid always). OR: CAn we contruct automatically a source link for example "Ethyl acetate" by creating:
<code><nowiki></nowiki></code> ? Ask me if this is unclear.

:Note: Expect the next input options:
<s><pre>
|PEL=
|PEL_ref=
|REL=
|REL_ref=
|IDLH=
|IDLH_ref=
</pre></s>
:-] (]) 20:47, 31 January 2015 (UTC)

:So unfortunately there isn't a general source link beyond <nowiki></nowiki> where XXXX is the 4-number identifier. I can't find a full listing of the data, just the alphabetical listing of chemicals with a link to the full data page. (that's ). I'm okay with putting the {{tl|PGCH}} in each one. Thanks! ] (]) 21:00, 31 January 2015 (UTC)
::1. The PGCH (pocket, pdf) is general and so could be (should be?) when there is PEl/REL/ILDH input. But that's ''generic'', and could be on the LH side automatically. (If you add it to the REL input of Ethyl acetate, that is ''not'' good referencing).
::2. Is the XXXX another internal id-number niosh uses? If that is the only way, we sigh and use that. But using a CAS Reg Number for the external link would be ''much'' better.
::3. If the niosh XXX (4-digit) nume is the key, we'll add input parameter to enter like {{para|REL_ref_id|XXX}}. What do you think? -] (]) 00:04, 1 February 2015 (UTC)
::::The PGCH PDF should be the PEL/REL/ILDH general ref. As for specific refs, the 4-digit number is an internal indexing number for the PGCH, NIOSH does put CAS numbers in each entry but it's not linkable if that makes sense? is the list of all chemicals included in the PGCH by CAS number, if that's helpful. There's no way to get from CAS number to PGCH entry besides that list, as far as I can tell. I will admit that the UI of the NIOSH site is not as friendly and easy to navigate as it could be and I may be missing something. ] (]) 00:19, 1 February 2015 (UTC)
::::P.S. - Thank you so very much for your help with all of this. I'm so grateful. :) ] (]) 00:20, 1 February 2015 (UTC)
:::::Useful answer (and we'll save the flowers until it is working ;-) ).
:{{od}}
:Priority issues (we need to ''define the input data'' first & asap, so you can enter it in the articles):<br/>
:1. So there is no useful search option with known id's (like CAS number).
:2. Q: Shall we use like {{para|NIOSH_id|0260}} (for editors to input)? Then the link will go directly to . If {{para|NIOSH_id|}} is empty, the reference will link to the Pocket general page (search box) .<br/>
:Less important issues.
:3. See demo10, improved (don't worry about the line-breaking).
:4. Q: Which name should we ''show'': NIOSH, OSHA, CDC? (The most commonly known, most clear with this)?
:5. Q: Is the ''sequence'' right? PEL-REL-IDLH?
:6. {{tlf|chembox}} will replace <code>TWA</code>, <code>ST</code> with the appropriate text (linked, abbreviated, etc.).
:7. For your help: these are pages have a PEL today: ] (326 P). -] (]) 10:00, 1 February 2015 (UTC)
::Early test at ]. -] (]) 11:22, 1 February 2015 (UTC)
* {{ping|Emily Temple-Wood (NIOSH)}} I am closing the discussion for Version One of REL and IDLH data. See below. -] (]) 12:03, 1 February 2015 (UTC)
::{{Ping|DePiep}} Just to answer your questions - having the NIOSH_id parameter is super useful and not terribly onerous to input. NIOSH should be the name on the REL and IDLH since they're who sets it, not OSHA. The sequence is correct. Thanks so much! ] (]) 17:07, 2 February 2015 (UTC)
:::OK. Warn me if you see big errors (fancy things are for March). Could go live shortly. -] (]) 17:10, 2 February 2015 (UTC)
::::Will do, thanks! ] (]) 17:16, 2 February 2015 (UTC)
::::::Oh and when entering PEL, REL data, do just type "TWA"; later the template will turn that into the link as talked here. Same for ST. -] (]) 20:48, 2 February 2015 (UTC)
:::::::Can do. Is it live now? ] (]) 00:01, 3 February 2015 (UTC)
* {{ping|Emily Temple-Wood (NIOSH)}} Please check the tests at ]. You can add and change demos there!
:Input in the <code>{{Chembox Hazards ...</code> section:
<pre>
|PEL =
|REL =
|IDLH =
|NIOSH_id = <!-- 4-digit e.g. 0260 -->
|NIOSH_ref = <!-- any reference; use &lt;ref>...&lt;/ref> tags -->
</pre>
:If there are no major issues, it will go live in a few days. -] (]) 11:04, 5 February 2015 (UTC)
::{{Ping|DePiep}} Hi, I tried using it but I think there's something weird with it. Could you please take a look? ] (]) 01:57, 6 February 2015 (UTC)
:::Your edit fell in a crack: yesterday I removed all testing code (also the "use /sandboxes" settings), so that today code can go live. In this interval, {{tlf|Chembox}} /sandboxes do not work as expected (are no use for testing). That is what you saw! I just did an individual extra test on this demo you made, and it looks OK -- input shows as expected. (side topic: I fixed a temperature calculation ). And now: showtime. -] (]) 07:21, 6 February 2015 (UTC)
* {{Done}}. Please start ''all issues'' in the new section below. -] (]) 16:23, 6 February 2015 (UTC)

===Closing for first version===
I am closing discussion part one, to '''implement''' the first version of REL and IDLH data.
:'''Input parameters'''. All are optional.
<pre>
|PEL=<!-- existing -->
|REL=
|IDLH=
|NIOSH_id=<!-- 4-digit, like '0260' for ethyl acetate-->
|NIOSH_ref=<!-- any &lt;ref>...&lt;/ref> -->
</pre>
These input parameters are guaranteed to be handled and shown OK. When entering data here, the article could require a References section. An early testcase demo is ].

Please do report any ''bugs and errors''. Do ''not'' rise formatting or showing issues: they will be discussed later (few weeks?). Meanwhile, everyone can add data!

I am closing this because we must update the big {{tl|chembox}}, because at the moment ''mobile views can be broken''. We must solve that asap. -] (]) 12:03, 1 February 2015 (UTC)

==New issues, after version 1==
* Implemented 16:24, 6 February 2015 (UTC). The PEL/REL/IDLH presentation has room for improvement. But data can be added. -] (]) 16:24, 6 February 2015 (UTC)
* Just discovered: ] uses template {{tl|PGCH}} (the Pocket Guide):
<pre>
| PEL = none&lt;ref name=PGCH>{{PGCH|0272}}&lt;/ref>
</pre>
which produces the reference: {{PGCH|0272}}.

So the NIOSH id (4-digit) is already in use on 350 pages: ]. For now, I have no idea on how to use this. -] (]) 14:53, 7 February 2015 (UTC)

== Proposal to add indexed identifiers (eg: {{!}}CASNo7=) ==
:''{{red|'''Note'''}}: proposed index numbers -6 and -7 will '''not''' be implemented (eg {{para|<s>CASNo6</s>}} and {{para|<s>CASNo7</s>}}). This is to limit template size and complexity. Text below shold be read accordingly'' <small>-] (]) 11:11, 3 February 2015 (UTC)</small>
:''Note: later, {{para|ChEBI}} was added to this list of indexed parameters.''-] (]) 02:10, 1 February 2015 (UTC)

I propose to add '''indexed identifiers''' to {{tl|Chembox}}.
In short: {{tl|Chembox}} takes indexes 1&ndash;7 for {{para|CASNo''X''}}, plus zero {{para|CASNo}}. The same for <s>six</s> ''seven'' other identifiers like SMILES.
:Already indexes "0"&ndash;1&ndash;4 are used. This change will add more, and add bot-checking. Regular naming pattern. -] (]) 23:09, 26 January 2015 (UTC)

;Useful links:
* {{tl|Chembox/testcases}}
* {{tl|Chembox/testcases2}} ('''all indexes''')
* {{tl|Chembox/testcases3}} (all params, per section)
* {{tl|Chembox/testcases4}} (long names & ids)
===Documentation (prepared)===
Described by future documentation:
<div style="background:#E6FFF2; padding:0 1em;">
====Indexed CASNo identifiers====
<pre style="float:right;">
|CASNo =
|CASNo1 =
|CASNo2 =
|CASNo3 =
|CASNo4 =
|CASNo5 =
|CASNo6 =
|CASNo7 =
|CASNoOther =
</pre>
Infobox {{tl|Chembox}} can show identifier {{para|CASNo}}. In addition, there are seven more ''indexed CASNo identifiers''. See the list to the right. So {{tlf|Chembox}} can take and show 0&ndash;7 (eight) CASNo identifiers. Note that index number "0" (for {{para|CASNo}}) is not written or shown.

All indexed CASNo identifiers should be entered as a well-formatted CAS registry number, and nothing more. No formatting code should be added. They are shown in the infobox with a line break added (&lt;br/>), when needed. All CASNo entries are bot-checked. So one can expect {{para|CASNo7_Ref}} in the article. There is ''no'' requirement for any sequence (it is not required to fill the numbers from 0 upwards; this freedom did not exist before, when CASNo= was required in the first place).
;CASNo free text parameter
There also exists {{para|CASNoOther}}, which takes any text (e.g., an annotated list or prose). A &lt;br/> might be needed in here. This parameter is never bot-checked.

====The <s>seven</s> ''eight'' indexed identifiers====
<pre style="float:right;">
Overview (incomplete):
|CASNo =
|CASNo1 =
|CASNo7 =
|CASNoOther =
|ChEBI =
|ChEBI1 =
|ChEMBL7 =
|ChEBIOther =
|ChEMBL =
|ChEMBL1 =
|ChEMBL7 =
|ChEMBLOther =
|ChemSpiderID =
|ChemSpiderID1 =
|ChemSpiderID7 =
|ChemSpiderIDOther =
|InChI =
|InChI1 =
|InChI7 =
|InChIOther =
|PubChem =
|PubChem1 =
|PubChem7 =
|PubChemOther =
|SMILES =
|SMILES1 =
|SMILES7 =
|SMILESOther =
|UNII =
|UNII1 =
|UNII7 =
|UNIIOther =
</pre>

Similar to CASNo, there are ''eight identifiers that take indexes'':
:{{para|CASNo}}, {{para|ChEBI}}, {{para|ChEMBL}}, {{para|ChemSpiderID}}, {{para|InChI}}, {{para|PubChem}}, {{para|SMILES}}, {{para|UNII}}

All the indexed parameters are bot-checked. (7&times;9=63). They also take the {{para|...Other}} parameter to enter free text, unchecked.

;Use the index
When the chembox has multiple substances, ''use the index''. Make sure that {{para|CASNo3}} and {{para|SMILES3}} are about the same substance, and {{para|CASNo3}} and {{para|SMILES2}} are ''not''. Treat index "0" the same way:
:{{para|CASNo}} is {{para|InChI}} is {{para|SMILES}}
:{{para|CASNo1}} is {{para|InChI1}} is {{para|SMILES1}}
:{{para|CASNo}} is ''not'' {{para|InChI1}} is ''not'' {{para|SMILES4}}

When the indexes are used this way, <s>you can add {{para|use_index|yes}} to set a flag.</s> That lists the article for further development using the indexes. At the moment, this parameter setting has no effect in articles at all. It only serves as a maintenance categorizing help.
:This still is a good idea, but it is not tracked now.

====Details====
;Deprecations
* All -<code>s</code> parameters like {{!xt|1={{!}}CASNo'''s'''}} are ''deprecated''. Use {{xt|1={{!}}CASNoOther}} instead
* Parameter {{!xt|1={{!}}CASOther}} is ''deprecated'' (because it has an irregular name pattern). Use {{xt|1={{!}}CASNoOther}} instead

;Not for images
The image numbers (like in {{para|ImageFile1}} and {{para|ImageFileR2}}) are ''not'' indexes this sense. They do the row-positioning only.
</div>
:''(end of documentation)''

===Future with indexes===
In the far future, {{tl|Chembox}} can handle indexes even more systematically, I hope. For example, any ''image'' can be tied to a CASNo''N'' index. And that can be shown or used in the infobox. But not tomorrow :-) . We'll keep that open. -] (]) 23:19, 26 January 2015 (UTC)

===Comments===
So in general: the Chemboxes listing multiple forms of a compound will become longer but better formated. Chemboxes listing only one form should see no major changes?... Love it! --] (]) 10:56, 27 January 2015 (UTC)
:Yes. (And in the InChI and SMILES data some vertical whitespace will go; less line-height. See ]). -] (]) 11:47, 27 January 2015 (UTC)
::Ah, yes I see. How did you get around the wrapping problem? --] (]) 12:00, 27 January 2015 (UTC)
::::See ]: applied <code>word-wrap:break-word;</code>. Don't know exactly what was wrong, just build this new data formatter from ~scratch. More about format changes in a separate post, to follow. -] (]) 12:23, 27 January 2015 (UTC)

== Proposed changes to the Chembox ==

I have prepared a dozen or two of changes to {{tl|Chembox}}. They are described below. There are testpages to demonstrate the differences. Please comment below. When things are stable, I can move them into life. -] (]) 23:43, 29 January 2015 (UTC)

* Testpages: ]; ] (All indexed identifiers up); ] (All parameters use); ] (Long names; with show/hide)

* Infobox title: transparent background (usually white), Same as regular infobox. So not chembox-yellowish any more.
* Images: Obsolete HTML code replaced (align="center" &rarr; style="text-align:center;"). No other changes in the images.
* Other names and IUPAC names: see ]
:: Full Chembox subheader "Other names" added. Right below that is data {{para|Other names}}.
:: Then all IUPAC names in one show/hide box, with their subheaders: {{para|IUPACname}}, {{para|IUPACnames}} <small>(new, plural)</small>, {{para|PIN}}, {{para|SystematicName}}
::{{para|IUPACName_hidden|y/yes/hidden/hide/collapse/collapsed}} to set collapsed box state (default:show, uncollapsed).
::Change: the four name sets were all show/hide. Now there is one setting, for IUPAC name(s) only.

* InChI and SMILES: '''limited width''', forced line breaks.
::The (long) names are now limited to infobox width (22em). This resolves a current page-breaking disruption (long identifiers run off-page to the left hand side. In mobile view, this is always visible because mobile does not have a show/hide option).
:InChI input should not have {{para|InChI|2=InChi=...}} added (will be double in output). These articles are listed for editing.

* CASNo has indexes "blank" and 1&ndash;7. See ]
<pre style="float:right;">
|CASNo =
|CASNo1 =
|CASNo2 =
|CASNo3 =
|CASNo4 =
|CASNo5 =
|CASNo6 =
|CASNo7 =
|CASNoOther =
</pre>
::{{para|CASNo}} now takes indexes blank&ndash;1&ndash;7 (see list to the right).
::{{para|CASNoOther}} takes free text.
::All indexes should have plain correct text, without formatting (then {{para|-Other}} can take any text). All the identifiers are separated with &lt;br/>.

:''<s>Seven</s> Eight identifiers'' in total have this same index pattern & behaviour:
::{{para|CASNo}}, {{para|ChEBI}}, {{para|ChEMBL}}, {{para|ChemSpiderID}}, {{para|InChI}}, {{para|PubChem}}, {{para|SMILES}}, {{para|UNII}}

* ATCCode: uses newline, minor reformatting.

* MolarMass can have {{para|MolarMass_ref}} <small>(no space)</small> and {{para|MolarMass_notes}} <small>(with space)</small>
* MolarMass_notes or MolarMass_ref (==> _notes in cat. space)
:Deprecated: {{!xt|MassRound}} use {{xt|MolarMassRound}}

* Solubility in water: the label will be ]. (same as in {{tlf|drugbox}}).

* Legal status, pharma: show in correct column (Data) (see ]; disruption)
::See added bullet below.
* Main hazards: move to near top of Hazards subsection.

* Temperatures MeltingPt, BoilingPt, FlashPt, AutoignitionPt.
::Four parameters (maximum) are needed to enter a complete temperature point:
::{{xt|MeltingPt}} .. {{xt|MeltingPtC}} <small>(+calculated conversions)</small> .. {{xt|MeltingPt_ref}} .. {{xt|MeltingPt_notes}}
::Or use {{xt|MeltingPtF}} <small>(Fahrenheit to convert)</small>, {{xt|MeltingPtK}} <small>(Kelvin to convert)</small>
:: deprecated: {{!xt|MeltingPtCL/CH}} use {{xt|1=MeltingPtC=10 to 20}} to enter a ''range''

* Show link and quantity symbol like: "] (n)". (descriptive, and the symbol unlinked).

* Bot-supported validation
:: All indexes (blank&ndash;1&ndash;7) will be bot-checked (was: the blank-indexed one only).
:: Only articles will appear in categories.
:: Punctuation of the bottom validation note (in "verify; what is")

* Visual effects
:: Multi-line labels (wrapped texts): less line height.
:: Colored section headers: removed horizontal borders.
:: Footer: the extra formatting row below, a few pixels high, is invisible. rm horizontal top border.

* Internal changes
:: {{tl|Chembox entry}}, an intermediate datarow builder, is removed. This step is skipped.
:: Maintenance categories are simplified, and are <code><nowiki>{{</nowiki>main other{{!}}<nowiki>]}}</nowiki></code> (categorize articles only).
:: The yellow subheaders are composed in the subtemplate, no <code><nowiki>{{!}}</nowiki></code>-code in the template any more.
:: PArameters like {{para|CASNo_url}} are not used in any result, so removed from internal code and from documentation (no categorization of other catch)
::Ouch: bot params like {{para|CASNo_Ref}} did a double (nested) calculation! First input param {{tl|cascite}} was processed (say into a green tick+maintCat; all fine). Then internally ''that'' value of {{para|CASNo_Ref}} was processed again for a tick (no extra effect). Did rm inner one, the template result of bot param input "<code><nowiki>|CASNo_Ref = {{cascite|changes|??}}</nowiki></code>" is presented directly. For all such identifiers (see new /format subtemplates).

* Known issues
::InChI and SMILES have a superfluous bottom border line (when no -Other data). Acceptable for now.
::Bottom row (references) is ~2px too high (is where the row-width setting is kept).
::Legal status (pharma): too much whitespace, see ]. ({{tlf|drugbox}} does better).
::::Pharma: presentation of Legal status, Pregnancy category, Licence were checked and improved. {{tlf|Drugbox}} is leading. More at the end of this section. -] (]) 11:36, 30 January 2015 (UTC)
::Identifiers not indexed (=not changed, this time): {{para|ChEBI}}, {{para|DrugBank}}, ...

* Pharmacology: Legal status, Pregnancy category, Licence
::These data presentations are changed. Follows {{tlf|drugbox}}. See testcases. -] (]) 11:36, 30 January 2015 (UTC)

===Deprecations===
:{{!xt|MeltingPtPrefix}} use {{xt|MeltingPt}}
:{{!xt|MeltingPtCL}}, {{!xt|MeltingPtCH}} use {{xt|1=MeltingPtC=10 to 20}} to enter a ''range''.
::Same for MeltingPt, BoilingPt, FlashPt, AutoignitionPt.
::Same for {{!xt|-FL, -FH, KL, -KH}}: Use simple range input with {{xt|-F, -K}}.
:{{!xt|Autoignition}} use {{xt|AutoignitionPt}} (also for -C, -F, -K, _ref, _notes).
:{{!xt|PIN_hidden}} use {{xt|IUPACName_hidden}} hide/collapse/
:{{!xt|CASNo'''s'''}} use {{xt|CASNoOther}} for free text. Same for all eight identifiers.
:{{!xt|CASNo_url}} input is not used. rm from documentation, for all eight indexed identifiers.
:{{!xt|CASOther}} use {{xt|CASNoOther}} (name pattern; this one for CASNo only)
:{{!xt|MassRound}} use {{xt|MolarMassRound}}
:{{!xt|PregCatCA}}, {{!xt|PregCatUK}}: use {{xt|PregCat}} free text (not regulated in Au, UK). See .
:Articles with deprecated parameters are categorized for maintenance editing. There will be no broken effects (no hard deletions before cleanup).

-] (]) 23:43, 29 January 2015 (UTC) <small>(tweaked. -] (]) 09:12, 30 January 2015 (UTC))</small>

===Notes and considerations===
The {{tlf|chembox}} is not a modern Lua {{tlf|infobox}} yet. This may follow. We keep in mind that {{tl|drugbox}} could be merged with this one.

The forced newlines in long names like InChI are highly necessary. It breaks mobile pages always.

;Testpages
* ] -- General, various tests
* ] -- All indexed identifiers up (7&times;8+)
* ] -- All parameters used
* ] -- Long names; show/hide
It is always useful to check '''mobile view''' too (From a desktop view, that is a link at the very bottom of a wikipage).

To test your favourite substance, don't forget to use all Section sandboxes:
<pre>
{{Chembox/sandbox
| Section1 = {{Chembox Identifiers/sandbox
...
}}
| Section2 = {{Chembox Properties/sandbox
...
}}
}}
</pre>
If you ask me, I can put an article's chembox in testcase page. It will show nicely side-by-side.


{{Ping|Jdlrobson}} Is it possible to expand the new dark mode styling you've added to include <code>skin-invert-image</code>? I'm new to CSS and not sure how to best go about that. There are a good number of chemboxes using that class for inverting images, like this {{oldid|Ethanol|1265737059}}. I'm also not sure what's going on with ] such that that image is not receiving a white background.
;Maintenance categories
* See ]
* Tracked and deprecate parameters, specified in the category. No new categories, some deprecated.


If you have some more time, we're making similar edits to ] and we would welcome your thoughts on the implementation ], thanks. &#8213; ]] 20:47, 4 January 2025 (UTC)
* CheMoBot categories are updated (eg, {{tlf|casnocite}}).
-] (]) 23:43, 29 January 2015 (UTC)
* {{Done}}. Implemented in today's {{tl|Chembox}} version. 16:25, 6 February 2015 (UTC)
===Comments on list of changes===
Looks good in general. I'm don't really like the transparent background for the title. Would it be possible to force a line break in <nowiki>"Solubility<BR> in water"</nowiki> to improve the formatting of the columns? --] (]) 11:57, 30 January 2015 (UTC)
:Thanks for taking a check.
:Title transparent bg: this is what most enwiki infoboxes do, it is the {{tl|infobox}} standard. It shows in ] ({{tl|Infobox element}}) and ] ({{tl|drugbox}}). Non-chemical: ] ({{tl|Infobox book}}). That is where I took it from (for this old artisan handcrafted wikitable infobox). There is no urgent or topical reason to use a color. Could you consider this an experience of "I'm not used to it -- yet" (happened with the chemical elements change last year).
:In general, grand wikipage design(ers) tend to bring in more white(-space) and less lines & colors. So if there is no reason to deviate from standard, I'd prefer to keep it transparent (~white).
:Breaking line in "Solubility&lt;BR> in water": can do, but is it needed? For me, the list of solubilities is a strain to understand already (I'm not not familiar with the topic; two similar words &tc.). A linebreak then adds a tiny bit to this mental grasping. Plus, in my screens, it does not push the column or infobox much wider if at all. In ], there are some others equally wide. You want to minimize the LH column more? Or the overall infobox (now 22em minimum)? Its about personal preferences now. -] (]) 12:26, 30 January 2015 (UTC)
::{{ping|Project Osprey}} OK, I've added the break (Good Editorship). But I'm not convinced it should stay there. Let's take a good look at the effects. -] (]) 16:10, 30 January 2015 (UTC)
:::You're right; adding the line break hasn't improved anything. I think the LH column should be kept thin as that improves the readability of the RH column - however that just my personal style choice. Regarding the transparent bg - this I can live with, after a while I probably wont notice anymore. --] (]) 16:46, 30 January 2015 (UTC)
::::OK & agree. It's 22em now total, with LH at 40% (set last March, unchanged now). Text can push a column wider. You want to see something else tried? -] (]) 17:13, 30 January 2015 (UTC)
:::::No, I'm quite happy with the additions as they stand. --] (]) 11:55, 2 February 2015 (UTC)
*I'm not sure about this. As proposed, the "other names" are above IUPAC name(s). Is that right? -] (]) 15:02, 30 January 2015 (UTC)


:Linking the relevant diff is probably helpful: ] &#8213; ]] 20:59, 4 January 2025 (UTC)
Regarding the long InChIs etc. - you say they still break on mobile? I would then suggest again to render those through LUA ASAP, otherwise we get edits manually 'breaking' the InChIs (and others) again/still (I don't know if that is done still), and then we have to do a cleanup run later to repair them all again? --] <sup>] ]</sup> 03:34, 1 February 2015 (UTC)
::This should also work:
::No. Current live version ''breaks pages'' (bad). The new version does ''not'' break the page (good). That shows in the testcases pages esp. ], left hand side = sandbox. The max width for these is 22em (~regular infobox width)(Misunderstanding?: they do ''line-breaks'' as intended!). With me, they show OK in mobile view too (I test that by clicking the very last link on a testpage). eg ]. Tell me if you see a broken sandbox! -] (]) 10:21, 1 February 2015 (UTC)
::<syntaxhighlight lang="css">html.skin-theme-clientpref-os .mw-parser-output .ib-chembox figure:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent)</syntaxhighlight>
::And yes, we can do a cleanup later (for unwanted &lt;br/> in input). But what I'm changing is ''huge'' (40 sandboxes interacting), better not add that in the same change. -] (]) 10:24, 1 February 2015 (UTC)
::― ] (]) 02:07, 8 January 2025 (UTC)
* I am '''closing the trunk''' for feature discussions. (Also as a note to self ;-) ). Time to implement the fix for broken pages, especially mobile views.
:Please keep reporting on (testcase) bugs, errors, etc. -] (]) 12:10, 1 February 2015 (UTC)


== Template-protected edit request on 8 January 2025 ==
===Last minute notes===
* Just only today, {{para|'''ChEBI'''}} was added to the list of indexed parameters. -] (]) 02:10, 1 February 2015 (UTC)


{{Edit template-protected|Template:Chembox/styles.css|answered=yes}}
*{{red|'''Note'''}}: proposed index numbers -6 and -7 '''will not be implemented'''. This is to limit template size and complexity. (eg {{para|<s>CASNo6</s>}} and {{para|<s>CASNo7</s>}}). -] (]) 11:17, 3 February 2015 (UTC)
For better dark mode compatibility, please replace:
* Bot-managed templates like {{tlf|cascite}} are redesigned & recoded (7 verified identifiers + images). Will categorize more systematically "changed" verified fields. Required list of cats made complete (7, + 1=images). "images changed" still won't fill. Also "without CASNo" (x 7 identifiers) categories, filled by template not by bot. See new documentation at {{tl|cascite}}. -] (]) 09:19, 6 February 2015 (UTC)
* {{yellow tick|14}} Going live now. -] (]) 09:20, 6 February 2015 (UTC)
* {{tick|14}} Live now. -] (]) 15:24, 6 February 2015 (UTC)


<syntaxhighlight lang="css">
===Post-implementation issues===
@media screen {
* Some maintenance categorizations are filtered incorrect.
html.skin-theme-clientpref-night .ib-chembox figure:not(.skin-invert) {
* {{para|DrugBank}} and {{para|ATCCode}} can appear in Identifiers and in Pharmacology Sections (in the same form). From this, {{cl|Chemical pages without DrugBank identifier}} now has articles that ''do'' have a DrugBank id in Pharmacology Setion.
background: white;
* Paired images (left & right) do not show nicely even in mobile view. Not broken.
}
:-] (]) 15:30, 6 February 2015 (UTC)
}
* PubChem_Comment doesn't appear to be rendering in all cases (See: ], ] etc) -sign?: 19:56, 7 February 2015 Project Osprey. <small>-] (]) 01:02, 8 February 2015 (UTC)</small>
::This is a '''bug''' and will be solved in a few days. {{para|PubChem_Comment|foo}} will show as expected. No need to change (edit) articles for this. -] (]) 18:55, 8 February 2015 (UTC)


@media screen and (prefers-color-scheme: dark) {
===Updates (new version)===
html.skin-theme-clientpref-os .ib-chembox figure:not(.skin-invert) {
Follow-up edits, in preparation:
background: white;
* Make sure {{para|PubChem_Comment|foo}} shows (bug, see above. All PubChem indexed comments)
}
* Make sure {{para|FlashPt_ref}} shows (bug)
}
* side-by-side images (L/R): in mobile view, the images do not show symmetric (instead, they are shifted to the left of the infobox). Had to restore deprecated code <code>align=center</code> in sbs-row. See esp. /testcases7images.
</syntaxhighlight>
* IUPAC names, other names, see esp. /testcase3. Last week, these were moved into their own subsection. More changes:
::1. Remove any show/hide option. No reason to hide names. And anyway, in mobile view these are shown always. Unrelated to InChI-names showing/hiding.
::2. Chemboxes with {{!xt|IUPACNames_hidden|set}} are categorized for a check, afterwards (& remove this deprecated parameter).
::3. Restore sequence: IUPAC names first, 'other names' last.
::4. Layout: to present long names more gently, they start indented (not in the righthand column).
* Allow correct input like: {{xt|1=InChI=IncChI=1/N123}}, but preventing double showing like {{!xt|1=InChI=IncChI=1/N123}}. This follows the InChI definition.
*{{para|KEGG}} indexed 1&ndash;5, as other verified parameters.
*{{para|DrugBank}} indexed 1&ndash;5, as other verified identifiers. All DrugBank input can be entered in both Identifiers and Pharmacology sections (as before).
::Now all 8 verfied identifiers are indexed and completely bot-tracked for each index. They also take {{tl|cascite}}-like templates for each indexed {{para|_Ref}}. E.g. {{para|KEGG5_Ref|<nowiki>{{cascite|changed}}</nowiki>}}.
* {{tl|pubchemcite}} follows {{tl|cascite}} pattern (CheMoBot verfification etc).
* New category: {{cl|Chemical articles having a data page}}, like ] having ]. Used in Chembox section "Supplementary".
*Make sure deprecated parameter catsort "3" is in the right category. (code 3 = 'Section has unnamed parameter {{para|1}}').
:-] (]) 16:04, 11 February 2015 (UTC)
:: {{yellow tick}} Going live now. -] (]) 23:41, 11 February 2015 (UTC)
::{{Done}} -] (]) 08:05, 12 February 2015 (UTC)
::::Note: {{para|PubChem_Ref}} does not show. Chek, old behaviour. See also old changes in CheMoBot wrt pubchem. -] (]) 11:22, 12 February 2015 (UTC)
::::{{!xt|AutoignitionC}} does not show (depr). -] (]) 12:17, 12 February 2015 (UTC)


to:
== Tracking parameter errors ==


<syntaxhighlight lang="css">
I would suggest that parameter errors (and some syntax errors) in the chembox are tracked in a maintenance category. The compulsory and the optional parameters may be defined. All articles with other parameters in the chembox would be found. I ] for ], where the articles with errors are now shown in ] (not yet fixed in order to visualize). --] 00:54, 5 February 2015 (UTC) <small>PS. Visibility for errors in read mode ] to autoconfirmed users.</small>
@media screen {
:You are absolutely right, there could be (more) parameter checking in {{tl|chembox}}. The topic is very fit for that. However, there are a few complicating factors:
html.skin-theme-clientpref-night .ib-chembox figure:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent) {
:* Chembox has ~500 parameters. Not all need a check, but reducing that to 200 or 100 leaves a big job still.
background: var(--background-color-inverted, #f8f9fa);
:* Chembox uses some {{cl|Chembox templates|2=150 subtemplates}} (ouch we say).
}
:* The bot ] also tracks certain parameters for verification. Keeping up that support takes attention too (and also serves as a parameter tracking aide).
}
:* {{tlf|Chembox}} and {{tl|Drugbox}} share a lot of categories, subtemplates, design setups (though not consistently all), so we have to keep an eye on Drugbox params too.
:This is what we used to call an "intricate template" (and that's an understatement).


@media screen and (prefers-color-scheme: dark) {
:{Chembox} is not in a Lua module now. Once it is in there, controlling data as you propose is much much easier.
html.skin-theme-clientpref-os .ib-chembox figure:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent) {
background: var(--background-color-inverted, #f8f9fa);
}
}
</syntaxhighlight> ] (]) 02:22, 8 January 2025 (UTC)
:{{done}}<!-- Template:ETp --> ] (]) 17:30, 9 January 2025 (UTC)


== Template-protected edit request on 12 January 2025 ==
:I can note that these weeks I have been preparing ''many'' changes to ''many'' {{tl|Chembox}} templates. When tests are stable, this will go live one of these days. This time, not many ''parameter checks'' as you propose are added. Other changes needed attention first (eg, the mobile page view can be disrupted in situations!). But I kept an eye on that goal all along. More on this is in talk sections above.


{{edit template-protected|Template:Chembox image cell|answered=yes}}
:Some changes that are coming, and that might interest you, are: consistently fill categories like "articles without CAS Reg number", "articles with changed CAS Reg number".
Please, replace the current content of ] to the following:


<syntaxhighlight lang="wikitext">| colspan="2" style="text-align:center; padding:2px;" | {{#invoke:InfoboxImage|InfoboxImage
:Meanwhile (now that you are here), if you see disruptions in {{tlf|Chembox}} articles in the next week or so, you are invited to report them. My changes need all the eyes we can get. -] (]) 10:24, 5 February 2015 (UTC)
|center=yes <!-- when center=yes, it is rendered with the <picture> html tag instead of <span> it is important so the CSS is applied correctly -->
|image={{{par_file}}}
|size={{{par_size}}}
|sizedefault=220px
|alt={{{par_alt}}}
|title={{{par_title}}}
|class={{{par_class}}}}}{{#if:{{{par_caption|}}}|<div style="text-align:center;">{{{par_caption|}}}</div>}}
|-<noinclude>{{documentation}}</noinclude>
</syntaxhighlight>


Explanation: The current CSS styling for dark mode selects for "figure:not(...)...", so it was currently working only for some images in the Chembox. The code above makes it work nice as intended.
::] needs to be given just a list of all parameters, which may be quite long (]). It will find e.g. misspelled parameters and syntax errors such as <code>parameter name:</code> instead of <code>parameter name=</code>.
::In de.wikipedia, all chemistry-related templates have it (see ]).
::If the template documentation is up-to-date, i.e. it contains all possible parameters, it's not such a hard work to add Module:TemplatePar. --] 07:19, 6 February 2015 (UTC)
:::We have {{cl|Chembox maintenance categories}} with '''40+ specific maintenance categorizations'''. The <code>parameter name:</code> mistake you mention is covered in there. However. A parameter list you point to "which may be quite long" has only 100 params. As said, for {{tl|Chembox}} that is multiplied by 5 (500 params). Then, we have 10 subtemplates must have that param check too (that's how it is). And all that for a misspelled param? And that still would not help against unwanted &lt;br/> in input, or a misformatted CAS NR. So, let's first clean up those 40 categories. Then, next week we'll take another look. (did you see that the German <nowiki>{{GESTIS}}</nowiki> template requires another entering of the CAS NR?) -] (]) 15:48, 6 February 2015 (UTC)
::::The categories in {{cl|Chembox maintenance categories}} are not the same as the ones I linked above (purely “parameter-related”), but {{cl|Chemical infoboxes with misplaced or deprecated parameters}} seems to be close. My suggestion would—by its design—cover all misspelled (or deprecated parameters), not just selected ones. --] 21:27, 6 February 2015 (UTC)
:::::Any reply to my answers? btw, I do like the German links. Inspiring. But changing your own topic again again to tell me what is wrong with {{tlf|Chembox}} -- no. I know. -] (]) 21:36, 6 February 2015 (UTC)
:::::Tell me, honestly: which of the links I gave did you actually click & read & digest? Your answers here suggest a zero. -] (]) 21:42, 6 February 2015 (UTC)
::::::Yes, I did not answer your concern about the number of parameters. I agree that there are many, but apart for the work of getting a complete list, I do not see a real problem here. Are you concerned about the performance, i.e. that the page rendering time would be too high?
::::::I visited all the pages you linked. <small>I've even fixed all and the 100 .</small> --] 23:55, 6 February 2015 (UTC)
::::::::No I am not worried about performance at all. It's just, it's complicated as in: those templates interact, and there is the CheMoBot working, and external chemistry databases definitions. And this time I did not review the image showings (almost not). Another worry is that there is little activity in the verification process. 50% of the chemboxes are redcrossed. And there is {{tl|drugbox}} to look at, always doing things with the same stuff. Anyway, I think I made another cleanup, into simplification. -] (]) 17:30, 8 February 2015 (UTC)
*{{od}} I appreciate your contributions (I first thought an error happened: empty maint cats ;-) ). I'm not replying now to this last post of yours. It happened that up into Friday I put live ''45 intricate Chembox templates'' I was working on for eight weeks. All interconnected, me having to research a bot behaviour, chemistry habits & external links, and an inherited Chembox setup. I liked it (it works, feels good today!), but I was not in the mood to read criticism on how to do well ''during these days''. I already clicked those German dewiki links, and there are nice & great solutions indeed. But today I take a break, doing only the edits I like. Later, I might re-engage Chembox improvements. I was thinking, Drugbox can use a leap-frog to catch up with this one. -] (]) 20:46, 7 February 2015 (UTC)


===next step===
Leyo, I am thinking about this: for every relevant ''institute'', we create a top category: "Category:Chemical articles and CAS". In there are any CAS-related categories we have. It should not be about templates (not "CAS issue from {{tlf|Chembox}}", not "CAS issues from {{tlf|Drugbox}}"). It will be articles only (not anypage). Because, I grasp (I'm not a chemist) that these institutes and their databases interact heavily about chemical substances in many ways (also with wiki of course). Chemistry, medicine, hazards: everything relates. So why not have a category that gives 'outsiders' and us an overview from there: "Cat:Chemical articles and KEGG", with subs "Cat:Chemical articles that use KEGG"; "Cat:Chemical articles with a KEGG issue"? (existing categories, eg by the bot, will stay). -] (]) 17:46, 8 February 2015 (UTC)
:Are you talking about my suggestion concerning the use of ] above? This parameter check is only related to the ''formal/technical'' correctness, but not to the content. Hence, I would prefer to have a main ] and—at least until legacy errors are fixed—subcategories for the subtemplates, e.g. ]. --] 10:17, 12 February 2015 (UTC)
::I understand. Useful, agree. I'm taking a break, last changes were quite a strain. -] (]) 10:28, 12 February 2015 (UTC)


Testcase examples: ]
== Ordering Identifiers ==


I am ordering the Identifiers alphabetically. From random. -] (]) 19:27, 12 February 2015 (UTC) Thanks! -- ] (]) 22:41, 12 January 2025 (UTC)
:{{done}}<!-- Template:ETp --> — ] (]) 17:56, 14 January 2025 (UTC)
:Maybe the current order is according to importance, too. --] 19:29, 12 February 2015 (UTC)
::As you say: maybe. That is not enough. I am looking at it for a year now, and still have not discovered any structure (of course, if importance is in play then that should show). From alphabetic, we could split into a 2nd header "Specific identifiers" like medicine and countries (EU). The generic id's can remain in top. -] (]) 19:59, 12 February 2015 (UTC)
:::IMO CAS number and EC number should be first and second. --] 20:41, 12 February 2015 (UTC)
::::And the others? How does one ''search''? Not everybody knows the order of improtance. -] (]) 20:48, 12 February 2015 (UTC)
:::::Most readers will be interested in the CAS number, but currently the very specific 3DMet and Beilstein Reference are first. What about waiting for other opinions? --] 20:59, 12 February 2015 (UTC)

Latest revision as of 17:57, 14 January 2025

See also: {{Navbox Chembox}} (talk), {{Drugbox}} (talk)
Template:Chembox is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.

Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases.


This is the talk page for discussing improvements to the Chembox template.
Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13Auto-archiving period: 2 months 
This page is for discussion about format, layout, content (parameters), and application howto of the Chemical infoboxes. Discussions older than several months, and now outdated, are archived. Planning and progress of implementation of these infoboxes to the numerous articles is discussed and (where possible) organized in the Chemicals WikiProject, part of the Chemistry WikiProject.
This template was considered for deletion on 2018 November 26. The result of the discussion was "withdrawn".
This template does not require a rating on Misplaced Pages's content assessment scale.
It is of interest to the following WikiProjects:
WikiProject iconChemistry
WikiProject iconThis template is within the scope of WikiProject Chemistry, a collaborative effort to improve the coverage of chemistry on Misplaced Pages. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.ChemistryWikipedia:WikiProject ChemistryTemplate:WikiProject ChemistryChemistry
WikiProject iconChemicals
WikiProject iconThis template is within the scope of WikiProject Chemicals, a daughter project of WikiProject Chemistry, which aims to improve Misplaced Pages's coverage of chemicals. To participate, help improve this template or visit the project page for details on the project.ChemicalsWikipedia:WikiProject ChemicalsTemplate:WikiProject Chemicalschemicals
WikiProject iconMedicine
WikiProject iconThis template is within the scope of WikiProject Medicine. Please visit the project page for details or ask questions at Misplaced Pages talk:WikiProject Medicine.MedicineWikipedia:WikiProject MedicineTemplate:WikiProject Medicinemedicine

Drug_class field not working

Hello. The "Drug_class" field in Section6 "Chembox Pharmacology" (see Template:Chembox_Pharmacology/doc for documentation) does not seem to be working. The field does not show in the drugbox when filled and instead this text is deposited on the page: "Template:Chembox DrugClass". Hoping for a fix so that this field can be used. Thank you. – 76.174.0.57 (talk) 10:33, 7 November 2024 (UTC)

That support template was deleted last year because editors noted it was not used at that time (maybe no chemical article actually filled out that field, or possible difficulty in diagnosing a complex template suit). It's documented, so it should be supported (or un-documented). And it's useful and usable, so it should be supported. Working on it... DMacks (talk) 13:14, 23 December 2024 (UTC)
 Fixed via User talk:Explicit# Template-deletion. DMacks (talk) 13:37, 23 December 2024 (UTC)
@AlyInWikiWonderland:, based on note on IP-talkpage:) DMacks (talk) 03:09, 24 December 2024 (UTC)
@DMacks: That's great to hear, thank you! – AlyInWikiWonderland (talk, contribs) 02:28, 7 January 2025 (UTC)

Dark mode support for images

Can we add skin-invert-image to the images in this box or give them a white background?

The chemical formulae are not readable in dark mode e.g. https://en.wikipedia.org/Borax?vectornightmode=1&useskin=vector-2022 🐸 Jdlrobson (talk) 00:40, 25 November 2024 (UTC)

ChEMBL links no longer work

The ChEMBL links in the chembox no longer work. Eg from Chebulinic acid it leads to https://www.ebi.ac.uk/chembl/db/index.php/compound/inspect/ChEMBL501154 which returns a 404 page not found. Wikidata though links are working eg https://www.ebi.ac.uk/chembl/explore/compound/CHEMBL501154 . Can this be fixed please? Graeme Bartlett (talk) 04:12, 27 November 2024 (UTC)

Thanks for catching that and providing the fix! I updated the links in both chembox and drugbox. DMacks (talk) 08:04, 27 November 2024 (UTC)

Discussion at Misplaced Pages talk:WikiProject Chemicals § 3DMET database dead?

 You are invited to join the discussion at Misplaced Pages talk:WikiProject Chemicals § 3DMET database dead?. DMacks (talk) 12:54, 23 December 2024 (UTC)

Recent dark mode change has some janky results

@Jdlrobson: Is it possible to expand the new dark mode styling you've added to include skin-invert-image? I'm new to CSS and not sure how to best go about that. There are a good number of chemboxes using that class for inverting images, like this Old revision of Ethanol. I'm also not sure what's going on with Methyl pivalate such that that image is not receiving a white background.

If you have some more time, we're making similar edits to Template:Infobox drug and we would welcome your thoughts on the implementation at that discussion, thanks. ― Synpath 20:47, 4 January 2025 (UTC)

Linking the relevant diff is probably helpful: Special:Diff/1084375498/1267137136Synpath 20:59, 4 January 2025 (UTC)
This should also work:
html.skin-theme-clientpref-os .mw-parser-output .ib-chembox figure:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent)
Arthurfragoso (talk) 02:07, 8 January 2025 (UTC)

Template-protected edit request on 8 January 2025

This edit request to Template:Chembox/styles.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.

For better dark mode compatibility, please replace:

@media screen {
	html.skin-theme-clientpref-night .ib-chembox figure:not(.skin-invert) {
		background: white;
	}
}
@media screen and (prefers-color-scheme: dark) {
	html.skin-theme-clientpref-os .ib-chembox figure:not(.skin-invert) {
		background: white;
	}
}

to:

@media screen {
	html.skin-theme-clientpref-night .ib-chembox figure:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent) {
		background: var(--background-color-inverted, #f8f9fa);
	}
}
@media screen and (prefers-color-scheme: dark) {
	html.skin-theme-clientpref-os .ib-chembox figure:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent) {
		background: var(--background-color-inverted, #f8f9fa);
	}
}

Arthurfragoso (talk) 02:22, 8 January 2025 (UTC)

 Done Sohom (talk) 17:30, 9 January 2025 (UTC)

Template-protected edit request on 12 January 2025

This edit request to Template:Chembox image cell has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.

Please, replace the current content of Template:Chembox image cell to the following:

| colspan="2" style="text-align:center; padding:2px;" | {{#invoke:InfoboxImage|InfoboxImage
|center=yes <!-- when center=yes, it is rendered with the <picture> html tag instead of <span> it is important so the CSS is applied correctly -->
|image={{{par_file}}}
|size={{{par_size}}}
|sizedefault=220px
|alt={{{par_alt}}}
|title={{{par_title}}}
|class={{{par_class}}}}}{{#if:{{{par_caption|}}}|<div style="text-align:center;">{{{par_caption|}}}</div>}}
|-<noinclude>{{documentation}}</noinclude>

Explanation: The current CSS styling for dark mode selects for "figure:not(...)...", so it was currently working only for some images in the Chembox. The code above makes it work nice as intended.

Diff

Testcase examples: Template:Chembox/testcases7images#Dark mode tests

Thanks! -- Arthurfragoso (talk) 22:41, 12 January 2025 (UTC)

 DoneArthurfragoso (talk) 17:56, 14 January 2025 (UTC)
Categories:
Template talk:Chembox: Difference between revisions Add topic