Template:Chemical reaction
| This template uses TemplateStyles: |
A template to easily create depictions of chemical reaction schemes. This is meant to be a flexible, user-friendly and generic substitute for TM:Enzymatic reaction and TM:Biochem reaction subunit.
Usage
[edit]Construct a reaction scheme by joining the following subtemplates together:
- Template:Chemical reaction/compound
- Template:Chemical reaction/subunit
- Template:Chemical reaction/arrow
- Template:Chemical reaction/chemarw
- Template:Chemical reaction/text
Example
[edit]{{Chemical reaction|width=80%|
{{Chemical reaction/compound|Citrulline}}
{{Chemical reaction/text|+}}
{{Chemical reaction/compound|Aspartic acid|upright=0.7}}
{{Chemical reaction/text|+ [[Adenosine triphosphate|ATP]]}}
{{Chemical reaction/arrow
|uppercaption=[[Argininosuccinate synthase|ASS]]
|direction=reversible
|fwd_in ={{chem2|H2O}}|fwd_out=2P<sub>i</sub>
|rev_out={{chem2|H2O}}|rev_in =2P<sub>i</sub>
}}
{{Chemical reaction/subunit
|{{Chemical structure|Argininosuccinic acid|frameless|upright=0.7}}
|caption=[[Argininosuccinate|2-(''N''<sup>ω</sup>-<small>L</small>-arginino)succinate]]
}}
{{Chemical reaction/text|+ [[Adenosine monophosphate|AMP]]}}
}}
See testcases for additional examples.
Subtemplate documentation
[edit]These are usage summaries of the Chemical reaction subtemplates. For complete descriptions of parameters see the Template Data for each.
Chemical reaction/subunit
[edit]The generalized reaction component input for Template:Chemical reaction.
It can take any wikitext content in its first parameter (|1=). This is typically a file link, such as [[File:L-arginine.svg]]. Accepting wikitext like this has the benefit of accessing the extended image syntax and applying resizing through the use of frameless and upright, independently of other subunits.
The second parameter (|2=) will be used as a caption and linked by default. The linked target page can be overridden using the |link= parameter and the caption can be entirely overwritten using the |caption= parameter.
Chemical reaction/compound
[edit]A shortcut to produce a complete chemical reaction subunit from a single word input. Enter the name of a compound with a Wikipedia article and the reaction subunit is generated based on available Wikidata information. If an image is not associated with the name, the template will print out an error. Chemicals with a Wikidata entry, but no Wikipedia article can still be accessed through entering their Qualifier ID in the |qid= parameter.
The caption can be overwritten with the |caption= parameter, otherwise it will default to a link to the supplied name.
Chemical reaction/text
[edit]Adds arbitrary wikitext to the Template:Chemical reaction scheme via the first parameter (|1=). Typically used to add '+' signs or linked abbreviations of common, large compounds. Captions may be added via |caption=, but this is rarely used.
Text content is not wrapped, so be sure to add line breaks with <br> for longer stretches of text.
Chemical reaction/arrow
[edit]The default reaction arrow for use in Template:Chemical reaction schemes.
Supported arrow directions include forward, reverse, equilibrium and resonance—entered via the |direction= parameter (alternatively |dir=).
Additional short pieces of wikitext representing compounds that become included into the product(s) or are expelled during the reaction may be added directly to the arrow using the |fwd_in= and |fwd_out= parameters, respectively. For the reverse direction use the |rev_in= and |rev_out= parameters.
Labels of arbitrary wikitext may be included aboce and below the arrow via |uppercaption= and |lowercaption=, respectively.
Chemical reaction/chemarw
[edit]A reaction arrow for use in Template:Chemical reaction schemes that accommodates more verbose text labels above and below the arrow.
The size of this arrow is defined by the |length= parameter given in pixels. For compatibility with mobile displays this value typically should not exceed 200 pixels, but this will vary based on individual reaction schemes.
Supports forward-facing (default), reverse (|direction=reverse or rev), equilibrium (|direction=equilibrium, reversible or eqm) and resonance (|direction=resonance or res) arrows.
Simple captions may be entered above and below the arrow using |above= and |below=, respectively. Up to three items may be added above or below the arrow as a numbered list using |above1=, |above2=, |above3=, |below1=, |below2= and |below3=. Numbering below the arrow starts at a minimum of two.
TemplateData
[edit]TemplateData for Chemical reaction
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| content | 1content | Wikitext representing the chemical reaction
| String | required |
| width | width | CSS width parameter value for entire reaction scheme
| String | optional |