Template:Chembox/doc

Template 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.

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  and ends with. Sections cannot 'nest': one must close one section with  before adding another {{para|Section#| {{Chembox ... }}.

Keep in mind the advice in the main Infobox documentation to use the {{tl|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 {{para|OtherNames}}, since many names use commas within them, and using commas as separators leads to ambiguity. For example:  | 2,4,6(1H,3H,5H)-pyrimidinetrione | 2,4,6-trioxohexahydropyrimidine | pyrimidinetriol | malonylurea | 6-hydroxyuracil | N,N-(1,3-dioxo-1,3-propanediyl)urea }}
 * OtherNames = {{Unbulleted list
 * (next parameter) =

Small, simple form
To use, simply copy and paste the left column into the document, filling in whatever you can, and save:

Medium form
To use, simply copy and paste the left column into the document, filling in whatever you can:

Full form
To use, simply copy and paste the left column into the document, and press save to get an empty Chembox:

{| 
 * - style="vertical-align:top;"

Chembox: Template name
 * Name: title above the box (DEFAULT: article name)
 * filename.svg (not [[image:filename.svg]]
 * picture size (example: ImageSize = 100px, default = 200px)
 * alt text for picture (example: Fine dry white powder)
 * Picture caption (example: Oxygen in liquid form)


 * the IUPAC name
 * hide IUPAC name if very long; show-button is displayed
 * the systematic name
 * any other name
 * reference; include s, add


 * 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.


 * CASNo_Comment =
 * CASNo1_Comment =
 * CASNo5_Comment =
 * For specific additions, each parameter has a _Comment option.

Section subtemplates
The following section subtemplates are available: And the automated section, that is visible when 'pagename (data page)' exists: See these subsections for their parameter options.
 * Chembox Identifiers
 * Chembox Properties
 * Chembox Structure
 * Chembox Thermochemistry
 * Chembox Explosive
 * Chembox Pharmacology
 * Chembox Hazards
 * Chembox Related
 * Chembox Supplement

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: Sections that are not used can be safely removed, renumbering is not necessary.
 * Section1 =
 * Section2 =
 * Section3 =
 * Section4 =
 * Section5 =
 * Section6 =
 * Section7 =
 * Section9 =

Parameters
Image parameters for the first images:

Examples
Image parameters for an image (example: File1). All are optional.



Adding two images:



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):



This gives one row with two images. Note that ImageFile is now not supplied.

Multiple images
This gives the possibility to play a bit with which image is first (rows with empty parameters are not displayed). Example:



This gives one row with two images, and one row with one image.

Input from Wikidata
E number and ECHA InfoCard ID are read from Wikidata.

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# = ".
 * Is there inconsistency in the Section numbering? Available numbers for sections are 1 – 9.

Template Data
{	"params": { "width": { "label": "Width", "description": "The overall width of the box; the default is normally fine. Using the unit \"em\" helps the box scale for different font sizes.", "example": "22 em", "default": "22 em" },		"style": { "label": "Custom CSS", "description": "Any additional CSS to apply to the box; see the width parameter to set the width." },		"Name": { "label": "Name", "description": "Compound name for the chembox's title. Defaults to the page title.", "example": "Ethanoic acid", "type": "string", "default": "Page title.", "suggested": true },		"Reference": { "label": "Title reference", "description": "A reference to be shown in the title. Use tags or equivalent, such as .", "type": "content" },		"Chembox_ref": { "label": "Title reference (2)", "description": "Equivalent to the title reference parameter; appears second if both are provided." },		"ImageFile": { "label": "Image file (top row, full width)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name", "suggested": true },		"ImageFile1": { "label": "Image file (second row; full width)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name" },		"ImageFile2": { "label": "Image file (fourth row, full width)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name" },		"ImageFile3": { "label": "Image file (sixth row; full width)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name" },		"ImageFileL1": { "label": "Image file (third row, left half)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name" },		"ImageFileR1": { "label": "Image file (third row, right half)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name" },		"ImageFileL2": { "label": "Image file (fifth row, left half)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name" },		"ImageFileR2": { "label": "Image file (fifth row, right half)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name" },		"ImageFileL3": { "label": "Image file (seventh row, left half)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name" },		"ImageFileR3": { "label": "Image file (seventh row, right half)", "description": "An image file to display; omit \"File:\".", "type": "wiki-file-name" },		"ImageName": { "label": "Image name (first row, full width)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSize": { "label": "Image size (first row, full width)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "220px" },		"ImageAlt": { "label": "Image alt text (first row, full width)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaption": { "label": "Image caption (first row, full width)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFile_Ref": { "label": "Image reference (first row, full width)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageName1": { "label": "Image name (second row, full width)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSize1": { "label": "Image size (second row, full width)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "220px" },		"ImageAlt1": { "label": "Image alt text (second row, full width)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaption1": { "label": "Image caption (second row, full width)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFile1_Ref": { "label": "Image reference (second row, full width)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageNameL1": { "label": "Image name (third row, left half)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSizeL1": { "label": "Image size (third row, left half)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "110px" },		"ImageAltL1": { "label": "Image alt text (third row, left half)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaptionL1": { "label": "Image caption (third row, left half)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFileL1_Ref": { "label": "Image reference (third row, left half)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageNameR1": { "label": "Image name (third row, right half)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSizeR1": { "label": "Image size (third row, right half)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "110px" },		"ImageAltR1": { "label": "Image alt text (third row, right half)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaptionR1": { "label": "Image caption (third row, right half)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFileR1_Ref": { "label": "Image reference (third row, right half)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageName2": { "label": "Image name (fourth row, full width)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSize2": { "label": "Image size (fourth row, full width)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "220px" },		"ImageAlt2": { "label": "Image alt text (fourth row, full width)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaption2": { "label": "Image caption (fourth row, full width)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFile2_Ref": { "label": "Image reference (fourth row, full width)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageNameL2": { "label": "Image name (fifth row, left half)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSizeL2": { "label": "Image size (fifth row, left half)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "110px" },		"ImageAltL2": { "label": "Image alt text (fifth row, left half)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaptionL2": { "label": "Image caption (fifth row, left half)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFileL2_Ref": { "label": "Image reference (fifth row, left half)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageNameR2": { "label": "Image name (fifth row, right half)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSizeR2": { "label": "Image size (fifth row, right half)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "110px" },		"ImageAltR2": { "label": "Image alt text (fifth row, right half)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaptionR2": { "label": "Image caption (fifth row, right half)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFileR2_Ref": { "label": "Image reference (fifth row, right half)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageCaptionLR2": { "label": "Image caption (fifth row, left and right halves)", "description": "Image caption for both halves of row 5.", "type": "content" },		"ImageName3": { "label": "Image name (sixth row, full width)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSize3": { "label": "Image size (sixth row, full width)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "220px" },		"ImageAlt3": { "label": "Image alt text (sixth row, full width)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaption3": { "label": "Image caption (sixth row, full width)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFile3_Ref": { "label": "Image reference (sixth row, full width)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageNameL3": { "label": "Image name (seventh row, left half)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSizeL3": { "label": "Image size (seventh row, left half)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "110px" },		"ImageAltL3": { "label": "Image alt text (seventh row, left half)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaptionL3": { "label": "Image caption (seventh row, left half)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFileL3_Ref": { "label": "Image reference (seventh row, left half)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageNameR3": { "label": "Image name (seventh row, right half)", "description": "If set, this is the title of the image; it appears if you hover over it.", "type": "string" },		"ImageSizeR3": { "label": "Image size (seventh row, right half)", "description": "Image width in pixels, with px suffix.", "example": "200px", "type": "string", "default": "110px" },		"ImageAltR3": { "label": "Image alt text (seventh row, right half)", "description": "The text description read out to users who cannot see the image.", "type": "string" },		"ImageCaptionR3": { "label": "Image caption (seventh row, right half)", "description": "Caption displayed below the image.", "type": "content" },		"ImageFileR3_Ref": { "label": "Image reference (seventh row, right half)", "description": "A reference for this image. Use tags or equivalent such as .", "type": "content" },		"ImageCaptionLR3": { "label": "Image caption (seventh row, left and right halves)", "description": "Image caption for both halves of row 7", "type": "content" },		"ImageCaptionAll": { "label": "Image caption (all)", "description": "An overall image caption.", "type": "content" },		"OtherNames": { "label": "Other names", "description": "A list of other names. Using the template is recommended, as separating names with commas can be ambiguous.", "example": "Ethanoic acid

Acetic acid",			"type": "content",			"suggested": true		},		"IUPACName": {			"label": "IUPAC name",			"description": "For a single name. Use IUPAC names for a plural.",			"type": "content",			"suggested": true		},		"IUPACNames": {			"label": "IUPAC names",			"description": "For multiple names. Use IUPAC name for the singular.",			"type": "content"		},		"PIN": {			"label": "Preferred IUPAC name",			"type": "content"		},		"SystematicName": {			"label": "Systematic IUPAC name",			"type": "content",			"suggested": true		},		"Names_ref": {			"label": "Names reference",			"description": "A reference for the names. Use tags or equivalent such as .",			"type": "content"		},		"pronounce": {			"label": "Pronunciation",			"type": "content"		},		"Section1": {			"label": "Section 1",			"description": "A section sub-template with more information. One of, , , , , , , or .",			"type": "content",			"suggested": true		},		"Section2": {			"label": "Section 2",			"description": "A section sub-template with more information. One of, , , , , , , or .",			"type": "content",			"suggested": true		},		"Section3": {			"label": "Section 3",			"description": "A section sub-template with more information. One of, , , , , , , or .",			"type": "content",			"suggested": true		},		"Section4": {			"label": "Section 4",			"description": "A section sub-template with more information. One of, , , , , , , or .",			"type": "content",			"suggested": true		},		"Section5": {			"label": "Section 5",			"description": "A section sub-template with more information. One of, , , , , , , or .",			"type": "content",			"suggested": true		},		"Section6": {			"label": "Section 6",			"description": "A section sub-template with more information. One of, , , , , , , or .",			"type": "content",			"suggested": true		},		"Section7": {			"label": "Section 7",			"description": "A section sub-template with more information. One of, , , , , , , or .",			"type": "content"		},		"Section8": {			"label": "Section 8",			"description": "A section sub-template with more information. One of, , , , , , , or .",			"type": "content"		},		"Section9": {			"label": "Section 9",			"description": "A section sub-template with more information. One of, , , , , , , or .",			"type": "content"		},		"show_footer": {			"label": "Show footer",			"description": "Set to no to hide the footer",			"type": "boolean",			"default": "Defaults to \"yes\""		},		"Verifiedfields": {			"label": "Verified fields",			"description": "Bot maintained; do not add, edit, or remove."		},		"Watchedfields": {			"label": "Watched fields",			"description": "Bot maintained; do not add, edit, or remove."		},		"verifiedrevid": {			"label": "Verified revision ID",			"description": "Bot maintained; do not add, edit, or remove."		},		"show_ss_note": {			"label": "Show standard state note",			"description": "Set to \"no\" to hide the standard state note.",			"type": "boolean"		},		"show_infobox_ref": {			"label": "Show infobox reference",			"description": "Set to \"no\" to hide the infobox reference notice."		},		"general_note": {			"label": "General note",			"description": "A general note to display in the bottom box.", "type": "content" },		"ImageCaptionLR1": { "label": "Image caption (third row, left and right halves)", "description": "Image caption for both halves of row 3.", "type": "content" },		"data page pagename": { "label": "Data page", "description": "Data page article name", "example": "Properties of water", "default": " (data page)" },		"Verifiedimages": { "description": "Bot-maintained parameter" }	},	"description": "Template is 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.", "format": "block", "paramOrder": [ "width", "style", "Name", "Reference", "Chembox_ref", "ImageFile", "ImageFile1", "ImageFileL1", "ImageFileR1", "ImageFile2", "ImageFileR2", "ImageFileL2", "ImageFile3", "ImageFileL3", "ImageFileR3", "ImageName", "ImageSize", "ImageAlt", "ImageCaption", "ImageFile_Ref", "ImageName1", "ImageSize1", "ImageAlt1", "ImageCaption1", "ImageFile1_Ref", "ImageNameL1", "ImageSizeL1", "ImageAltL1", "ImageCaptionL1", "ImageFileL1_Ref", "ImageNameR1", "ImageSizeR1", "ImageAltR1", "ImageCaptionR1", "ImageFileR1_Ref", "ImageCaptionLR1", "ImageName2", "ImageSize2", "ImageAlt2", "ImageCaption2", "ImageFile2_Ref", "ImageNameL2", "ImageSizeL2", "ImageAltL2", "ImageCaptionL2", "ImageFileL2_Ref", "ImageNameR2", "ImageSizeR2", "ImageAltR2", "ImageCaptionR2", "ImageFileR2_Ref", "ImageCaptionLR2", "ImageName3", "ImageSize3", "ImageAlt3", "ImageCaption3", "ImageFile3_Ref", "ImageNameL3", "ImageSizeL3", "ImageAltL3", "ImageCaptionL3", "ImageFileL3_Ref", "ImageNameR3", "ImageSizeR3", "ImageAltR3", "ImageCaptionR3", "ImageFileR3_Ref", "ImageCaptionLR3", "ImageCaptionAll", "OtherNames", "IUPACName", "IUPACNames", "PIN", "SystematicName", "Names_ref", "pronounce", "Section1", "Section2", "Section3", "Section4", "Section5", "Section6", "Section7", "Section8", "Section9", "show_footer", "Verifiedfields", "Watchedfields", "verifiedrevid", "show_ss_note", "show_infobox_ref", "general_note", "data page pagename", "Verifiedimages" ] }