Wiki-格式化
其他语言 Deutsch[link1], English[link2], Español[link3], Français[link4], Polski[link5], Русский[link6].参见:Actions组件[link7]
Wacko text formatting[link8] 与其他 wiki 略有不同,因此您应该阅读以下示例。
您可以在 Sandbox[link9] 中试验 Wiki Markup[link8]。
被成对的双引号所包围的文本没有格式化,在显示时保持不变。
| 代码 | 效果 |
目录
{{toc numerate=1}} 详细描述...[link10] |
|
NB: 如果您将它与 'include' 插件一起使用,但不希望从包含文件中提取的标题列在生成的目录中,请使用 'notoc' 选项,如下所示: {{include page="Formatting/Headlines" notoc=1}} | |
基本文本格式
**粗体** | 粗体 |
//斜体// | 斜体 |
__下划线__ | 下划线 |
##源代码## | 源代码 |
--删除线-- | |
++小++ | 小文本 |
!!note!!(also ''note'', but it is better not to use it). | note |
!!(blue) 蓝字!! | 蓝字 |
!!(green) 绿字!! | 绿字 |
!!(red) 红字!! | 红字 |
??高亮文本?? | 高亮文本 |
??(blue)高亮文本?? | 高亮文本 |
??(red)高亮文本?? | 高亮文本 |
??(green)高亮文本?? | 高亮文本 |
%%embed code%% |
int main(int arc,char **argv)
{
printf("Hello, %s!\n", (argc>1) ? argv[1] : "World");
return 0;
}
|
| NB: 删除线,就像下面的所有格式(在本章中)一样,是多行的。 以前的所有格式都不是多行格式,因为我们将制作不会破坏文本的格式。 | |
对齐方式
对齐是在这样一个复杂的结构的帮助下进行的:| default |
左对齐
|
%%(wacko wrapper=text wrapper_align=center) center%% |
居中
|
%%(wacko wrapper=text wrapper_align=right) right%% |
右对齐
|
%%(wacko wrapper=text wrapper_align=justify) justify%% |
两端对齐
|
wrapper_align can be center, right or justify.链接
作为创建链接的字符标记,您可以使用圆形 ((, )) 或方形 [[, ]] 括号。 两种括号效果一样。 如果页面文本已经包含简单的圆括号,方括号,这可能会被错误地视为链接标记。
外部链接
((http://wackowiki.org WackoWiki)) | WackoWiki[link11] |
http://wackowiki.org is highlighted automatically. | http://wackowiki.org |
PPR:OneMinuteWikiInterWiki linking[link12] | PPR:OneMinuteWiki[link13] |
mailto:address@example.com((address@example.com))电子邮件 | mailto:address@example.com address@example.com[link14] |
xmpp:addresse@example.comJabber. | xmpp:addresse@example.com |
((tel:+1-234-567-890 +1-234-567-890))Telephone Number. | +1-234-567-890[link15] |
((geo:-3.075833,37.353333 Mount Kilimanjaro))Geographic Location. | Mount Kilimanjaro[link16] |
((https://example.com/archive.zip Archive (zip) ))https://example.com/archive.zip | Archive (zip)[link17] https://example.com/archive.zip |
内部链接
[[Sandbox]] or ((Sandbox)) | Sandbox[link9] |
((Sandbox The sandbox page)) | The sandbox page[link9] |
https://wackowiki.org/wacko_logo.pngImage with no link. | ![]() |
((/HomePage https://wackowiki.org/wacko_logo.png))Image with a link. | [link18] |
{{anchor href="test"}}anchor declaration. |
|
((#test)) or ((/HomePage#TOC_1))anchor reference. | test or /HomePage#TOC_1[link19] |
注意
- 对于内部链接,可以使用((/Doc/English/Cluster 相对或绝对地址))。
- 混合大小写的词 (LikeThis) 不需要括在括号中。 对于内部链接(在此 Wiki 内),不应写入完整的 URL(否则链接将不起作用)。 仅为外部链接添加“
http://”。 - 为防止 WordLikeThis 被解析为链接,请在其前面放置
~(波浪号)。 - 如何使用指向带有空格的本地文件的链接? (例如:
S:\Network Drive\File 1.txt或//server1\file name.txt)要使用这样的空格链接到服务器上的本地文件,请使用 file:/// 并将所有反斜杠切换为正斜杠。 另外,用%20替换任何空格,这样你的链接就会变成file://///server1/file%20name.txt另外,在 Firefox 上链接到本地文件也有问题 : (解决方案[link20]
- 要调整和对齐来自外部源的图像,您可以使用以下语法:
((http://example.com/image.png width=500 align=center)), available parameterswidth、height和align=[left,center,right]。
包含已上传文件
file:/mammut_mascot.jpg仅检查全局文件 file:mammut_mascot.jpg检查本地文件,该文件仅适用于本页的读者 file:/Subpage/archive.zip本地文件的绝对路径,本地文件必须包含在另一个页面中 文件必须已经上传。 详细描述...[link21] | ![]() file:/Subpage/archive.zip[link22] |
媒体参数
通过附加问号? 并通过与号& 添加附加参数,将参数添加到文件语法中。 例如:
file:/lotus_flower.webp?right&caption&400
(Source:: Yoshikazu TAKADA /Some rights reserved)
- 链接
-
direct- 到文件 -
nolink- 仅显示图片 -
linkonly- 仅显示链接 -
meta- 到 filemeta 处理程序 (默认)
-
- 对齐方式
-
right- 右对齐 -
left- 左对齐 -
center- 居中
-
- 尺寸
-
400x300- 宽 × 高 -
0x700- 高 -
600- 宽
-
- 其他
-
caption- 显示标题 -
clear- 清除浮动
-
标题
带编号或不带编号的列表
使用制表符或双空格缩进列表,并使用
*、1.、A.、a. 或 i。 指定所需的列表类型。
Lists:
first line
indented line
----
* bullet list
* bullet list-2
----
1. numbered list
1. numbered list-2
2.#8 numbered list, with transition
----
A. using upper case characters
A. using upper case characters-2
----
a. using lower case characters
a. using lower case characters-2
----
i. using Roman numbers
i. using Roman numbers-2
----
1. list
1. nested list
* and even more nested list
1. nested list 2
2. list 2
| Lists: first line
indented line
|
引用和定义
<[ Citation of text | Citation of text |
(?Term Some definition?) | Term |
(?Term containing spaces == Some other definition?) | Term containing spaces |
脚注
Text, then footnote[[*]] and second one[[**]] | Text, then footnote* and second one** |
Text, then numeric footnote[[*1]] and second one[[*2]] | Text, then numeric footnote1 and second one2 |
[[#*]] Text for first footnote[[#**]] Text for second footnote[[#1]] Text for numeric footnote[[#2]] Text for second numeric footnote | * Text for first footnote ** Text for second footnote 1 Text for numeric footnote 2 Text for second numeric footnote |
auto-generated footnotes [[^ text of footnote here]] | generates the footnotes at the end of the page, see example[link23] |
层次显示
要将一段文字标记为回复或评论,你可以使用以下语法。
嗨! > 是的,就是这样。 >> 你确定吗? > 当然,是的! >> 真的吗? >>> 现在怎么办? | 嗨! > 是的,就是这样。 >> 你确定吗? > 当然,是的! >> 真的吗? >>> 现在怎么办? |
表格
带边框表格
#|
*|标题 1|标题 2|标题 3|*
||单元格11|单元格12|单元格13||
||单元格21|单元格22||
|#| 标题 1 | 标题 2 | 标题 3 |
|---|---|---|
| 单元格11 | 单元格12 | 单元格13 |
| 单元格21 | 单元格22 | |
无边框表格,100%宽度
#||
||单元格11|单元格12|单元格13||
||单元格21|单元格22||
||#| 单元格11 | 单元格12 | 单元格13 |
| 单元格21 | 单元格22 | |
注意: 如果可用,可以使用内联 HTML 创建复杂表。
要在单元格中包含管道
| 作为内容,请用双引号将管道括起来:""|"" 杂项
水平线 (separator):
----强制换行:
test---new linetest
new line
强制空行:
---"" ""---文本输出“原样”——忽略标记
文本应该用一对双引号括起来,例如
""测试---换行~"". 您可以查看 source of this page 以获取大量示例。此外,对于任何形式的标记的筛选,都可以使用
~ (波浪号)。 内联 HTML
HTML 输出“原样”这只有在站点管理员允许的情况下才有效。
<# <input type="text"> #> | <# <input type="text"> #> |
如果您看到
<input type="text"> 而不是输入字段,则站点管理员不会打开此功能(配置参数:allow_rawhtml)。NB:这是非常危险的选择,避免 XSS!
特殊字符
wiki 中内置的自动校对器会自动将保存的文本调整为格式规范,从而使作者免于进行过度详细的编辑。 以下是它所做的更改: 上标E=mc^^2^^ | E=mc2 |
下标 Insert spaces before and after vv. H vv2vv O | H 2 O |
| Additional | |
^F | °F |
^C | °C |
(p) | § |
(tm) | (tm) |
(c) | (c) |
(r) | (r) |
+- | +- |
~~ | ~ |
巨集
宏是一些小快捷方式,它可以使用相关变量(例如您的姓名和维基名称、写作日期等)自动更新您正在编写的文档。基本上,它们只是小文本快捷方式。
要自动插入您的姓名,请使用:
::::RomanIvanov[link24]
自动显示名称和日期:
::@::RomanIvanov[link24] /20.06.2003 18:13/
日期:
::+::20.06.2003 18:13
语法突出显示
WackoWiki 很容易用文本扩展 formatters[link25]。它们使用语法%%(name) text%% 调用。Wacko 包中包含几个格式化程序:
%%(wacko)The text as it is. ((/HomePage))%%This format displays the text in the same way as if it was written without a formatter. Convenient for applying additional wrappers to text (alignment, boxes, etc. See below.) | The text as it is. /HomePage[link18]
| |||||||||
%%(php) PHP-code%% |
Attention: that code should begin with | |||||||||
%%(comment) Comments, they will be hidden when the page is stored and redisplayed %% | ||||||||||
%%(noautolinks) no AutoLinks if CamelCase-Words%% | no AutoLinks if CamelCase-Words
| |||||||||
%%(details title="Summary" open=1) Details info. %% |
SummaryThe HTML Details Element (<details>) creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state. A summary or label can be provided using the <summary> element.
| |||||||||
%%(cl)zypper dup --no-recommends%% |
zypper dup --no-recommends | |||||||||
%%(chat [type="div|table"]) |
| |||||||||
%%(email) Email%% |
Hi! RI>> Yes, it is. >Are you sure? Of course, yes! Roman. | |||||||||
%%(sql) SQL-code%% |
SELECT * FROM sometable | |||||||||
| There's also (ini), (html), (css), (java) and (pascal) highlighters. | ||||||||||
%%(html) HTML-Code%% |
<html> <a href="http://example.com">test</a> </html> | |||||||||
%%(ini) ini-Code%% |
[Wiki] BestEngine="WackoWiki" Version=6 | |||||||||
%%(css) CSS-Code%% |
body {margin: 0; padding: 5px;}
.class {background: url("http://example.com/");}
| |||||||||
%%(pascal) PASCAL-Code%% |
program megaprogramme; { comment } BEGIN if a = 15 then writeln('test'); END. | |||||||||
Info box
Types: default, error, example, important, note, question, quote, success, warningtitle box titleicon show icon, default value is 1 | ||||||||||
%%(info type="note")
|
A wiki is a website where users can add, remove, and edit every page using a web browser. It's so terrifically easy for people to jump in and revise pages that wikis are becoming known as the tool of choice for large, multiple-participant projects.
| |||||||||
%%(info type="warning")
|
As with any software that you expose to the internet, there may be bugs or security problems. Do not install WackoWiki unless you intend to keep up with security upgrades.
| |||||||||
PEAR 语法突出显示PEAR package for syntax highlighting
Formatter: abap, cpp, css, diff, dtd, html, java, javascript, perl, php, ruby, python, sh, sql, vbscript, xml. | ||||||||||
%%(hl css) CSS-Code%%
|
body {margin: 0; padding: 5px;} .class {background: url("http://example.com/");} | |||||||||
%%(hl javascript) Javascript-Code%%
|
var a = document.getElementById("test"); a.value = new Array(15, 31); function echo (msg) {alert(msg)}; | |||||||||
%%(hl php numbers=2) PHP-Code%%
|
| |||||||||
%%(hl xml) xml-Code%%
|
<config> <section name="test"> <var>Test</var> <val><![CDATA[..text...]]></val> </section> </config> | |||||||||
GeSHiGeSHi 语法突出显示[link26] - Generic Syntax Highlighter %%(geshi [Formatter] numbers=1 start=35 lines=37) source%% | ||||||||||
%%(geshi css) CSS-Code%%
| Formatter
highlight/geshi not found | |||||||||
If you see Formatter highlight/geshi not found, the GeSHi formatter[link26] was not added to this site. | ||||||||||
Wrappers around formatters
其他语言 Deutsch[link27], English[link28], Français[link29], Русский[link30].
此外,可以使用参数 wrapper= 为每个格式化程序 %%(formatter) text%% 分配一个特定的包装器。
%%(formatter
[wrapper="box | shade | page | text"]
[wrapper_align= "left | center | right | justify"]
[wrapper_title="Titel"]
[wrapper_type="default | error | example | important | note | question | quote | success | warning"]
[wrapper_width="pixel"]
[col=1 | 2 | 3 | 4 | 5]
[clear])
Text
%%| box | shade | page | text | |
|---|---|---|---|---|
| type | + | + | – | - |
| title | + | + | – | - |
| alignment | + | –1 | –2 | + |
| clear | + | + | – | – |
| width | + | –1 | + | –3 |
| column | – | + | – | + |
| frame | + | + | – | – |
| automatic line feed | + | + | + | – |
1 这个选项没有意义,因为块的宽度总是等于页面的宽度。
2 只在左边。
3 如果您不自己放置换行符,则引擎将块宽度固定为页面宽度的大约 90%。
Grammar = [FORMATTER | FORMAT WRAPPER | FORMAT WRAPPER OPTION | Text]
FORMATTER = [ cl | comment | css | email | hl * | html | info | ini | java | pascal | php | sql | wacko ]
FORMAT WRAPPER = box, shade, page und text
TEXT = alles, frei.
box
- [link1] https://wackowiki.org/doc/Doc/Deutsch/Formatierung
- [link2] https://wackowiki.org/doc/Doc/English/Formatting
- [link3] https://wackowiki.org/doc/Doc/Español/ReglasFormato
- [link4] https://wackowiki.org/doc/Doc/Français/MiseEnForme
- [link5] https://wackowiki.org/doc/Doc/Polski/FormatowanieTekstu
- [link6] https://wackowiki.org/doc/Doc/Русский/WackoСинтаксис
- [link7] https://wackowiki.org/doc/Doc/简体中文/Actions组件
- [link8] https://wackowiki.org/doc/Doc/简体中文/Markup
- [link9] https://wackowiki.org/doc/Sandbox
- [link10] https://wackowiki.org/doc/Doc/简体中文/Actions组件/TableOfContents
- [link11] http://wackowiki.org
- [link12] https://wackowiki.org/doc/Doc/English/WikiConcept/InterWiki
- [link13] https://wiki.c2.com/?OneMinuteWiki
- [link14] mailto:address@example.com
- [link15] tel:+1-234-567-890
- [link16] geo:-3.075833,37.353333
- [link17] https://example.com/archive.zip
- [link18] https://wackowiki.org/doc/HomePage
- [link19] https://wackowiki.org/doc/HomePage#TOC_1
- [link20] http://kb.mozillazine.org/Links_to_local_pages_don't_work
- [link21] https://wackowiki.org/doc/Doc/简体中文/Actions组件/文件上传
- [link22] https://wackowiki.org/doc/Subpage/file?get=archive.zip
- [link23] https://wackowiki.org/doc/Doc/简体中文/格式化/脚注
- [link24] https://wackowiki.org/doc/Users?profile=RomanIvanov
- [link25] https://wackowiki.org/doc/Doc/English/Formatters
- [link26] https://wackowiki.org/doc/Dev/PatchesHacks/GeSHi
- [link27] https://wackowiki.org/doc/Doc/Deutsch/Formatierung/Wrapper
- [link28] https://wackowiki.org/doc/Doc/English/Formatting/Wrapper
- [link29] https://wackowiki.org/doc/Doc/Français/MiseEnForme/CadreFormatage
- [link30] https://wackowiki.org/doc/Doc/Русский/WackoСинтаксис/Wrapper

