This site is supported by donations to The OEIS Foundation.
Template:Abbr/doc
The {{abbr}} OEIS Wiki formatting and function template shows a tooltip with the unabbreviated text when the mouse rolls over the corresponding abbreviation; it uses the {{Abbr/list}} helper function template containing a "database" table (of abbreviations and their associated terms) to figure out the unabbreviated term, if either the first argument or the second argument is the empty string.
FEATURE: Use _base text or preferably _base text_ to automatically turn it into a wiki link, e.g. base text. (Do not use the automatic link creation feature if base_text itself contains any underscore!)
NOTE: Many web browsers (such as Firefox, Google Chrome, Internet Explorer, Opera, Safari) show tooltip text as a tooltip when the user mouse hovers over base text. However, this behavior is not guaranteed and should not be relied on.
Contents
Usage
- {{abbr|unabbreviated text|abbreviation}}
where
- First argument: The "long form" unabbreviated text (showing as tooltip), which the "short form" is an abbreviation for;
- Second argument: The "short form" abbreviation, showing as text on the page;
or (by accessing the "database" table of abbreviations and their corresponding unabbreviated text), either with first argument explicitly set to empty string
- {{abbr||abbreviation}}
or with second argument implicitly set (as default) to empty string
- {{abbr|abbreviation}}
Examples
Examples not accessing the database table
Code Result Comment {{abbr|Riemann Hypothesis|RH}} RH [[RH|{{abbr|Riemann Hypothesis|RH}}]] RH {{abbr|Riemann Hypothesis|_RH_}} RH {{abbr|Riemann Hypothesis|_RH}} RH {{abbr|sum of prime factors|sopf}} sopf [[sopf(n)|{{abbr|sum of prime factors|sopf}}]] sopf
Examples accessing the database table
Examples where the abbreviation is found in the database
Code Result Comment First argument explicitly set to empty string {{abbr||Alt}} Alt [[alternating group|{{abbr| |Alt}}]] Alt {{abbr||Card}} Card {{abbr||_Card_}} Card {{abbr||deg}} deg [[degree|{{abbr| |deg}}]] deg {{abbr||del}} del {{abbr||_del_}} del {{abbr||Gal}} Gal [[Galois group|{{abbr| |Gal}}]] Gal {{abbr||gcd}} gcd {{abbr||_gcd_}} gcd {{abbr||lcm}} lcm {{abbr||_lcm_}} lcm {{abbr||log}} log {{abbr||_log_}} log {{abbr||QED}} QED {{abbr||_QED_}} QED {{abbr||QEF}} QEF {{abbr||_QEF_}} QEF {{abbr||RH}} RH {{abbr||_RH_}} RH {{abbr||sopf}} sopf [[sopf(n)|{{abbr| |sopf}}]] sopf {{abbr||Sym}} Sym [[symmetric group|{{abbr| |Sym}}]] Sym {{abbr||ZF}} ZF {{abbr||_ZF_}} ZF
Code Result Comment Second argument implicitly set (as default) to empty string {{abbr|Alt}} Alt [[alternating group|{{abbr|Alt}}]] Alt {{abbr|Card}} Card {{abbr|_Card_}} Card {{abbr|deg}} deg [[degree|{{abbr|deg}}]] deg {{abbr|del}} del {{abbr|_del_}} del {{abbr|Gal}} Gal [[Galois group|{{abbr|Gal}}]] Gal {{abbr|gcd}} gcd {{abbr|_gcd_}} gcd {{abbr|lcm}} lcm {{abbr|_lcm_}} lcm {{abbr|log}} log {{abbr|_log_}} log {{abbr|QED}} QED {{abbr|_QED_}} QED {{abbr|QEF}} QEF {{abbr|_QEF_}} QEF {{abbr|RH}} RH {{abbr|_RH_}} RH {{abbr|sopf}} sopf [[sopf(n)|{{abbr|sopf}}]] sopf {{abbr|Sym}} Sym [[symmetric group|{{abbr|Sym}}]] Sym {{abbr|ZF}} ZF {{abbr|_ZF_}} ZF
Examples where the abbreviation is NOT found in the database
Code Result Comment {{abbr|AFAIK}} AFAIK (NOT in database table!) {{abbr|_AFAIK_}} AFAIK (NOT in database table!) {{abbr|BTW}} BTW (NOT in database table!) {{abbr|_BTW_}} BTW (NOT in database table!) {{abbr|IMHO}} IMHO (NOT in database table!) {{abbr|_IMHO_}} IMHO (NOT in database table!)
Examples with invalid input
Code Result {{abbr||}} Abbr error: No abbreviation provided! {{abbr|}} Abbr error: No abbreviation provided! {{abbr}} Abbr error: No abbreviation provided!
Code
<noinclude>{{documentation}}</noinclude><includeonly><!-- Uses the Template:Abbr/list helper function template containing a "database" table (of abbreviations and their associated terms), if {{{1|}}} or {{{2|}}} is empty string. FEATURE: Surround the abbreviation with underscores, e.g. _abbreviation_ to turn it into a wiki link, e.g. [[abbreviation]]. -->{{#if: {{{1|}}} | {{#if: {{{2|}}} | {{#ifeq: {{#pos:{{{2|}}}|_}} | 0 | [[{{#replace:{{{2|}}}|_}}|<!-- --><span style="border-bottom: 1px dotted #999" title="{{{1|}}}">{{#replace:{{{2|}}}|_}}</span><!-- -->]] | <span style="border-bottom: 1px dotted #999" title="{{{1|}}}">{{{2|}}}</span> }} | <!-- Accessing "database" table: -->{{#ifeq: {{#pos:{{{1|}}}|_}} | 0 | [[{{#replace:{{{1|}}}|_}}|<!-- --><span style="border-bottom: 1px dotted #999" title="{{Abbr/list|{{#replace:{{{1|}}}|_}}}}">{{#replace:{{{1|}}}|_}}</span><!-- -->]] | <span style="border-bottom: 1px dotted #999" title="{{Abbr/list|{{{1|}}}}}">{{{1|}}}</span> }} }} | {{#if: {{{2|}}} | <!-- Accessing "database" table: -->{{#ifeq: {{#pos:{{{2|}}}|_}} | 0 | [[{{#replace:{{{2|}}}|_}}|<!-- --><span style="border-bottom: 1px dotted #999" title="{{Abbr/list|{{#replace:{{{2|}}}|_}}}}">{{#replace:{{{2|}}}|_}}</span><!-- -->]] | <span style="border-bottom: 1px dotted #999" title="{{Abbr/list|{{{2|}}}}}">{{{2|}}}</span> }} | {{error| Abbr error: No abbreviation provided! }} }} }}</includeonly>