Template:Doc-inline: Difference between revisions
More actions
created |
created |
||
| Line 1: | Line 1: | ||
< | {{documentation subpage}} | ||
{{ | {{Uses TemplateStyles|Template:Documentation/styles.css}} | ||
It is recommended in most cases to create documentation on a subpage and include it with the template {{tl2|documentation}}. The template {{tlc|doc-inline}} is intended mostly for short documentation. | |||
This template displays the content of the first unnamed parameter in a green box like you are seeing here. | |||
== Usage == | |||
Just write <code style="font-family: monospace; font-size: 110%; white-space: nowrap; margin: 1em auto;"><nowiki>{{doc-inline|</nowiki>''<nowiki>Text of documentation</nowiki>''<nowiki>}}</nowiki></code> (instead of ''Text of documentation'' write the text your want). | |||
If your text contains the equal sign (<code>=</code>), write instead <code style="font-family: monospace; font-size: 110%; white-space: nowrap; margin: 1em auto;"><nowiki>{{doc-inline|1=</nowiki>''<nowiki>Text of documentation</nowiki>''<nowiki>}}</nowiki></code> or replace each equal sign with <code><nowiki>{{=}}</nowiki></code>. | |||
Do not forget to add categories below. If it is a template documentation, the template {{tlc|doc-inline}} and the categories must be inside <code><noinclude></code>. | |||
== Examples == | |||
<code style="display: block; width: 42em; font-family: monospace; font-size: 80%; white-space: nowrap; margin: auto auto 2em 0; padding: 1em;"><noinclude>{{doc-inline|To be? Or not to be? It is a question. | |||
<br><br>William Shakespeare. Hamlet}} | |||
<br><br>[[Category:William Shakespeare]] | |||
<br></noinclude></code> | |||
<code style="display: block; width: 42em; font-family: monospace; font-size: 80%; white-space: nowrap; margin: 2em auto 2em 0; padding: 1em;"><noinclude>{{doc-inline|1=E=mc²}} | |||
<br><br>[[Category:Albert Einstein]] | |||
<br></noinclude></code> | |||
<code style="display: block; width: 42em; font-family: monospace; font-size: 80%; white-space: nowrap; margin: 2em auto auto 0; padding: 1em;"><noinclude>{{doc-inline|E{{=}}mc²}} | |||
<br><br>[[Category:Albert Einstein]] | |||
<br></noinclude></code> | |||
== See also == | |||
* {{tl2|Documentation}}<includeonly> | |||
[[Category:Documentation templates]] | |||
[[Category:Template namespace templates]] | |||
</includeonly>__NOTOC__ | |||
Revision as of 18:21, 30 January 2024
It is recommended in most cases to create documentation on a subpage and include it with the template {{documentation}}. The template {{doc-inline}} is intended mostly for short documentation.
This template displays the content of the first unnamed parameter in a green box like you are seeing here.
Usage
Just write {{doc-inline|Text of documentation}} (instead of Text of documentation write the text your want).
If your text contains the equal sign (=), write instead {{doc-inline|1=Text of documentation}} or replace each equal sign with {{=}}.
Do not forget to add categories below. If it is a template documentation, the template {{doc-inline}} and the categories must be inside <noinclude>.
Examples
<noinclude>{{doc-inline|To be? Or not to be? It is a question.
William Shakespeare. Hamlet}}
[[Category:William Shakespeare]]
</noinclude><noinclude>{{doc-inline|1=E=mc²}}
[[Category:Albert Einstein]]
</noinclude><noinclude>{{doc-inline|E{{=}}mc²}}
[[Category:Albert Einstein]]
</noinclude>
See also
{{Documentation}}