Difference between revisions of "Template:Biochem reaction arrow alt text"
imported>GKFX (Add reversible cases) |
imported>GKFX (Working) |
||
| Line 1: | Line 1: | ||
| − | + | {{#switch: {{{1}}}-{{{6|horiz}}} | |
| − | {{#switch: {{{1}}}-{{{6}}} | ||
|forward-horiz = Rightward | |forward-horiz = Rightward | ||
|reverse-horiz = Leftward | |reverse-horiz = Leftward | ||
| Line 7: | Line 6: | ||
|reverse-vert = Upward | |reverse-vert = Upward | ||
|reversible-vert = Reversible up-down}} reaction arrow {{#if:{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}|with}} | |reversible-vert = Reversible up-down}} reaction arrow {{#if:{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}|with}} | ||
| − | {{#switch: {{{1}}}-{{{6}}} | + | {{#switch: {{{1}}}-{{{6|horiz}}} |
|forward-horiz = {{#if:{{{2|}}}{{{5|}}}|minor substrate(s) from {{#switch:{{#if:{{{2|}}}|Y|N}}{{#if:{{{5|}}}|Y|N}}|YN=top|NY=bottom|YY=top and bottom}} left}} {{#if:{{{2|}}}{{{5|}}}|{{#if:{{{3|}}}{{{4|}}}|and}}}} {{#if:{{{3|}}}{{{4|}}}|minor product(s) to {{#switch:{{#if:{{{3|}}}|Y|N}}{{#if:{{{4|}}}|Y|N}}|YN=top|NY=bottom|YY=top and bottom}} right}} | |forward-horiz = {{#if:{{{2|}}}{{{5|}}}|minor substrate(s) from {{#switch:{{#if:{{{2|}}}|Y|N}}{{#if:{{{5|}}}|Y|N}}|YN=top|NY=bottom|YY=top and bottom}} left}} {{#if:{{{2|}}}{{{5|}}}|{{#if:{{{3|}}}{{{4|}}}|and}}}} {{#if:{{{3|}}}{{{4|}}}|minor product(s) to {{#switch:{{#if:{{{3|}}}|Y|N}}{{#if:{{{4|}}}|Y|N}}|YN=top|NY=bottom|YY=top and bottom}} right}} | ||
|reverse-horiz = {{#if:{{{2|}}}{{{5|}}}|minor product(s) to {{#switch:{{#if:{{{2|}}}|Y|N}}{{#if:{{{5|}}}|Y|N}}|YN=top|NY=bottom|YY=top and bottom}} left}} {{#if:{{{2|}}}{{{5|}}}|{{#if:{{{3|}}}{{{4|}}}|and}}}} {{#if:{{{3|}}}{{{4|}}}|minor substrate(s) from {{#switch:{{#if:{{{3|}}}|Y|N}}{{#if:{{{4|}}}|Y|N}}|YN=top|NY=bottom|YY=top and bottom}} right}} | |reverse-horiz = {{#if:{{{2|}}}{{{5|}}}|minor product(s) to {{#switch:{{#if:{{{2|}}}|Y|N}}{{#if:{{{5|}}}|Y|N}}|YN=top|NY=bottom|YY=top and bottom}} left}} {{#if:{{{2|}}}{{{5|}}}|{{#if:{{{3|}}}{{{4|}}}|and}}}} {{#if:{{{3|}}}{{{4|}}}|minor substrate(s) from {{#switch:{{#if:{{{3|}}}|Y|N}}{{#if:{{{4|}}}|Y|N}}|YN=top|NY=bottom|YY=top and bottom}} right}} | ||
| − | |reversible-horiz = {{ | + | |reversible-horiz = {{Biochem_reaction_arrow_alt_text/Csv and|{{#if:{{{2|}}}|minor forward substrate(s) from top left}}|{{#if:{{{3|}}}|minor forward product(s) to top right}}|{{#if:{{{4|}}}|minor reverse substrate(s) from bottom right}}|{{#if:{{{5|}}}|minor reverse product(s) to bottom left}}}} |
|forward-vert = {{#if:{{{2|}}}{{{3|}}}|minor substrate(s) from top {{#switch:{{#if:{{{2|}}}|Y|N}}{{#if:{{{3|}}}|Y|N}}|YN=left|NY=right|YY=left and right}}}} {{#if:{{{2|}}}{{{3|}}}|{{#if:{{{4|}}}{{{5|}}}|and}}}} {{#if:{{{4|}}}{{{5|}}}|minor products(s) to bottom {{#switch:{{#if:{{{4|}}}|Y|N}}{{#if:{{{5|}}}|Y|N}}|YN=right|NY=left|YY=left and right}}}} | |forward-vert = {{#if:{{{2|}}}{{{3|}}}|minor substrate(s) from top {{#switch:{{#if:{{{2|}}}|Y|N}}{{#if:{{{3|}}}|Y|N}}|YN=left|NY=right|YY=left and right}}}} {{#if:{{{2|}}}{{{3|}}}|{{#if:{{{4|}}}{{{5|}}}|and}}}} {{#if:{{{4|}}}{{{5|}}}|minor products(s) to bottom {{#switch:{{#if:{{{4|}}}|Y|N}}{{#if:{{{5|}}}|Y|N}}|YN=right|NY=left|YY=left and right}}}} | ||
|reverse-vert = {{#if:{{{2|}}}{{{3|}}}|minor products(s) to top {{#switch:{{#if:{{{2|}}}|Y|N}}{{#if:{{{3|}}}|Y|N}}|YN=left|NY=right|YY=left and right}}}} {{#if:{{{2|}}}{{{3|}}}|{{#if:{{{4|}}}{{{5|}}}|and}}}} {{#if:{{{4|}}}{{{5|}}}|minor substrate(s) to bottom {{#switch:{{#if:{{{4|}}}|Y|N}}{{#if:{{{5|}}}|Y|N}}|YN=right|NY=left|YY=left and right}}}} | |reverse-vert = {{#if:{{{2|}}}{{{3|}}}|minor products(s) to top {{#switch:{{#if:{{{2|}}}|Y|N}}{{#if:{{{3|}}}|Y|N}}|YN=left|NY=right|YY=left and right}}}} {{#if:{{{2|}}}{{{3|}}}|{{#if:{{{4|}}}{{{5|}}}|and}}}} {{#if:{{{4|}}}{{{5|}}}|minor substrate(s) to bottom {{#switch:{{#if:{{{4|}}}|Y|N}}{{#if:{{{5|}}}|Y|N}}|YN=right|NY=left|YY=left and right}}}} | ||
| − | |reversible-vert = {{ | + | |reversible-vert = {{Biochem_reaction_arrow_alt_text/Csv and|{{#if:{{{2|}}}|minor reverse product(s) to top left}}|{{#if:{{{3|}}}|minor forward substrate(s) from top right}}|{{#if:{{{4|}}}|minor forward product(s) to bottom right}}|{{#if:{{{5|}}}|minor reverse substrate(s) from bottom left}}}}}}<noinclude>{{Documentation}}</noinclude> |
Revision as of 11:10, 17 September 2017
reaction arrow
This template creates suitable alt text for the Biochem reaction arrow Y XXXX horiz/vert med.svg series of images. It takes parameters in the same order as the images, so the alt text for
- [[File:Biochem reaction arrow forward YYNN horiz med.svg]]
is
- {{Biochem reaction arrow alt text|forward|subst|prod|||horiz}}
Note that subst and prod can be any values here, so if you get passed a substate on an optional parameter p, you can pass {{{p|}}} directly to this template, and the arrow will only be mentioned if the parameter is passed and non-blank. The result for this example is
- Rightward reaction arrow with
minor substrate(s) from top left and minor product(s) to top right
Usage
TemplateData for Biochem reaction arrow alt text
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Direction | 1 | Either forward, reverse, or reversible
| String | required |
| Top left substrate/product | 2 | Any content will cause an arrow from the top left to be described. | Unknown | optional |
| Top right substrate/product | 3 | Any content will cause an arrow from the top right to be described. | Unknown | optional |
| Bottom right substrate/product | 4 | Any content will cause an arrow from the bottom right to be described. | Unknown | optional |
| Bottom left substrate/product | 5 | Any content will cause an arrow from the bottom left to be described. | Unknown | optional |
| Orientation | 6 | Either horiz or vert.
| String | optional |
This template creates suitable alt text for the Biochem reaction arrow Y XXXX horiz/vert med.svg series of images. Designed for use in templates; consider writing alt text by hand in an article.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Direction | 1 | Either forward, reverse, or reversible
| String | required |
| Top left substrate/product | 2 | Any content will cause an arrow from the top left to be described. | Unknown | optional |
| Top right substrate/product | 3 | Any content will cause an arrow from the top right to be described. | Unknown | optional |
| Bottom right substrate/product | 4 | Any content will cause an arrow from the bottom right to be described. | Unknown | optional |
| Bottom left substrate/product | 5 | Any content will cause an arrow from the bottom left to be described. | Unknown | optional |
| Orientation | 6 | Either horiz or vert.
| String | optional |
| The above documentation is transcluded from Template:Biochem reaction arrow alt text/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |