PmWikiZhCn / 语法标记索引
这个页面列出了常用的一些标记语法。
链接
详见Links
External links
http://example.com
[[http://example.com]]
[[http://example.com | link text]]
[[link text -> http://example.com]]
页面链接
[[PageName]]
[[page name]]
[[page (name)]]
[[PageName | link text]]
[[PageName | + ]]
(titled link)
[[PageName | # ]]
(anonymous numerical reference link)
[[link text -> PageName]]
[[#anchor]]
(to create an anchor)
[[#anchor | link text]]
(to refer to an anchor)
[[PageName#anchor | link text]]
(to refer to an anchor in another page)
详见:WikiWord来开启WikiWord
链接。
Wiki组链接
详见Links 和Categories?
[[GroupName/]] or [[Group name/]]
[[GroupName.]]
[[GroupName/PageName]] or [[GroupName/page name]]
[[(GroupName.)page name]]
[[~Author Name]]
[[!Category Name]]
InterMap链接
See InterMap
[[Path:/path/local_document.html]]
[[Wikipedia:WikiWikiWeb]]
Email邮件链接
mailto:someone@example.com
[[(mailto:)someone@example.com]]
[[mailto:someone@example.com | display text]]
[[display text -> mailto:someone@example.com]]
附件链接
Attach:file.odt
[[(Attach:)file.odt]]
[[Attach:file.odt | alternative text ]]
[[Attach:file with spaces.pdf]]
[[Attach:Groupname./file with spaces.pdf]]
图片
插入图片
http://example.com/image.gif
http://example.com/image.gif"alt text"
Attach:image.gif"My image"
Attach:Groupname./image.gif"image in another group"
Attach:Groupname.Pagename/image.gif"image on another page"
%lfloat% Attach:image.gif | Caption %%
(could be %rfloat%, %center%, %rframe%, %lframe% )
%width=200px% Attach:image.gif %%
%thumb% Attach:image.gif %%
图片链接
[[Attach:image.gif]]
[[(Attach:)image.gif]]
[[PageName | Attach:image.gif"alt text"]]
[[http://example.com/ | Attach:image.gif"alt text"]]
%rframe thumb% [[Attach:image.gif | Attach:image.gif"alt text"]] | Caption
Start-of-line markup
列表
详见:List Styles, Wiki styles 和Cookbook:Outline lists
* unordered list
** deeper list
# ordered list
# %item value=#%
arbitrary start number
# %decimal%, %roman%, %ROMAN%, %alpha%, %ALPHA%
:term:definition
或
Q:
start a question paragraph
A:
start an answer paragraph
标题
!! Heading
!!! Deeper heading
段落
-> indented text
-< hanging indent
<space> preformatted text
[@...@]
preformatted block
----
(horizontal rule)
blank line
is vertical space
\
at end of line joins next line
\\
at end of line produces a line break
\\\
at the end of a line produces a blank line, even within a list item
[[<<]]
produces a line break that clears floating content
DIV块
>>wikistyle<<
(:div attr:)
(:divend:)
>><<
文本标记
文字格式
''倾斜''
'''加粗'''
'''''倾斜并加粗'''''
@@monospaced@@
[-小字-], [--更小的文字--]
[+大字+], [++更大的文字++]
'-小-', '+大+'
'^上标^', '_下标_'
{+插入+} (加下划线)
{-删除-} (加删除线)
[@程序代码@]
[=程序文本=]
签名标记
~~
~
(显示作者名)
~~
~~
(显示作者名加日期)
(:encrypt phrase:)
-- replaced with encrypted form of phrase
表格
一般用前后加两个竖线的方式增加一个表格
详见Tables
||table attributes
||!table caption!||
||left aligned || centered || right aligned||
||!column heading||
||spanned columns ||||||
Structured tables
(:table attr:)
(:cellnr attr:)
(:cell attr:)
(:tableend:)
指令
页面指令
(:redirect PageName:)
(:(no)spacewikiwords:)
(:(no)linkwikiwords:)
(:(no)linebreaks:)
(:nl:)
insert newline in the *markup* only if one isn't present. The purpose of (:nl:)
is to be able to write things like:
(:include Page1:)(:nl:)(:include Page2:)
which guarantees that the first line of Page2 is treated as a separate line from the last line of Page1, but without inadvertently generating a blank line between them.
隐藏
详见Page directives? Group headers?
(:noheader:), (:nofooter:)
(:notitle:)
(:noleft:), (:noright:)
(:nogroupheader:), (:nogroupfooter:)
(:noaction:)
HTML中的Meta数据
详见Page directives?, Comment markup, Page variables?
(:title text:)
(:keywords word, ...:)
(:description text:)
(:comment text:)
{Group/PageName$:Var}
includes from (:name:text:)
嵌入页面
详见Include other pages?, Page text variables?
(:include PageName:)
(:include PageName#start#end lines=n paras=n:)
(:include Page1 Page2 Page3:)
{Group/PageName$:Var}
includes from (:name:text:)
条件语句
(:if (!)
cond param:)...(:ifend:)
(:if (!)
cond param:)...(:else:)...(:ifend:)
(:if (!)
cond param:)...(:elseif (!)
cond param:)...(:ifend:)
页面列表
详见:Page lists?
(:searchbox label=label order=-time:)
(:searchresults incl -excl group=abc fmt=def:)
(:pagelist incl -excl group=abc fmt=def:)
其它指令
(:markup:)...(:markupend:)
(:markup class=horiz:)...(:markupend:)
(:markup caption='...':)...(:markupend:)
(:messages:)
表单
详见Forms
(:input form method=get action=url enctype=multipart/form-data:)
(:input default name=xyz value="abc":)
(:input text name=first value="Bob" size=20:)
(:input textarea name=xyz [=value=] rows=2 cols=80:)
(:input submit name=post value="Go" accesskey=g:)
(:input reset:)
(:input hidden name=action value=edit:)
(:input radio name=xyz value="abc" checked=1:)
(:input checkbox name=xyz value="abc" checked=1:)
(:input password name=authpw:)
(:input file name=upload:)
(:input image name=xyz src="http:..." alt="Alt Text":)
(:input select name=xyz value="val1" label="Value 1":)
(:input select name=xyz value="val2" label="Value 2":)
(:input end:)
更多内容,详见:PmWiki Edit forms.
Wiki关系树
详见:Wiki trails?
<<|[[TrailPage]]|>>
<|[[TrailPage]]|>
^|[[TrailPage]]|^
页面参数
详见Page variables?, Page text variables?, Page lists
{
$variable
}
{
pagename$variable
}
(:name:description:)
sets a page text variable?
表达式
{(
function args
)}