Ҡалып:Markup

(i) Документация

Ҡалып:TranslateЭтот шаблон используется, чтобы представить разметку или код рядом с результатом его применения.

Использование

Каждая ячейка в первой колонке ("Markup") использует <pre>, to retain newlines and spaces but styled to allow content to wrap within it. It is usually desirable to escape the content of these cells so that the markup is displayed by wrapping the markup in <nowiki>. It is technically not possible to add this feature to the template.

Каждая ячейка во второй колонке ("Renders as") скопирована из соответствующей ячейки "разметки" перед ней. Есть случаи, когда это может отличаться:

  • Если первая строка содержит викиразметку, которая должна начать новую строку.
  • Заголовки разметки, такой как == покажет странице оглавления; will show in the page table of contents; use {{fake heading}}.
  • Some templates will place the page in a maintenance category, which is usually undesired:
    • Instead of {{citation needed}}, use {{fake citation needed}}.
  • Some templates may have error checking that places the page in a maintenance category. Suppress the category as possible:
    • Ҡалып:Cs1 templates can suppress the maintenance category by setting |template doc demo=true.

Ограничение

<nowiki>

Если вы не поместите содержимое ячейки разметки в <nowiki>, then any template markup will not be escaped, it will be expanded.

This example shows the markup for {{tl|tag}}:

Renders asExpected rendering
<span style="color:#708090" class="wp-templatelink">{{[[Ҡалып:tag|tag]]}}</span> 
{{tl|tag}}

HTML entities

HTML entities are parsed in the markup cell:

Nowikied markup shows asExpected markup
 – 
&nbsp;&ndash;

To work around this, replace the & with &amp; thus &amp;nbsp; will show as &nbsp;

List and indent markup

If the first line includes wikimarkup that must start on a new line such as #, * or ; then use <nowiki />:

Without <nowiki />
РазметкаВыполнит как
# Item 1# Item 2# Item 3# Item 4 
  1. Item 1
  2. Item 2
  3. Item 3
  4. Item 4
With <nowiki />
РазметкаВыполнит как
<nowiki /># Item 1# Item 2# Item 3# Item 4 

  1. Item 1
  2. Item 2
  3. Item 3
  4. Item 4

Examples

Simple

РазметкаВыполнит как
'''Bold text''' 
Bold text

''Italic text'' 
Italic text

More complex

Note that Ҡалып:Tl2's second argument here uses Ҡалып:Tl2 and Ҡалып:Tl2.

РазметкаВыполнит как
The quick brown fox jumps over the lazy dog.{{#tag:ref|A footnote.<ref>A reference for the footnote.</ref>|group=nb}} The cow jumped over the moon.{{fact}}== Notes =={{reflist|group=nb}}== References =={{reflist}} 

The quick brown fox jumps over the lazy dog.[nb 1] The cow jumped over the moon.Ҡалып:Fake citation needed

Ҡалып:Fake heading

Ҡалып:Fake heading

Multiple rows

РазметкаВыполнит как
The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog.

With title

Foxes and dogs
РазметкаВыполнит как
The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog.

Showing rendered HTML

When a template is enclosed within {{code}}, it shows the rendered HTML:

РазметкаВыполнит как
{{cite book |last=White |first=T. H. |title=The Book of Merlyn |year=1977}} 
White T. H. The Book of Merlyn. — 1977.

{{code|{{cite book |last=White |first=T. H. |title=The Book of Merlyn |year=1977}}}} 
White T. H. The Book of Merlyn. — 1977.

См. также

  • {{Markup2}} for bulleted and indented markup.
  • {{Markupv}} for the vertical presentation (above/below) of markup/code and its output.

Во избежание поломок страниц, использующих данный шаблон, желательно экспериментировать в своём личном пространстве.

🔥 Top keywords: Баш битГазпром Нефтехим СалауатВикипедияРәсәй Федерацияһының социаль картаһыИкенсе донъя һуғышыАрыҫлан петроглифтарыВикипедия:Яуаплылыҡтан баш тартыуМахсус:Һуңғы үҙгәртеүҙәрВикипедия:ТасуирламаВикипедия:Алфавитлы күрһәткесВикипедия:БелешмәЭҙләүҙе оптималлаштырыуФранк АннаВикипедия:БерләшмәВикипедия:ҠоролтайКеше яҙмышыАллаһы Тәғәләнең күркәм исем сифаттарыАҠШ юстиция департаментыПортал:Ағымдағы ваҡиғалар/Башвики наградаларыБабич Шәйехзада Мөхәмәтзакир улыМахсус:ЭҙләүВикипедия:Рәхим итегеҙВикипедия:Хата тураһында белдереүДжордано БруноИнглиз телеВикипедия:BarМария-АнтуанеттаВикипедия:Һайланған мәҡәләләрВикипедия:Ағымдағы ваҡиғаларВикипедия:Яҡшы мәҡәләләрВикипедия:Сифатлы мәҡәләләрБиишева Зәйнәб Абдулла ҡыҙыИшбаев Райман Сәйәх улыҮҙəк Совет власы менəн Башҡорт хөкүмəте араһында Башҡорт Совет автономияһы тураһында килешеүМахсус:Әңгәмә битемБашҡорт алфавитыФайл:Flag of Indonesia.svgВикипедия:ВикиосрашыуСифат