Template:hc
用於展示帶首行(通常是文件名或輸入)的代碼塊。
- 要展示沒有首行的代碼塊,使用模板 Template:bc。
- 要展示內聯代碼,使用模板 Template:ic 。
提示:在 Arch Linux 中文維基上也可以使用 MediaWiki 的 SyntaxHighlight 擴展提供的代碼高亮功能,詳情請參閱前述頁面。
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>