Шаблон:Code — различия между версиями
Материал Psylab.info - энциклопедии психодиагностики
м |
м |
||
| Строка 2: | Строка 2: | ||
<div class="contentbox-title"><span class="contentbox-title1" style="background-color: #204A87; color: white">{{{title|Код}}}</span>{{#if: {{{subtitle|}}}|<span class="contentbox-subtitle" style="background-color: #AAA; color: white;">{{{subtitle}}}</span>|}}{{#if:{{{description|}}}|<span class="contentbox-description" style="color: #333;">{{{description}}}</span>|}}</div><br style="clear: both;" />{{#if: {{{rightmsg|}}}|<div class="contentbox-rightmsg">{{{rightmsg}}}</div>|}} | <div class="contentbox-title"><span class="contentbox-title1" style="background-color: #204A87; color: white">{{{title|Код}}}</span>{{#if: {{{subtitle|}}}|<span class="contentbox-subtitle" style="background-color: #AAA; color: white;">{{{subtitle}}}</span>|}}{{#if:{{{description|}}}|<span class="contentbox-description" style="color: #333;">{{{description}}}</span>|}}</div><br style="clear: both;" />{{#if: {{{rightmsg|}}}|<div class="contentbox-rightmsg">{{{rightmsg}}}</div>|}} | ||
<div class="contentbox-content mw-collapsible-content"> | <div class="contentbox-content mw-collapsible-content"> | ||
| − | {{#tag:syntaxhighlight|{{#tag:nowiki|{{{code}}}}}|lang={{{lang|text}}}}} | + | {{#tag:syntaxhighlight|code={{#tag:nowiki|{{{code}}}}}|lang={{{lang|text}}}}} |
</div> | </div> | ||
</div></includeonly><noinclude> | </div></includeonly><noinclude> | ||
Версия 16:55, 17 февраля 2014
Использование
{{code
|title=Заголовок
|subtitle=Подзаголовок
|description=Описание
|lang=Язык для подсветки синтаксиса
|code=Код
}}
Примеры
{{code
|subtitle=R
|lang=rsplus
|code=
x <- rnorm(100)
}}
Код
<syntaxhighlight lang="rsplus">> x <- rnorm(100) > mean(x) [1] -0.0004533</syntaxhighlight>