Template:Chembox: Difference between revisions
Fix disappearing data page (eg ethanol). See Wikipedia_talk:Chemical_infobox#Data_page_not_showing_at_ethanol. Restructured subtemplate into plain wikitable rows. |
fix preview warning |
||
(35 intermediate revisions by 15 users not shown) | |||
Line 1: | Line 1: | ||
<templatestyles src="Chembox/styles.css"/> |
|||
{|class="infobox bordered" style="border-collapse:collapse; margin-top:2px; width:{{{width|22em}}}; text-align:left; {{{style|}}};"<!-- |
|||
<!--Shortdesc at the end-->{|class="infobox ib-chembox" {{#if:{{{width|}}}{{{style|}}}|style="{{#if:{{{width|}}}|width:{{{width|}}};}} {{#if:{{{style|}}}|{{{style}}}}}"}}<!-- |
|||
TITLE --> |
TITLE --> |
||
|+ |
|+ {{#if:{{{Name|}}}|{{{Name|}}}|{{PAGENAME}}}}{{{Reference|}}}{{{Chembox_ref|}}} |
||
|{{PAGENAME}}}}{{{Reference|}}}{{{Chembox_ref|}}} |
|||
|- <!-- IMAGES --> |
|- <!-- IMAGES --> |
||
{{#if:{{{ImageFile|}}}{{{ImageFile1|}}}{{{ImageFile2|}}}{{{ImageFile3|}}}{{{ImageFileL1|}}}{{{ImageFileR1|}}}{{{ImageFileL2|}}}{{{ImageFileR2|}}} |
{{#if:{{{ImageFile|}}}{{{ImageFile1|}}}{{{ImageFile2|}}}{{{ImageFile3|}}}{{{ImageFileL1|}}}{{{ImageFileR1|}}}{{{ImageFileL2|}}}{{{ImageFileR2|}}}<!-- rows 4/7 checked --> |
||
|<!-- Row 1/ |
|<!-- Row 1/7 -->{{Chembox image |
||
|par_file={{{ImageFile|}}} |
|par_file={{{ImageFile|}}} |
||
|par_title={{{ImageName|}}} |
|par_title={{{ImageName|}}} |
||
Line 11: | Line 11: | ||
|par_alt={{{ImageAlt|}}} |
|par_alt={{{ImageAlt|}}} |
||
|par_caption={{{ImageCaption|}}} |
|par_caption={{{ImageCaption|}}} |
||
|par_ref={{{ImageFile_Ref|}}} |
|par_ref={{{ImageFile_Ref|}}} |
||
|par_class={{{ImageClass|}}} }} |
|||
<!-- Row 2/9 -->{{Chembox image |
|||
<!-- Row 2/7 -->{{Chembox image |
|||
|par_file={{{ImageFile1|}}}<!-- par_file, not par_value any more --> |
|||
|par_file={{{ImageFile1|}}} |
|||
|par_title={{{ImageName1|}}} |
|par_title={{{ImageName1|}}} |
||
|par_size={{{ImageSize1|}}} |
|par_size={{{ImageSize1|}}} |
||
|par_alt={{{ImageAlt1|}}} |
|par_alt={{{ImageAlt1|}}} |
||
|par_caption={{{ImageCaption1|}}} |
|par_caption={{{ImageCaption1|}}} |
||
|par_ref={{{ImageFile1_Ref|}}} |
|par_ref={{{ImageFile1_Ref|}}} |
||
|par_class={{{ImageClass1|}}} }} |
|||
<!-- Row 3/9 -->{{Chembox image sbs |
|||
<!-- Row 3/7 -->{{Chembox image sbs |
|||
|par_fileL={{{ImageFileL1|}}} |
|par_fileL={{{ImageFileL1|}}} |
||
|par_titleL={{{ImageNameL1|}}} |
|par_titleL={{{ImageNameL1|}}} |
||
Line 26: | Line 28: | ||
|par_captionL={{{ImageCaptionL1|}}} |
|par_captionL={{{ImageCaptionL1|}}} |
||
|par_refL={{{ImageFileL1_Ref|}}} |
|par_refL={{{ImageFileL1_Ref|}}} |
||
|par_classL={{{ImageClassL1|}}} |
|||
|par_fileR={{{ImageFileR1|}}} |
|par_fileR={{{ImageFileR1|}}} |
||
|par_titleR={{{ImageNameR1|}}} |
|par_titleR={{{ImageNameR1|}}} |
||
Line 31: | Line 34: | ||
|par_altR={{{ImageAltR1|}}} |
|par_altR={{{ImageAltR1|}}} |
||
|par_captionR={{{ImageCaptionR1|}}} |
|par_captionR={{{ImageCaptionR1|}}} |
||
|par_refR={{{ImageFileR1_Ref|} |
|par_refR={{{ImageFileR1_Ref|}}} |
||
|par_classR={{{ImageClassR1|}}} |
|||
<!-- Row 4/9 -->{{Chembox image sbs |
|||
|par_captionLR={{{ImageCaptionLR1|}}}}}<!-- new Nov 2017: caption for both images --> |
|||
<!-- Row 4/7 -->{{Chembox image |
|||
|par_file={{{ImageFile2|}}} |
|||
|par_title={{{ImageName2|}}} |
|||
|par_size={{{ImageSize2|}}} |
|||
|par_alt={{{ImageAlt2|}}} |
|||
|par_caption={{{ImageCaption2|}}} |
|||
|par_ref={{{ImageFile2_Ref|}}} |
|||
|par_class={{{ImageClass2|}}} }} |
|||
<!-- Row 5/7 -->{{Chembox image sbs |
|||
|par_fileL={{{ImageFileL2|}}} |
|par_fileL={{{ImageFileL2|}}} |
||
|par_titleL={{{ImageNameL2|}}} |
|par_titleL={{{ImageNameL2|}}} |
||
Line 39: | Line 52: | ||
|par_captionL={{{ImageCaptionL2|}}} |
|par_captionL={{{ImageCaptionL2|}}} |
||
|par_refL={{{ImageFileL2_Ref|}}} |
|par_refL={{{ImageFileL2_Ref|}}} |
||
|par_classL={{{ImageClassL2|}}} |
|||
|par_fileR={{{ImageFileR2|}}} |
|par_fileR={{{ImageFileR2|}}} |
||
|par_titleR={{{ImageNameR2|}}} |
|par_titleR={{{ImageNameR2|}}} |
||
Line 44: | Line 58: | ||
|par_altR={{{ImageAltR2|}}} |
|par_altR={{{ImageAltR2|}}} |
||
|par_captionR={{{ImageCaptionR2|}}} |
|par_captionR={{{ImageCaptionR2|}}} |
||
|par_refR={{{ImageFileR2_Ref|} |
|par_refR={{{ImageFileR2_Ref|}}} |
||
|par_classR={{{ImageClassR2|}}} |
|||
<!-- Row 5/9 -->{{Chembox image |
|||
| |
|par_captionLR={{{ImageCaptionLR2|}}} }} |
||
<!-- Row 6/7 -->{{Chembox image |
|||
|par_title={{{ImageName2|}}} |
|||
|par_size={{{ImageSize2|}}} |
|||
|par_alt={{{ImageAlt2|}}} |
|||
|par_caption={{{ImageCaption2|}}} |
|||
|par_ref={{{ImageFile2_Ref|}}} }} |
|||
<!-- Row 6/9 -->{{Chembox image |
|||
|par_file={{{ImageFile3|}}} |
|par_file={{{ImageFile3|}}} |
||
|par_title={{{ImageName3|}}} |
|par_title={{{ImageName3|}}} |
||
Line 58: | Line 67: | ||
|par_alt={{{ImageAlt3|}}} |
|par_alt={{{ImageAlt3|}}} |
||
|par_caption={{{ImageCaption3|}}} |
|par_caption={{{ImageCaption3|}}} |
||
|par_ref ={{{ImageFile3_Ref|}}} |
|par_ref ={{{ImageFile3_Ref|}}} |
||
|par_class={{{ImageClass3|}}} }} |
|||
<!-- Row 7/9 -->{{Chembox image sbs |
|||
<!-- Row 7/7 -->{{Chembox image sbs |
|||
|par_fileL={{{ImageFileL3|}}} |
|par_fileL={{{ImageFileL3|}}} |
||
|par_titleL={{{ImageNameL3|}}} |
|par_titleL={{{ImageNameL3|}}} |
||
Line 66: | Line 76: | ||
|par_captionL={{{ImageCaptionL3|}}} |
|par_captionL={{{ImageCaptionL3|}}} |
||
|par_refL={{{ImageFileL3_Ref|}}} |
|par_refL={{{ImageFileL3_Ref|}}} |
||
|par_classL={{{ImageClassL3|}}} |
|||
|par_fileR={{{ImageFileR3|}}} |
|par_fileR={{{ImageFileR3|}}} |
||
|par_titleR={{{ImageNameR3|}}} |
|par_titleR={{{ImageNameR3|}}} |
||
Line 71: | Line 82: | ||
|par_altR={{{ImageAltR3|}}} |
|par_altR={{{ImageAltR3|}}} |
||
|par_captionR={{{ImageCaptionR3|}}} |
|par_captionR={{{ImageCaptionR3|}}} |
||
|par_refR={{{ImageFileR3_Ref|} |
|par_refR={{{ImageFileR3_Ref|}}} |
||
|par_classR={{{ImageClassR3|}}} |
|||
<!-- Row 8/9 -->{{Chembox image sbs |
|||
| |
|par_captionLR={{{ImageCaptionLR3|}}} |
||
}} |
|||
|par_titleL={{{ImageNameL4|}}} |
|||
<!-- |
|||
|par_sizeL={{{ImageSizeL4|}}} |
|||
ImageCaptionAll |
|||
|par_altL={{{ImageAltL4|}}} |
|||
--> |
|||
|par_captionL={{{ImageCaptionL4|}}} |
|||
{{#if:{{{ImageCaptionAll|}}} |{{Chembox image caption all |par_caption={{{ImageCaptionAll}}} }}}}<!-- |
|||
|par_refL={{{ImageFileL4_Ref|}}} |
|||
|par_fileR={{{ImageFileR4|}}} |
|||
|par_titleR={{{ImageNameR4|}}} |
|||
|par_sizeR={{{ImageSizeR4|}}} |
|||
|par_altR={{{ImageAltR4|}}} |
|||
|par_captionR={{{ImageCaptionR4|}}} |
|||
|par_refR={{{ImageFileR4_Ref|}}} }} |
|||
<!-- Row 9/9 -->{{Chembox image |
|||
|par_file={{{ImageFile4|}}} |
|||
|par_title={{{ImageName4|}}} |
|||
|par_size={{{ImageSize4|}}} |
|||
|par_alt={{{ImageAlt4|}}} |
|||
|par_caption={{{ImageCaption4|}}} |
|||
|par_ref={{{ImageFile4_Ref|}}}}}<!-- No ImageFile entered for rows 1-4; row 5+ cannot be initial image |
|||
-->}}<!-- |
-->}}<!-- |
||
NAMES ----- --> |
NAMES ----- --> |
||
Line 97: | Line 95: | ||
{{Chembox AllOtherNames |
{{Chembox AllOtherNames |
||
|ref={{{Names_ref|}}} |
|ref={{{Names_ref|}}} |
||
|pronounce={{{pronounce|}}} |
|||
|IUPACName={{{IUPACName|}}} {{{IUPACNames|}}}<!-- plural indicated by editor --> |
|IUPACName={{{IUPACName|}}} {{{IUPACNames|}}}<!-- plural indicated by editor --> |
||
|PIN={{{PIN|}}} |
|PIN={{{PIN|}}} |
||
Line 113: | Line 112: | ||
{{{Section8|}}} |
{{{Section8|}}} |
||
{{{Section9|}}}<!-- |
{{{Section9|}}}<!-- |
||
----- SUPPLEMENT ----- --> |
----- SUPPLEMENT (data page) ----- --> |
||
{{Chembox Datapage check |
|||
{{#ifexist:{{{data page pagename|{{FULLPAGENAME}} (data page)}}} |
|||
| {{ |
| _targetpage={{#if:{{{data page pagename|}}}|{{{data page pagename|}}}|{{FULLPAGENAME}} (data page)}} |
||
}}<!-- |
}}<!-- |
||
------ FOOTER ----- |
------ FOOTER ----- |
||
the visual footer, see also Footer/tracking (below). --> |
|||
{{Chembox Footer |
|||
{{yesno|1={{First nonempty|1={{{show_footer|}}}|2={{yesno|1={{{container_only|no}}}|yes=no|no=yes}}<!-- inversion needed per logic -->}} |
|||
|yes={{Chembox Footer |
|||
| Verifiedfields={{{Verifiedfields|}}} |
| Verifiedfields={{{Verifiedfields|}}} |
||
| Watchedfields={{{Watchedfields|}}} |
| Watchedfields={{{Watchedfields|}}} |
||
Line 125: | Line 128: | ||
| show_infobox_ref={{{show_infobox_ref|yes}}} |
| show_infobox_ref={{{show_infobox_ref|yes}}} |
||
| general_note={{{general_note|}}} |
| general_note={{{general_note|}}} |
||
| width={{{width|22em}}}<!-- infobox width setting, here for feedback only |
|||
| style-left-column-width=40%<!-- sets left colomn width --> |
|||
end footer -->|no= }} |
|||
| width={{{width|22em}}}<!-- infobox width setting, here for feedback |
|||
-->| _hasImage={{{ImageFile|}}}{{{ImageFile1|}}}{{{ImageFile2|}}}{{{ImageFile3|}}}{{{ImageFile4|}}}{{{ImageFileL1|}}}{{{ImageFileR1|}}}{{{ImageFileL2|}}}{{{ImageFileR2|}}}<!-- the verified images -->{{{ImageFileL3|}}}{{{ImageFileR3|}}}{{{ImageFileL4|}}}{{{ImageFileR4|}}}<!-- all 13 images |
|||
}} |
|||
-->| _hasLocalImage=<!-- Check if file is local/not above L2, R2 |
|||
|}<!-- END of wikitable (=infobox table) |
|||
--><includeonly><!-- |
|||
-->{{#if:{{yesno|1={{{container_only|no}}}|yes=yes|no=}} |
|||
|<!-- container_only: -->{{Chembox Footer/tracking_container_only}} |
|||
|<!-- regular tracking -->{{Chembox Footer/tracking<!-- subtemplate, outside of Footer. See also headerbar (esp in Identifiers). |
|||
-->| _hasImage={{{ImageFile|}}}{{{ImageFile1|}}}{{{ImageFile2|}}}{{{ImageFile3|}}}{{{ImageFileL1|}}}{{{ImageFileL2|}}}<!-- the verified images -->{{{ImageFileL3|}}}<!-- R-images not checked here |
|||
Images in row 8-9 |
|||
-->| _hasImageSizeSet={{{ImageSize|}}}{{{ImageSize1|}}}{{{ImageSize2|}}}{{{ImageSize3|}}}<!-- |
|||
-->| _hasImagePairSizeSet={{{ImageSizeL1|}}}{{{ImageSizeL2|}}}{{{ImageSizeL3|}}}{{{ImageSizeR1|}}}{{{ImageSizeR2|}}}{{{ImageSizeR3|}}}<!-- |
|||
-->| _hasLocalImage=<!-- Check if file is local; not above L2, R2 |
|||
-->{{#switch: en |
-->{{#switch: en |
||
|{{ParmPart |5 |{{filepath:{{{ImageFile|}}}}}}} |
|{{ParmPart |5 |{{filepath:{{{ImageFile|}}}}}}} |
||
Line 134: | Line 151: | ||
|{{ParmPart |5 |{{filepath:{{{ImageFile2|}}}}}}} |
|{{ParmPart |5 |{{filepath:{{{ImageFile2|}}}}}}} |
||
|{{ParmPart |5 |{{filepath:{{{ImageFile3|}}}}}}} |
|{{ParmPart |5 |{{filepath:{{{ImageFile3|}}}}}}} |
||
|{{ParmPart |5 |{{filepath:{{{ImageFile4|}}}}}}} |
|||
|{{ParmPart |5 |{{filepath:{{{ImageFileL1|}}}}}}} |
|{{ParmPart |5 |{{filepath:{{{ImageFileL1|}}}}}}} |
||
|{{ParmPart |5 |{{filepath:{{{ImageFileR1|}}}}}}} |
|{{ParmPart |5 |{{filepath:{{{ImageFileR1|}}}}}}} |
||
|{{ParmPart |5 |{{filepath:{{{ImageFileL2|}}}}}}} |
|{{ParmPart |5 |{{filepath:{{{ImageFileL2|}}}}}}} |
||
|{{ParmPart |5 |{{filepath:{{{ImageFileR2|}}}}}}}=yes }}<!-- |
|{{ParmPart |5 |{{filepath:{{{ImageFileR2|}}}}}}}=yes }}<!-- |
||
-->| _hasDeprecatedParams1=<!-- |
|||
HAS STYLE SETTINGS |
|||
-->| _hasDeprecatedParams2=<!-- |
|||
-->| |
-->| _hasTrackedStyleSettings={{{width|}}}{{{style|}}}{{{show_ss_note|}}}{{{show_infobox_ref|}}}{{{general_note|}}}{{{show_footer|}}}<!-- |
||
-->| _hasTrackedParams2=<!-- image rows 7-8-9 -->{{{ImageFileL3|}}}{{{ImageNameL3|}}}{{{ImageSizeL3|}}}{{{ImageAltL3|}}}{{{ImageCaptionL3|}}}{{{ImageFileL3_Ref|}}}{{{ImageFileR3|}}}{{{ImageNameR3|}}}{{{ImageSizeR3|}}}{{{ImageAltR3|}}}{{{ImageCaptionR3|}}}{{{ImageFileR3_Ref|}}}<!-- Row 8/9 -->{{{ImageFileL4|}}}{{{ImageNameL4|}}}{{{ImageSizeL4|}}}{{{ImageAltL4|}}}{{{ImageCaptionL4|}}}{{{ImageFileL4_Ref|}}}{{{ImageFileR4|}}}{{{ImageNameR4|}}}{{{ImageSizeR4|}}}{{{ImageAltR4|}}}{{{ImageCaptionR4|}}}{{{ImageFileR4_Ref|}}}<!-- Row 9/9 -->{{{ImageFile4|}}}{{{ImageName4|}}}{{{ImageSize4|}}}{{{ImageAlt4|}}}{{{ImageCaption4|}}}{{{ImageFile4_Ref|}}}<!-- |
|||
TEMPORAL TRACKING: (optionaly determine and add a sortletter here) |
|||
end footer -->}} |
|||
-->|_trackListSortletter = <!-- unused Oct2020 |
|||
|}<!-- end of wikitable |
|||
end of Chembox tracking subtemplate |
|||
-->}}}}</includeonly><!-- |
|||
-->{{#invoke:TemplatePar |
-->{{#invoke:TemplatePar |
||
|check |
|check |
||
|template=Template:Chembox |
|template=Template:Chembox |
||
|all= |opt= Reference= Chembox_ref= IUPACNames= IUPACName= ImageAlt1= ImageAlt2= ImageAlt3 |
|all= |opt= Reference= Chembox_ref= IUPACNames= IUPACName= ImageAlt1= ImageAlt2= ImageAlt3= ImageAltL1= ImageAltL2= ImageAltL3= ImageAltR1= ImageAltR2= ImageAltR3= ImageAlt= ImageCaption1= ImageCaption2= ImageCaption3= ImageCaptionL1= ImageNameR1= ImageCaptionL2= ImageCaptionL3= ImageCaptionR1= ImageCaptionR2= ImageCaptionR3= ImageCaptionLR1= ImageCaptionLR2= ImageCaptionLR3= ImageCaption= ImageFile1_Ref= ImageFile1= ImageFile2_Ref= ImageFile2= ImageFile3_Ref= ImageFile3= ImageFileL1_Ref= ImageFileL1= ImageFileL2_Ref= ImageFileL2= ImageFileL3_Ref= ImageFileL3= ImageFileR1_Ref= ImageFileR1= ImageFileR2_Ref= ImageFileR2= ImageFileR3_Ref= ImageFileR3= ImageFile_Ref= ImageFile= ImageName1= ImageName2= ImageName3= ImageNameL1= ImageNameL2= ImageNameL3= ImageNameR2= ImageNameR3= ImageName= ImageSize1= ImageSize2= ImageSize3= ImageSizeL1= ImageSizeL2= ImageSizeL3= ImageSizeR1= ImageSizeR2= ImageSizeR3= ImageSize= ImageClass= ImageClass1= ImageClass2= ImageClass3= ImageClassL1= ImageClassR1= ImageClassL2= ImageClassR2= ImageClassL3= ImageClassR3= Name= OtherNames= pronounce= PIN= Section1= Section2= Section3= Section4= Section5= Section6= Section7= Section8= Section9= SystematicName= Verifiedfields= Watchedfields= verifiedrevid= Verifiedimages= data page pagename= general_note= show_infobox_ref= show_ss_note= show_footer= style= width= container_only= |
||
|cat=Chemical articles with unknown parameter in Chembox |
|||
|cat=Pages using Chembox with unknown parameters |
|||
|format=0|preview={{Chembox templatePar/formatPreviewMessage|msg=@@@}}|errNS=0}}<!-- |
|format=0|preview={{Chembox templatePar/formatPreviewMessage|msg=@@@}}|errNS=0}}<!-- |
||
-->{{short description|Chemical compound|noreplace}}<!--Don't place on top as usual since that requires an extra newline to not break the table which could cause formatting issues. |
|||
--><noinclude>{{documentation}}</noinclude> |
--><noinclude>{{documentation}}</noinclude> |
Latest revision as of 17:36, 17 May 2024
Except where otherwise noted, data are given for materials in their standard state (at 25 °C [77 °F], 100 kPa).
|
This template is used on approximately 15,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template adds an automatically generated short description. If the automatic short description is not optimal, replace it by adding {{Short description}} at the top of the article. |
This template uses Lua: |
This template uses TemplateStyles: |
Template {{Chembox}}
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".
Usage
The Chembox 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 chembox template (with its own parameters like |ImageFile=
and |IUPACName=
), each section is added with this pattern (as the value of a parameter |Sectionx=
.
{{Chembox
| ImageFile =
| IUPACName =
<!-- more general Chembox parameters here -->
| Section1 = {{Chembox 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# = {{Chembox "
and ends with "}}"
. Sections cannot 'nest': one must close one section with }}
before adding another |Section#= {{Chembox ...
.
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
}}
| (nextparameter)= <!-- etc. -->
Small, simple form
To use, simply copy and paste the left column into the document, filling in whatever you can, and save:
{{Chembox
<!-- Images -->
| ImageFile =
| ImageSize =
| ImageAlt =
<!-- Names -->
| IUPACName =
| OtherNames =
<!-- Sections -->
| Section1 = {{Chembox Identifiers
| CASNo =
| PubChem =
| SMILES =
}}
| Section2 = {{Chembox Properties
| Formula =
| MolarMass =
| Appearance =
| Density =
| MeltingPt =
| BoilingPt =
| Solubility =
}}
| Section3 = {{Chembox Hazards
| MainHazards =
| FlashPt =
| AutoignitionPt =
}}
}}
|
Medium form
To use, simply copy and paste the left column into the document, filling in whatever you can:
{{Chembox
| Reference =
<!-- Names -->
| Name =
| IUPACName =
| PIN =
| SystematicName =
| OtherNames = {{Unbulleted list
| ''name1''
| ''name2''
...
| ''name50''
}}
| data page pagename =
<!-- Images -->
| ImageFile =
| ImageSize =
| ImageAlt =
| ImageName =
| ImageClass =
| ImageCaption =
| ImageFile1 =
| ImageSize1 =
| ImageAlt1 =
| ImageName1 =
| ImageClass1 =
| ImageCaption1 =
| ImageFile2 =
| ImageSize2 =
| ImageAlt2 =
| ImageName2 =
| ImageClass2 =
| ImageCaption2 =
| ImageFile3 =
| ImageSize3 =
| ImageAlt3 =
| ImageName3 =
| ImageClass3 =
| ImageFileL1 =
| ImageSizeL1 =
| ImageAltL1 =
| ImageNameL1 =
| ImageClassL1 =
| ImageFileR1 =
| ImageSizeR1 =
| ImageAltR1 =
| ImageNameR1 =
| ImageClassR1 =
| ImageFileL2 =
| ImageSizeL2 =
| ImageAltL2 =
| ImageNameL2 =
| ImageClassL2 =
| ImageFileR2 =
| ImageSizeR2 =
| ImageAltR2 =
| ImageNameR2 =
| ImageClassR2 =
<!-- Sections -->
| Section1 = {{Chembox Identifiers
| 3DMet =
| Abbreviations =
| Beilstein =
| CASNo =
| CASNo_Comment =
| CASNoOther =
| ChEBI =
| ChemSpiderID =
| EINECS =
| EC_number =
| EC_number_Comment=
| Gmelin =
| InChI =
| KEGG =
| MeSHName =
| PubChem =
| RTECS =
| SMILES =
| UNNumber =
}}
| Section2 = {{Chembox Properties
| AtmosphericOHRateConstant =
| Appearance =
| BoilingPt =
| BoilingPtC =
| BoilingPt_ref =
| BoilingPt_notes=
| Density =
| Formula =
| HenryConstant =
| LogP =
| MolarMass =
| MeltingPt =
| MeltingPtC =
| MeltingPt_ref =
| MeltingPt_notes=
| pKa =
| pKb =
| Solubility =
| SolubleOther =
| Solvent =
| VaporPressure =
}}
| Section3 = {{Chembox Structure
| Coordination =
| CrystalStruct =
| MolShape =
}}
| Section4 = {{Chembox Thermochemistry
| DeltaGf =
| DeltaHc =
| DeltaHf =
| Entropy =
| HeatCapacity =
}}
| Section5 = {{Chembox Explosive
| ShockSens =
| FrictionSens =
| DetonationV =
| REFactor =
}}
| Section6 = {{Chembox Pharmacology
| ATCvet =
| ATCCode_prefix =
| ATCCode_suffix =
| ATC_Supplemental=
| AdminRoutes =
| Bioavail =
| Excretion =
| HalfLife =
| Metabolism =
| Legal_status =
| Legal_AU =
| Legal_AU_comment=
| Legal_CA =
| Legal_CA_comment=
| Legal_NZ =
| Legal_NZ_comment=
| Legal_US =
| Legal_US_comment=
| Legal_UK =
| Legal_UK_comment=
| Legal_EU =
| Legal_EU_comment=
| Legal_UN =
| Legal_UN_comment=
| Pregnancy_category =
| Pregnancy_AU =
| Pregnancy_AU_comment =
| ProteinBound =
| Dependence_liability =
}}
| Section7 = {{Chembox Hazards
| AutoignitionPt =
| ExploLimits =
| FlashPt =
| LD50 =
| LC50 =
| MainHazards =
| NFPA-H =
| NFPA-F =
| NFPA-I =
| NFPA-S =
| PEL =
| REL =
| ExternalSDS =
| GHSPictograms =
| GHSSignalWord =
| HPhrases =
| PPhrases =
}}
| Section9 = {{Chembox Related
| OtherAnions =
| OtherCations =
| OtherFunction =
| OtherFunction_label =
| OtherCompounds =
}}
}}
|
. Reference, use |
Full form
To use, simply copy and paste the left column into the document, and press save to get an empty Chembox:
|
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 =
| 3DMet=
| 3DMet1=
| 3DMet5=
| 3DMetOther=
| EC_number1=
| EC_number5=
| EC_numberOther=
| RTECS1=
| RTECS5=
| RTECSOther=
|
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, 3DMet, EC_number, RTECS
- Then
|_Other=
(like|CASNoOther=
) is available for free text input.
Same substance, same index
When the chembox 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.
{{chembox
| Name = [[Linalool]]
|Section1 = {{Chembox 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
| CASNo_Ref = {{cascite|correct|CAS}}
| PubChem = 6549
| PubChem1 = 443158
| PubChem2 = 67179
}}
}}
Identifiers | |
---|---|
| |
PubChem CID
|
- For specific additions, each parameter has a
|_Comment=
option.
| CASNo_Comment =
| CASNo1_Comment =
| CASNo5_Comment =
- Use of the
|CASNo_Ref={{cascite|correct|CAS}}
parameter with argument places a small, green check mark, , after the CAS No., which indicates that an editor has confirmed that the CAS No. is correct. A red x in an infobox that follows any identifier means it has not been verified. See WP:CHEMVAL for more details.
Section subtemplates
The following section subtemplates are available:
- {{Chembox Identifiers}}
- {{Chembox Properties}}
- {{Chembox Structure}}
- {{Chembox Thermochemistry}}
- {{Chembox Explosive}}
- {{Chembox Pharmacology}}
- {{Chembox Hazards}}
- {{Chembox 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 = {{Chembox Identifiers}}
| Section2 = {{Chembox Properties}}
| Section3 = {{Chembox Structure}}
| Section4 = {{Chembox Thermochemistry}}
| Section5 = {{Chembox Explosive}}
| Section6 = {{Chembox Pharmacology}}
| Section7 = {{Chembox Hazards}}
| Section9 = {{Chembox Related}}
Sections that are not used can be safely removed, renumbering is not necessary.
Container only
{{Chembox}} can be used to show a subsection only, for example Section3={{Chembox Hazards|...}}
. When set |container_only=yes
: The main {{Chembox}} is not tracked at all (image checks, bot validation categories, etc.), and the Footer (with STP notice) is suppressed. Example: Bromine#Biological role and toxicity. The article will be listed in Category:Chembox container only (47).
Automatic generation
The Wikipedia Drugbox and Chembox Maker can be used to automatically generate chembox templates. For quicker access, this tool can be added to the tools section of Wikipedia's left sidebar via User:Qwerfjkl/scripts/chemboxmaker. The Wikipedia template filling tool by Diberri and Boghog is another option for automatic chembox generation but fills fewer fields.
Adding images
Parameters
Image parameters for the first images:
{{Chembox
<!-- Other chembox parameters can go here -->
<!-- Row 1/7 -->
| ImageFile =
| ImageName =
| ImageSize =
| ImageAlt =
| ImageCaption =
| ImageFile_Ref =
| ImageClass =
<!-- Row 2/7 -->
| ImageFile1 =
| ImageName1 =
| ImageSize1 =
| ImageAlt1 =
| ImageCaption1 =
| ImageFile1_Ref =
| ImageClass1 =
<!-- Row 3/7 -->
| ImageFileL1 =
| ImageNameL1 =
| ImageSizeL1 =
| ImageAltL1 =
| ImageCaptionL1 =
| ImageFileL1_Ref=
| ImageClassL1 =
| ImageFileR1 =
| ImageNameR1 =
| ImageSizeR1 =
| ImageAltR1 =
| ImageCaptionR1 =
| ImageFileR1_Ref=
| ImageClassR1 =
| ImageCaptionL1R1=
<!-- More chembox parameters can go here, like |Section1=... -->
}}
Examples
Image parameters for an image (example: File1). All are optional.
A caption shows here
|
{{Chembox
| ImageFile1 = Furfural.svg
| ImageAlt1 = Skeleton formula of a ring of four carbons and one oxygen, with a carbon-oxygen attached to a carbon next to an oxygen
| ImageName1 =
| ImageCaption1 = A caption shows here
| ImageSize1 =
| ImageFile1_Ref = ref
| ImageClass1 = skin-invert <!-- Use this for black-on-transparent chemical diagrams -->
}}
Adding two images:
{{Chembox
| ImageFile = Furfural.svg
| ImageAlt = Skeleton formula of a ring of four carbons and one oxygen, with a carbon-oxygen attached to a carbon next to an oxygen
| ImageClass = skin-invert
| ImageFile1 = Furfural-3D-vdW.png
| ImageAlt1 = 3D filled-sphere model of the same molecule
}}
This gives two images, each image on his own row (note, ImageFile is the first image, ImageFile1 is the second).
Adding two images, side by side (L1 and R1):
|
{{Chembox
| ImageFileL1 = Furfural.svg
| ImageAltL1 = Skeleton formula of a ring of four carbons and one oxygen, with a carbon-oxygen attached to a carbon next to an oxygen
| ImageClassL1 = skin-invert
| ImageFileR1 = Furfural-3D-vdW.png
| ImageAltR1 = 3D filled-sphere model of the same molecule
}}
This gives one row with two images. Note that ImageFile is now not supplied.
Multiple images
row 1 | ImageFile | |
row 2 | ImageFile1 | |
row 3 | ImageFileL1 | ImageFileR1 |
row 4 | ImageFile2 | |
row 5 | ImageFileL2 | ImageFileR2 |
row 6 | ImageFile3 | |
row 7 | ImageFileL3 | ImageFileR3 |
This gives the possibility to play a bit with which image is first (rows with empty parameters are not displayed). Example:
| |||
Names | |||
---|---|---|---|
IUPAC name
example
| |||
{{Chembox
| ImageFileL1 = Furfural.svg
| ImageAltL1 = Skeleton formula of a ring of four carbons and one oxygen, with a carbon-oxygen attached to a carbon next to an oxygen
| ImageFileR1 = Furfural-3D-vdW.png
| ImageSizeR1 =
| ImageAltR1 = 3D filled-sphere model of the same molecule
| ImageClassR1 = skin-invert
| ImageFile2 = Water droplet blue bg05.jpg
| ImageAlt2 = Water droplet erupting from the center of a concentric ring of ripples, evidently in response to a drop landing in the water just before
| IUPACName = example
}}
This gives one row with two images, and one row with one image.
Names
{{Chembox
<!-- Names -->
| Name =
| IUPACName =
| IUPACNames =
| PIN =
| SystematicName =
| OtherNames =
<!-- other parameters -->
}}
|
Infobox title (Pagetitle is default) IUPAC name Using -s makes section header plural Preferred IUPAC name Systematic IUPAC name List of all other name(s) |
Example
Names | |
---|---|
IUPAC names
A, B
| |
Preferred IUPAC name
PIN | |
Systematic IUPAC name
SYS | |
Other names
|
{{Chembox
| Name = ''cis''-3-Hexen-1-ol
| IUPACNames = A, B
| PIN = PIN
| SystematicName = SYS
| OtherNames = {{Unbulleted list|X|Y|Z}}
| show_footer = no
}}
Input from Wikidata
- E number (P628) (see uses)
- ECHA Substance Infocard ID (P2566) (see uses)
- DSSTox substance ID (P3117) (see uses)
E number, ECHA InfoCard ID, |DTXSID=
(CompTox Chemicals Dashboard) are read from Wikidata.
Maintenance
Troubleshooting
- When supplying a parameter with a value, and nothing or the wrong value shows up, check:
- Is the parameter placed in the correct section?
- Are the sections properly defined? Sections start with | Section# = {{Chembox sectionname |" and end with "}}".
- Is there inconsistency in the Section numbering? Available numbers for sections are 1–9.
Tracking categories
TemplateData
TemplateData for Chembox
An infobox for chemicals. It has a large number of options to add relevant data and images. The Chembox 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). Please see this template's page for full documentation.
|
See also
- {{Infobox drug}} (aka Drugbox)
- Wikipedia Drugbox and Chembox Maker