Template:Infobox chemical/sandbox
| This is the template sandbox page for Template:Infobox chemical (diff). See also the companion subpage for test cases. |
| This template uses Lua: |
Template:Parameter names example
| Under construction This template {{Infobox chemical}} is under construction. {{Infobox chemical}} is not approved for general use. Please do not make new article pages using this template. Please do not change existing articles over from {{Chembox}} to this template. Page-by-page adoption is not acceptable. Just continue using {{Chembox}} in articles. To test this version: 1. Open article for edit, 2. Change "{{Chembox ...}}" into "{{Infobox chemical ...}}", 3. Preview to check your test, 4. Do not save. Discussion is at {{Chembox}} (talk). |
Template {{Infobox chemical}} is an infobox for chemicals. It has a large number of options to add relevant data and images. The infobox is organized in sections like "identifiers" and "hazards".
Contents
Usage
The Infobox has a modular design. After the general information like the chemical name and images, it can be built from multiple sections, each covering a group of information (like "pharmacology"). Depending on the compound, sections can be added or left out, and within a section parameters can be added or omitted (left blank).
The sections and their parameters are listed below.
Within the general template (with its own parameters like |ImageFile= and |IUPACName=), each section is added with this pattern (as the value of a parameter |Sectionx=.
{{Infobox chemical
| ImageFile =
| IUPACName =
<!-- more general Infobox chemical parameters here -->
| Section1 = {{Infobox chemical/identifiers
| CASNo =
| PubChem =
<!-- more Identifier parameters here -->
}}
}}
In this format, spaces and new lines have no meaning and can be used freely to separate sections (though within a data value, a space has a meaning, except generally leading and trailing spaces).
Each section has its own number in |Section#=. Then a section is defined with "|Section# = {{Infobox chemical/" and ends with "}}". Sections cannot 'nest': one must close one section with }} before adding another |Section#= {{Infobox chemical/ ....
Keep in mind the advice in the main Infobox documentation to use the {{Unbulleted list}} template to present multiple values for a parameter so as to ensure that the values are each started on a new line and tagged appropriately in the underlying markup. This is particularly important with parameters like |OtherNames=, since many names use commas within them, and using commas as separators leads to ambiguity. For example:
| OtherNames = {{Unbulleted list
| 2,4,6(1''H'',3''H'',5''H'')-pyrimidinetrione
| 2,4,6-trioxohexahydropyrimidine
| pyrimidinetriol
| malonylurea
| 6-hydroxyuracil
| ''N'',''N''-(1,3-dioxo-1,3-propanediyl)urea
}}
| (next parameter) = <!-- etc. -->
Small, simple form
To use, simply copy and paste the left column into the document, filling in whatever you can, and save:
| Template:Pre2 | Template:Pre2 |
Medium form
To use, simply copy and paste the left column into the document, filling in whatever you can:
| Template:Pre2 | Template:Pre2 |
Full form
To use, simply copy and paste the left column into the document, and press save to get an empty infobox:
Long parameter list for {{Infobox chemical}}
| ||
|---|---|---|
|
Indexed parameters
| CASNo = | CASNo1 = | CASNo2 = | CASNo3 = | CASNo4 = | CASNo5 = | CASNoOther =
Indexed parameters
|
|---|
|
Overview | CASNo = | CASNo1 = | CASNo5 = | CASNoOther = | ChEBI = | ChEBI1 = | ChEBI5 = | ChEBIOther = | ChEMBL = | ChEMBL1 = | ChEMBL5 = | ChEMBLOther = | ChemSpiderID = | ChemSpiderID1 = | ChemSpiderID5 = | ChemSpiderIDOther = | DrugBank = | DrugBank1 = | DrugBank5 = | DrugBankOther = | InChI = | InChI1 = | InChI5 = | InChIOther = | KEGG = | KEGG1 = | KEGG5 = | KEGGOther = | PubChem = | PubChem1 = | PubChem5 = | PubChemOther = | SMILES = | SMILES1 = | SMILES5 = | SMILESOther = | UNII = | UNII1 = | UNII5 = | UNIIOther = |
Indexed parameters take indexes 'blank', 1–5 (six options together). They should have straight input, such as a correct CAS Registry Number.
- Eight base parameters are indexed this way, all identifiers:
CASNo, ChEBI, ChEMBL, ChemSpiderID, DrugBank, InChI, KEGG, PubChem, SMILES, UNII
- Then
|_Other=(like|CASNoOther=) is available for free text input.
same substance, same index
When the infobox has multiple substances, you can use the index. Make sure that |CASNo3= and |SMILES3= are about the same substance, and |CASNo3= and |SMILES2= are not. Treat index "0" the same way:
|CASNo=is|InChI=is|SMILES=|CASNo1=is|InChI1=is|SMILES1=|CASNo=is not|InChI1=is not|SMILES4=
Labeling the substances
By using a parameter like |index2_label=, you can prefix every #2-input with that same prefix.
{{Infobox chemical
| Name=[[Linalool]]
| Section1={{Infobox chemical/identifiers
| index_label =
| index1_label = (''R'')
| index2_label = (''S'')
| index_comment = (+/-)-linalool
| index1_comment = (-)-linalool
| index2_comment = (+)-linalool
| CASNo = 78-70-6
| CASNo1 = 126-91-0
| CASNo2 = 126-90-9
| PubChem = 6549
| PubChem1 = 443158
| PubChem2 = 67179
}}
}}
| Identifiers | |
|---|---|
| |
| ECHA InfoCard | Script error: No such module "Wikidata". Script error: No such module "Wikidata". |
| E number | Script error: No such module "Wikidata". |
PubChem CID | |
Except where otherwise noted, data are given for materials in their standard state (at 25 °C [77 °F], 100 kPa). | |
| Infobox references | |
| CASNo_Comment = | CASNo1_Comment = | CASNo5_Comment =
- For specific additions, each parameter has a
|_Comment=option.
Section subtemplates
The following section subtemplates are available:
- {{Infobox chemical/identifiers}}
- {{Infobox chemical/properties}}
- {{Infobox chemical/structure}}
- {{Infobox chemical/thermochemistry}}
- {{Infobox chemical/explosive}}
- {{Infobox chemical/pharmacology}}
- {{Infobox chemical/hazards}}
- {{Infobox chemical/related}}
And the automated section, that is visible when 'pagename (data page)' exists:
See these subsections for their parameter options.
The order of these sections in the infobox is set by the section number (|Section#=) only. Not by the typed sequence. This documentation keeps this arbitrary order:
| Section1 = {{Infobox chemical/identifiers}}
| Section2 = {{Infobox chemical/properties}}
| Section3 = {{Infobox chemical/structure}}
| Section4 = {{Infobox chemical/thermochemistry}}
| Section5 = {{Infobox chemical/explosive}}
| Section6 = {{Infobox chemical/pharmacology}}
| Section7 = {{Infobox chemical/hazards}}
| Section9 = {{Infobox chemical/related}}
Sections that are not used can be safely removed, renumbering is not necessary.
Empty Syntax
{{Infobox chemical
| Name =
| Reference =
| Chembox_ref =
| ImageFile =
| ImageSize =
| ImageName =
| ImageAlt =
| ImageCaption =
| ImageFile_Ref =
| ImageFile1 =
| ImageSize1 =
| ImageName1 =
| ImageAlt1 =
| ImageCaption1 =
| ImageFile1_Ref =
| ImageFileL1 =
| ImageFileR1 =
| ImageSizeL1 =
| ImageNameL1 =
| ImageAltL1 =
| ImageCaptionL1 =
| ImageFileL1_Ref =
| ImageSizeR1 =
| ImageNameR1 =
| ImageAltR1 =
| ImageCaptionR1 =
| ImageFileR1_Ref =
| ImageCaptionLR1 =
| ImageFile2 =
| ImageSize2 =
| ImageName2 =
| ImageAlt2 =
| ImageCaption2 =
| ImageFile2_Ref =
| ImageFileL2 =
| ImageFileR2 =
| ImageSizeL2 =
| ImageNameL2 =
| ImageAltL2 =
| ImageCaptionL2 =
| ImageFileL2_Ref =
| ImageSizeR2 =
| ImageNameR2 =
| ImageAltR2 =
| ImageCaptionR2 =
| ImageFileR2_Ref =
| ImageCaptionLR2 =
| ImageFile3 =
| ImageSize3 =
| ImageName3 =
| ImageAlt3 =
| ImageCaption3 =
| ImageFile3_Ref =
| ImageFileL3 =
| ImageFileR3 =
| ImageSizeL3 =
| ImageNameL3 =
| ImageAltL3 =
| ImageCaptionL3 =
| ImageFileL3_Ref =
| ImageSizeR3 =
| ImageNameR3 =
| ImageAltR3 =
| ImageCaptionR3 =
| ImageFileR3_Ref =
| ImageCaptionLR3 =
| ImageCaptionAll =
| OtherNames =
| IUPACName =
| IUPACNames =
| PIN =
| SystematicName =
| pronounce =
| Names_ref =
| Section1 =
| Section2 =
| Section3 =
| Section4 =
| Section5 =
| Section6 =
| Section7 =
| Section8 =
| show_footer =
| show_ss_note =
| general_note =
| Verifiedfields =
| verifiedrevid =
| show_infobox_ref =
}}
See also
| Old {{chembox}} version | {{Infobox chemical}} equivalent | Testcases |
|---|---|---|
| {{Chembox Identifiers}} | {{Infobox chemical/identifiers}} | testcases |
| {{Chembox Properties}} | {{Infobox chemical/properties}} | testcases |
| {{Chembox Structure}} | {{Infobox chemical/structure}} | testcases |
| {{Chembox Thermochemistry}} | {{Infobox chemical/thermochemistry}} | testcases |
| {{Chembox Explosive}} | {{Infobox chemical/explosive}} | testcases |
| {{Chembox Pharmacology}} | {{Infobox chemical/pharmacology}} | testcases |
| {{Chembox Hazards}} | {{Infobox chemical/hazards}} | testcases |
| {{Chembox Related}} | {{Infobox chemical/related}} | testcases |
| {{Chembox Supplement}} | {{Infobox chemical/supplement}} | testcases |
- Additional templates
- {{Infobox chemical/image row}}
- {{Infobox chemical/labelstyle}}
- {{Infobox chemical/datastyle}}
- {{Infobox chemical/calc temps}}
Template Data
TemplateData documentation used by VisualEditor and other tools
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
See the monthly parameter usage report for this template.
TemplateData for Infobox chemical No description.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tracking categories
Categories
- /Hazards
- /Pharmacology
- /Supplement
- Tracking
- Category:Pages using infobox chemical with unknown parameters (0)
- Category:Chemboxes which contain changes to verified fields (0)
- Category:Chemboxes which contain changes to watched fields (0)
- Category:Articles containing unverified chemical infoboxes (0)
- Category:Chembox articles without image (0)
- Category:Chembox image size set (0)
- Category:Chemical pages containing a local image (0)
- Category:Chemical infoboxes with style settings (0)
| The above documentation is transcluded from Template:Infobox chemical/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |