• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Biochem reaction subunit/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Biochem reaction subunit
This is the template sandbox page for Template:Biochem reaction subunit (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]

2 × Hydrogen peroxide

2 × 

Catalase

 
2 H2O
Rightward reaction arrow with minor product(s) to top right

Oxygen

This template creates subunits of a biochemical reaction. For example, three instances of it were used to demonstrate the reaction of catalase.

The template is based on the <div> element, rather than tables, and this allows it to be more flexible in its display. For example, "2 × Hydrogen peroxide" is likely to wrap across multiple lines, but this doesn't force all the other headers to expand to match. Some of the formatting is dependent on the user's browser supporting the flexbox layout system; the vast majority do, but you will see slight differences in spacing on legacy browsers, although efforts have been made to provide a fallback.

2 × Hydrogen peroxide

2 × 

Catalase

 
2 H2O
Rightward reaction arrow with minor product(s) to top right

Oxygen

The second example shows the same code, but constrained to 200 px wide; the content wraps, which is particularly useful for longer pathways and mobile devices.

Example code

edit
 <div style="display: flex; flex-flow: row wrap; width:300px; max-width: 100%">
 {{Biochem_reaction_subunit|compound=Hydrogen peroxide|image=Hydrogen-peroxide-3D-balls.png|n=2}}
 {{Biochem_reaction_subunit|enzyme=Catalase|for_prod=2 H<sub>2</sub>O}}
 {{Biochem_reaction_subunit|compound=Oxygen|image=Oxygen molecule.png}}
 </div>

Parameters

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Biochem reaction subunit in articles based on its TemplateData.

TemplateData for Biochem reaction subunit

This creates a subunit of a reaction: either chemical, or a reaction arrow with an enzyme and minor products or reactants. It is also possible to display custom content. It is designed to be placed inside a <div> tag with "display: flex; flex-flow: row wrap;", but it does work without flexbox.
ParameterDescriptionTypeStatus
Enzyme nameenzyme
The name of the enzyme. This may contain wikicode, but if it does or is otherwise not an article name, link must be specified.
Contentsuggested
Compound namecompound
The compound. This may contain wikicode, but if it does or is otherwise not an article name, link must be specified.
Contentsuggested
Title stylestyle
Custom styling for the title.
Unknownoptional
Number of moleculesn
Number of molecules of the given reactant relative to the others.
Numberoptional
Custom titletitle
The title of the box; causes link to be ignored. Not required; use compound, enzyme and/or link if possible.
Contentoptional
Title linklink
Clicking on the title takes you to this link. Overriden by title.
Page nameoptional
Forward minor substratefor_subst
The forward minor substrate(s). Can be formatted.
Example
H<sub>2</sub>O
Contentoptional
Forward minor productfor_prod
The forward minor product(s). Can be formatted.
Example
H<sub>2</sub>O
Contentoptional
Reaction directiondirection
Either forward, reverse or reversible: the direction of reaction.
Default
Forward
Stringoptional
Reverse minor substraterev_subst
The reverse minor substrate(s). Can be formatted.
Example
H<sub>2</sub>O
Contentoptional
Reverse minor productrev_prod
The reverse minor product(s). Can be formatted.
Example
H<sub>2</sub>O
Contentoptional
Image sizeimagesize
The width of the compound or arrow image.
Default
100px for compounds, 75px for arrows
Example
55px
Unknownsuggested
Compound imageimage
An image of the compound. Required for compounds.
Fileoptional
Image CSS classclass
CSS styling class for the image. Mainly used for dark mode compatibility using 'class=skin-invert-image'
Stringoptional
Alternative contentother_content
If neither compound nor enzyme is specified, the content of the main part of the box.
Example
+
Contentoptional
Reverse enzymeenzyme_reverse
Equivalent to enzyme but displayed below the arrow.
Contentoptional
Compound (lower)compound_lower
Equivalent to compound but displayed below the arrow.
Contentoptional
Title (lower)title_lower
Equivalent to custom title but displayed below the arrow.
Contentoptional
Link (lower)link_lower
Equivalent to title link but displayed below the arrow.
Page nameoptional

Format: inline

This creates a subunit of a reaction: either chemical, or a reaction arrow with an enzyme and minor products or reactants. It is also possible to display custom content. It is designed to be placed inside a <div> tag with "display: flex; flex-flow: row wrap;", but it does work without flexbox.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Enzyme nameenzyme

The name of the enzyme. This may contain wikicode, but if it does or is otherwise not an article name, link must be specified.

Contentsuggested
Compound namecompound

The compound. This may contain wikicode, but if it does or is otherwise not an article name, link must be specified.

Contentsuggested
Title stylestyle

Custom styling for the title.

Unknownoptional
Number of moleculesn

Number of molecules of the given reactant relative to the others.

Numberoptional
Custom titletitle

The title of the box; causes link to be ignored. Not required; use compound, enzyme and/or link if possible.

Contentoptional
Title linklink

Clicking on the title takes you to this link. Overriden by title.

Page nameoptional
Forward minor substratefor_subst

The forward minor substrate(s). Can be formatted.

Example
H<sub>2</sub>O
Contentoptional
Forward minor productfor_prod

The forward minor product(s). Can be formatted.

Example
H<sub>2</sub>O
Contentoptional
Reaction directiondirection

Either forward, reverse or reversible: the direction of reaction.

Default
Forward
Auto value
Stringoptional
Reverse minor substraterev_subst

The reverse minor substrate(s). Can be formatted.

Example
H<sub>2</sub>O
Contentoptional
Reverse minor productrev_prod

The reverse minor product(s). Can be formatted.

Example
H<sub>2</sub>O
Contentoptional
Image sizeimagesize

The width of the compound or arrow image.

Example
55px
Unknownsuggested
Compound imageimage

An image of the compound. Required for compounds.

Fileoptional
Image CSS classclass

CSS styling class for the image. Mainly used for dark mode compatibility using 'class=skin-invert-image'

Stringoptional
Alternative contentother_content

If neither compound nor enzyme is specified, the content of the main part of the box.

Example
+
Contentoptional
Reverse enzymeenzyme_reverse

Equivalent to enzyme but displayed below the arrow.

Contentoptional
Compound (lower)compound_lower

Equivalent to compound but displayed below the arrow.

Contentoptional
Title (lower)title_lower

Equivalent to custom title but displayed below the arrow.

Contentoptional
Link (lower)link_lower

Equivalent to title link but displayed below the arrow.

Page nameoptional
Default value requires type
The above documentation is transcluded from Template:Biochem reaction subunit/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Biochem_reaction_subunit/sandbox&oldid=1266791361"
Last edited on 2 January 2025, at 06:35

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 2 January 2025, at 06:35 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop