Template:AtomMapping
From Metabolomics.JP
(Difference between revisions)
Line 6: | Line 6: | ||
</noinclude> | </noinclude> | ||
{{#def:ATOMMAP|{{{map}}}}} | {{#def:ATOMMAP|{{{map}}}}} | ||
+ | {{#def:FIGLEFT|{{#ifeq:{{#var:MAPLHS}}|{{#car:{{{1}}}|$}}|false|true}}}} | ||
+ | {{#def:FIGRIGHT|{{#ifeq:{{#var:MAPRHS}}|{{#cadr:{{{1}}}|$}}|false|true}}}} | ||
+ | {{#def:NAMELEFT|{{Metabolite/GetCommonName|{{#car:{{{1}}}|$}}}}}} | ||
+ | {{#def:NAMERIGHT|{{Metabolite/GetCommonName|{{#cadr:{{{1}}}|$}}}}}} | ||
{{#def:MAPLHS|{{#car:{{{1}}}|$}}}} | {{#def:MAPLHS|{{#car:{{{1}}}|$}}}} | ||
{{#def:MAPRHS|{{#cadr:{{{1}}}|$}}}} | {{#def:MAPRHS|{{#cadr:{{{1}}}|$}}}} | ||
Line 12: | Line 16: | ||
{| | {| | ||
|- | |- | ||
− | ! align="center" | + | ! align="center" | {{#var:NAMELEFT}} |
! align="center" | Mapping {{#switch:{{#var:MAPNUM}}|=|0=|1=(2nd)|2=(3rd)|default ({{#var:MAPNUM}}th)}} | ! align="center" | Mapping {{#switch:{{#var:MAPNUM}}|=|0=|1=(2nd)|2=(3rd)|default ({{#var:MAPNUM}}th)}} | ||
− | ! align="center" | + | ! align="center" | {{#var:NAMERIGHT}} |
|- | |- | ||
− | |align="center"|[[Image:{{#var:MAPLHS}}.png|150px]] | + | |align="center"|{{#if:{{#var:FIGLEFT}}|[[Image:{{#var:MAPLHS}}.png|150px]]| {{#var:NAMELEFT}} }} |
|align="center"|{{AtomMapping/ListPosition|{{{map}}}}} | |align="center"|{{AtomMapping/ListPosition|{{{map}}}}} | ||
− | |align="center"|[[Image:{{#var:MAPRHS}}.png|150px]] | + | |align="center"|{{#if:{{#var:FIGRIGHT}}|[[Image:{{#var:MAPRHS}}.png|150px]]| {{#var:NAMERIGHT}} }} |
|} | |} | ||
</center> | </center> |
Revision as of 19:09, 24 January 2009
Usage:
{{{1}}} ... mapping label (usually PAGENAME)
{{{map}}} ... pair of atomic positions
[[{{{1}}}|]] | Mapping | [[|(E)-3-Phenyl-2-propenoic acid]] |
---|---|---|
[[Image:{{{1}}}.png|150px]] | {{{map}}} ↔ |
150px |
Expression error: Missing operand for <=.