Template:Hc: Difference between revisions
Jump to navigation
Jump to search
Brodriguez (talk | contribs) (Create page) |
Brodriguez (talk | contribs) (Update page) |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
General page acquired from from https://wiki.archlinux.org/index.php/Template:Hc | |||
== Description == | == Description == | ||
Line 13: | Line 13: | ||
* {{ic|2}} or {{ic|output}}: the code in the bottom pane | * {{ic|2}} or {{ic|output}}: the code in the bottom pane | ||
<nowiki>{{ hc | main.h | #include <stdio.h> }}</nowiki> | <nowiki>{{hc|main.h|#include<stdio.h>}}</nowiki> | ||
<nowiki>{{ hc | head=main.h | output=#include <stdio.h> }}</nowiki> | <nowiki>{{hc|head=main.h|output=#include<stdio.h>}}</nowiki> | ||
==Example== | ==Example== | ||
{{ hc | head=main.h | output=#include <stdio.h> }} | {{hc|head=main.h|output=#include<stdio.h>}} | ||
<includeonly><pre<noinclude></noinclude> style="margin-bottom: 0; border-bottom:none; padding-bottom:0.8em;">{{{head|{{{ 1 }}} }}}</pre<noinclude></noinclude>><!-- The line break is needed, otherwise the wiki will generate extraneous paragraphs inside the 2nd pre block --> | </noinclude><includeonly><pre<noinclude></noinclude> style="margin-bottom: 0; border-bottom:none; padding-bottom:0.8em;">{{{head|{{{1}}}}}}</pre<noinclude></noinclude>><!-- The line break is needed, otherwise the wiki will generate extraneous paragraphs inside the 2nd pre block --> | ||
<pre<noinclude></noinclude> style="margin-top: 0; border-top-style:dashed; padding-top: 0.8em;">{{{ output | {{{ 2 | <pre<noinclude></noinclude> style="margin-top: 0; border-top-style:dashed; padding-top: 0.8em;">{{{output|{{{2}}}}}}</pre<noinclude></noinclude>></includeonly><noinclude><!-- The <noinclude></noinclude> hack is needed to allow wiki markup inside the pre tags; reference: http://www.gossamer-threads.com/lists/wiki/mediawiki/118688#118688 --></noinclude> |
Latest revision as of 13:57, 6 May 2020
General page acquired from from https://wiki.archlinux.org/index.php/Template:Hc
Description
Template for Block Code with Header.
- Use Template:bc for Block Code without Header.
- Use Template:ic for Inline Code.
Usage
1
orhead
: the code in the top pane2
oroutput
: the code in the bottom pane
{{hc|main.h|#include<stdio.h>}}
{{hc|head=main.h|output=#include<stdio.h>}}
Example
main.h
#include<stdio.h>