說明:擴展語法與格式示例

Maintenance script​(留言 | 貢獻)2026年1月12日 (一) 23:21的修訂 (TimedMediaHandler 示例改为 Commons 公用文件)

重定向 (Redirect)

用於將頁面指向其它頁面。

示例語法:

#REDIRECT [[目标页面]]

效果說明:保存後訪問該頁會自動跳轉到目標頁面。

timeline

使用 EasyTimeline 或 <timeline> 語法展示事件。

示例(可視化時間線)

Special:MyLanguage/GorbachevSpecial'colon'MyLanguage/ChernenkoSpecial:MyLanguage/AndropovSpecial:MyLanguage/BrezhnevSpecial:MyLanguage/Khrushchev

Special:MyLanguage/Lenin

參見

ImageMap

ImageMap 擴展允許在圖片中定義可點區域,適合交互式說明。

示例

 BartholomewJames MinorAndrewPeterJudasPeterJohnw:JesusThomasJames GreaterPhilipMatthewJudeSimon
Image map example. Clicking on a person in the picture causes the browser to load the appropriate article.

參見

inputbox

InputBox 擴展可以生成搜索或創建界面,便於用戶快速跳轉。

示例語法:

<inputbox>
type=search
arialabel=Search the Wiki
</inputbox>

示例效果:

參見

syntaxhighlight

用於高亮展示代碼。

示例語法:

<syntaxhighlight lang="bash">
php -v
mysql --version

</syntaxhighlight>

示例效果:

php -v
mysql --version

mapframe

Kartographer 擴展提供交互地圖。當前站點未接入 Kartotherian 兼容地圖服務時,地圖可能無法顯示或僅顯示占位。

示例語法:

<mapframe latitude="39.9042" longitude="116.4074" zoom="12" width="600" height="400">
</mapframe>

示例效果(若地圖未顯示,請檢查 Kartographer 地圖服務配置):

參見

math

Math 擴展支持 LaTeX 與化學符號,適合數學與科學內容展示。

示例(公式)

x=−b±b2−4ac2a

示例(化學式)

HgA2+→IA−HgIA2→IA−[HgIII4]2-

參見

score

Score 擴展渲染樂譜,需配套 LilyPond 與 ffmpeg。

示例

找不到Soundfont:/usr/share/sounds/sf2/FluidR3_GM.sf2不存在。請確保$wgScoreSoundfont正確設置。

參見

hiero

WikiHiero 支持古埃及象形文字排版。

示例語法:

<hiero>A1</hiero>

示例效果:

A1

參見

PdfHandler

PdfHandler 擴展提供 PDF 預覽與嵌入,適合文檔展示。

示例語法:

[[File:EXCEL 2016 QUICK START GUIDE.PDF|thumb|500px|EXCEL 2016 QUICK START GUIDE.PDF]]

示例效果:

 
EXCEL 2016 QUICK START GUIDE.PDF

參見

TimedMediaHandler

TimedMediaHandler 和相關工具鏈支持音視頻上傳與預覽。

以下示例使用維基共享資源(Commons)中的公共文件,理論上可直接顯示:

示例語法:

[[File:Example.ogg|thumb|音频示例(Commons)]]
[[File:Example.ogg|30px]]
[[File:Big Buck Bunny 4K.webm|300px|thumb|视频示例(Commons)]]

示例效果:

Error missing media source
音頻示例(Commons)
Error missing media source
視頻示例(Commons)

參見