Template:TAG: Difference between revisions
Vaspmaster (talk | contribs) m (1 revision) |
No edit summary |
||
| Line 1: | Line 1: | ||
[[{{{1}}}]] | {{#if: {{{2|}}} | ||
| {{#switch: {{{color}}} | |||
| green = <code style="padding: 2px; background: #F3FCFB">[[{{{1}}}]] {{{op|{{=}}}}} {{{2|}}}</code> | |||
| grey = <code style="padding: 2px; background: #F7F7F7">[[{{{1}}}]] {{{op|{{=}}}}} {{{2|}}}</code> | |||
| blue = <code style="padding: 2px; background: #F0F4FF">[[{{{1}}}]] {{{op|{{=}}}}} {{{2|}}}</code> | |||
| red = <code style="padding: 2px; background: #FCF3F4">[[{{{1}}}]] {{{op|{{=}}}}} {{{2|}}}</code> | |||
| purple = <code style="padding: 2px; background: #F8F4FB">[[{{{1}}}]] {{{op|{{=}}}}} {{{2|}}}</code> | |||
| #default = <code style="padding: 2px">[[{{{1}}}]] {{{op|{{=}}}}} {{{2|}}}</code> | |||
}} | |||
| {{#switch: {{{color}}} | |||
| green = <span style="padding: 2px; background: #F3FCFB">[[{{{1}}}]]</span> | |||
| grey = <span style="padding: 2px; background: #F7F7F7">[[{{{1}}}]]</span> | |||
| blue = <span style="padding: 2px; background: #F0F4FF">[[{{{1}}}]]</span> | |||
| red = <span style="padding: 2px; background: #FCF3F4">[[{{{1}}}]]</span> | |||
| purple = <span style="padding: 2px; background: #F8F4FB">[[{{{1}}}]]</span> | |||
| #default = [[{{{1}}}]] | |||
}} | |||
}}<noinclude> | |||
== Purpose == | |||
Prints a link to an {{FILE|INCAR}} tag, optionally with colored background and/or as <code style="padding: 2px">TAG = value</code> pair. | |||
== Parameters == | |||
<nowiki> {{TAG|<tag_name>|<<value>>|<<color=color_name>>|<<op=operator>>}}</nowiki> | |||
* <code>tag_name</code>: The {{FILE|INCAR}} tag for which a link should be generated. | |||
* <code>value</code>: ('''optional''') Value associated with {{FILE|INCAR}} tag, with no other arguments writes <code>MY_TAG = value</code> | |||
* <code>color=color_name</code>: ('''optional''') Apply a color background, available <code>color_name</code> arguments are: <code style="background: #F3FCFB">green</code>, <code style="background: #F7F7F7">grey</code>, <code style="background: #F0F4FF">blue</code>, <code style="background: #FCF3F4">red</code> and <code style="background: #F8F4FB">purple</code>. Works also without the <code>value</code> argument. | |||
* <code>op=operator</code>: ('''optional''') In case a different operator than <code>=</code> is required it can be provided as with the <code>op=</code> argument, e.g., <code><nowiki> {{TAG|MY_TAG|3|op=>=}}</nowiki></code> produces <code>MY_TAG >= 3</code>. | |||
== Examples == | |||
<nowiki> {{TAG|IBRION}} | |||
{{TAG|IBRION|color=blue}} | |||
{{TAG|IBRION|3|color=green}} | |||
{{TAG|IBRION|5|op=<}} | |||
{{TAG|IBRION|4|color=red|op=?=}}</nowiki> | |||
results in | |||
* {{TAG|IBRION}} | |||
* {{TAG|IBRION|color=blue}} | |||
* {{TAG|IBRION|3|color=green}} | |||
* {{TAG|IBRION|5|op=<}} | |||
* {{TAG|IBRION|4|color=red|op=?=}} | |||
=== Remarks === | |||
* Can be combined with bold and italics format: | |||
<nowiki> ''{{TAG|IBRION|4|color=red|op=>}}'' | |||
'''{{TAG|IBRION|4|color=blue|op=>}}''' | |||
'''''{{TAG|IBRION|4|color=purble|op=>}}'''''</nowiki> | |||
:produces: | |||
:* ''{{TAG|IBRION|4|color=red|op=>}}'' | |||
:* '''{{TAG|IBRION|4|color=blue|op=>}}''' | |||
:* '''''{{TAG|IBRION|4|color=purble|op=>}}''''' | |||
* Also works inside of [[Template:NB]] boxes: | |||
{{NB|tip|Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd {{TAG|ML_MODE|color=red}} gubergren, no sea {{TAG|ML_MODE|RUN|color=green}} takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita {{TAG|IBRION|3|op=>}} kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.|:}} | |||
</noinclude> | |||
Latest revision as of 07:22, 24 October 2025
[[{{{1}}}]]
Purpose
Prints a link to an INCAR tag, optionally with colored background and/or as TAG = value pair.
Parameters
{{TAG|<tag_name>|<<value>>|<<color=color_name>>|<<op=operator>>}}
tag_name: The INCAR tag for which a link should be generated.value: (optional) Value associated with INCAR tag, with no other arguments writesMY_TAG = valuecolor=color_name: (optional) Apply a color background, availablecolor_namearguments are:green,grey,blue,redandpurple. Works also without thevalueargument.op=operator: (optional) In case a different operator than=is required it can be provided as with theop=argument, e.g.,{{TAG|MY_TAG|3|op=>=}}producesMY_TAG >= 3.
Examples
{{TAG|IBRION}}
{{TAG|IBRION|color=blue}}
{{TAG|IBRION|3|color=green}}
{{TAG|IBRION|5|op=<}}
{{TAG|IBRION|4|color=red|op=?=}}
results in
IBRION = 3
IBRION < 5
IBRION ?= 4
Remarks
- Can be combined with bold and italics format:
''{{TAG|IBRION|4|color=red|op=>}}''
'''{{TAG|IBRION|4|color=blue|op=>}}'''
'''''{{TAG|IBRION|4|color=purble|op=>}}'''''
- Also works inside of Template:NB boxes:
Tip: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd ML_MODE gubergren, no sea ML_MODE = RUNtakimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clitaIBRION > 3kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.