Xin chào các bạn .
Bách khoa toàn thư Wiki CMT là trang web cung cấp tài liệu hướng dẫn chia sẻ kiến thức. Ở trang web của chúng tôi các bạn có thể tìm thấy:
CMT Wiki hỗ trợ ngôn ngữ đánh dấu đơn giản ( tương tự HTML) nhằm mục đích đơn giản hóa việc đọc, soạn thảo các file. Bài viết này sẽ giới thiệu cú pháp mà bạn cần biết khi viết bài chia sẻ kiến thức trên CMT Wiki. Trước tiên để tìm hiểu về cú pháp bạn nhấn vào nút Biên Soạn để thực hiện biên soạn bài viết. Trong quá trình tìm hiểu chỉ nên thử ở bài viết Test.
CMT Wiki cho phép soạn Text theo các định dạng bold, italic, underlined và monospaced .
DokuWiki định dạng ký tự **bold**, //italic//, __underlined__ and ''monospaced''. Đồng thời cho phép kết hợp các định dạng với nhau **__//''combine''//__** .
CMT Wiki cho phép tạo định dạng subscript và superscript.
Bạn có thể định dạng <sub>subscript</sub> và <sup>superscript</sup>.
CMT Wiki cho phép tạo định dạng deleted .
CMT Wiki cho phép tạo định dạng <del>deleted</del>.
Paragraphs Được tạo ra từ nhóm các dòng trắng. Nếu bạn muốn tạo một dòng trắng ngoài paragraph bạn có thể dùng hai dấu nháy ngược và dấu cách ở cuối dòng.
Dưới đây là một đoạn văn bản ví dụ.
Lưu ý hai dấu nháy ngược chỉ được chấp nhận ở cuối dòng.
hoặc tiếp theo là dấu cách
.Ký tự \\sẽ không xuống dòng.
Dưới đây là một đoạn văn bản ví dụ.\\ Lưu ý hai dấu nháy gược chỉ được chấp nhận ở cuối dòng.\\ hoặc tiếp theo là dấu cách\\ .Ký tự \\sẽ không xuống dòng.
Wiki CMT hỗ trợ một số cách tạo liên kết.
Liên kết ngoại như http://www.google.com hoặc www.google.com - Bạn có thể tạo liên kết: Liên kết này sẽ trỏ tới google. Tương tự với địa chỉ Email: andi@splitbrain.org.
Wiki CMT hỗ trợ một số cách tạo liên kết. Liên kết ngoại như http://www.google.com hoặc www.google.com - Bạn có thể tạo liên kết: [[http://www.google.com|Liên kết này sẽ trỏ tới google]] . Tương tự với địa chỉ Email: <andi@splitbrain.org> .
Liên kết nội được tạo ra bởi ngoặc vuông. Cú pháp pagename hoặc link text.
Liên kết nội được tạo ra bởi ngoặc vuông. Cú pháp [[pagename]] hoặc [[pagename|link text]].
Bạn có thể sử dụng test.
Bạn có thể sử dụng [[tim_hieu_cmt_wiki:test]].
CMT Wiki cũng hỗ trợ liên kết section. Thêm tên section phía sau ký tự hash. Liên kết tới this Section.
Liên kết tới [[syntax#internal|this Section]].
Bạn có thể tạo liên kết hình ảnh để link tới trang khác thông qua cấu trúc kết hợp images như dưới đây:
[[http://www.php.net|{{wiki:dokuwiki-128.png}}]]
Lưu ý: Định dạng file ảnh theo định dạng CMT Wiki.
Bạn có thể thêm footnotes 1) bằng cách sử dụng dấu ngoặc kép.
Bạn có thể thêm footnotes ((Đây là một footnote)) bằng cách sử dụng dấu ngoặc kép.
Bạn có thể tạo tiêu đề tới 5 mức. Nếu bài viết có trên 3 headline thì sẽ có một mục lục tự động được tạo ra – Ngoài ra có thể Disable thông qua cú pháp ~~NOTOC~~ .
==== Headline Level 3 ==== === Headline Level 4 === == Headline Level 5 ==
By using four or more dashes, you can make a horizontal line:
Bạn định dạng hình ảnh và kích thước theo cú pháp sau .
Định dạng với khích thước cố định 2):
Khính thước lấy từ file ngoài:
Khích thước thực: {{wiki:dokuwiki-128.png}}
Khích thước định dạng theo chiều rộng: {{wiki:dokuwiki-128.png?50}}
Khích thước định dạng theo chiều cao: {{wiki:dokuwiki-128.png?200x50}}
Khích thước được định dạng: {{http://de3.php.net/images/php.gif?200x50}}
Sử dụng dấu cách bạn có thể định dạng hình thức căn lề.
{{ wiki:dokuwiki-128.png}}
{{wiki:dokuwiki-128.png }}
{{ wiki:dokuwiki-128.png }}
Đồng thời thêm title (hiển thị tooltip).
{{ wiki:dokuwiki-128.png |This is the caption}}
Nếu bạn định dạng file không phải là hình ảnh nó sẽ hiện thị dạng link.
Liên kết hình ảnh xem ở mục Image Links.
Để tạo một danh sách các đối tượng bạn căn lề bằng hai ký tự cách đồng thời sử dụng ký tự * cho danh sách không sắp xếp hoặc ký tự - cho danh sách sắp xếp.
* This is a list
* The second item
* You may have different levels
* Another item
- The same list but ordered
- Another item
- Just use indention for deeper levels
- That's it
Xem chi tiết thêm về danh sách FAQ on list items.
DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML.
The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, but can be configured to use other HTML as well.
FIXME
DELETEME Typography: DokuWiki can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.
→ ← ↔ ⇒ ⇐ ⇔ » « – — 640×480 © ™ ® “He thought 'It's a man's world'…”
-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) "He thought 'It's a man's world'..."
The same can be done to produce any kind of HTML, it just needs to be added to the pattern file.
There are three exceptions which do not come from that pattern file: multiplication entity (640×480), 'single' and “double quotes”. They can be turned off through a config option.
Some times you want to mark some text to show it's a reply or comment. You can use the following syntax:
I think we should do it > No we shouldn't >> Well, I say we should > Really? >> Yes! >>> Then lets do it!
I think we should do it
No we shouldn't
Well, I say we should
Really?
Yes!
Then lets do it!
CMT Wiki cho phép tạo bảng thông qua cú pháp:
| Heading 1 | Heading 2 | Heading 3 |
|---|---|---|
| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 |
| Row 2 Col 1 | some colspan (note the double pipe) | |
| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 |
Mỗi dòng của bảng bắt đầu và kết thúc bởi ký tự | . Tiêu đề bảng quy định bởi ký tự ^ .
^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | | Row 2 Col 1 | some colspan (note the double pipe) || | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 |
To connect cells horizontally, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators!
Vertical tableheaders are possible, too.
| Heading 1 | Heading 2 | |
|---|---|---|
| Heading 3 | Row 1 Col 2 | Row 1 Col 3 |
| Heading 4 | no colspan this time | |
| Heading 5 | Row 2 Col 2 | Row 2 Col 3 |
As you can see, it's the cell separator before a cell which decides about the formatting:
| ^ Heading 1 ^ Heading 2 ^ ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | ^ Heading 4 | no colspan this time | | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 |
You can have rowspans (vertically connected cells) by adding ::: into the cells below the one to which they should connect.
| Heading 1 | Heading 2 | Heading 3 |
|---|---|---|
| Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 |
| Row 2 Col 1 | Row 2 Col 3 | |
| Row 3 Col 1 | Row 2 Col 3 |
Apart from the rowspan syntax those cells should not contain anything else.
^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | | Row 2 Col 1 | ::: | Row 2 Col 3 | | Row 3 Col 1 | ::: | Row 2 Col 3 |
You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text.
| Table with alignment | ||
|---|---|---|
| right | center | left |
| left | right | center |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
This is how it looks in the source:
^ Table with alignment ^^^ | right| center |left | |left | right| center | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
Note: Vertical alignment is not supported. olll
If you need to display text exactly like it is typed (without any formatting), enclose the area either with <nowiki> tags or even simpler, with double percent signs %%.
This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. The same is true for //__this__ text// with a smiley ;-).
<nowiki> This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. </nowiki> The same is true for %%//__this__ text// with a smiley ;-)%%.
You can include code blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags <code> or <file>.
This is text is indented by two spaces.
This is preformatted code all spaces are preserved: like <-this
This is pretty much the same, but you could use it to show that you quoted a file.
Those blocks were created by this source:
This is text is indented by two spaces.
<code> This is preformatted code all spaces are preserved: like <-this </code>
<file> This is pretty much the same, but you could use it to show that you quoted a file. </file>
CMT Wiki cho phép bạn highlight mã nguồn. CMT Wiki sử dụng cú pháp GeSHi
/** * The HelloWorldApp class implements an application that * simply displays "Hello World!" to the standard output. */ class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); //Display the string. } }
Các kiểu ký tự sau được sử dụng: 4cs, abap, actionscript-french, actionscript, actionscript3, ada, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, ecmascript, eiffel, email, erlang, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lisp, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, plsql, postgresql, povray, powerbuilder, powershell, progress, prolog, properties, providex, purebasic, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, z80
Bạn có thể tạo ra đoạn mã cho phép download khi sử dụng cú pháp <code> hoặc <file> . :
Ví dụ:
<file php myexample.php> <?php echo "hello world!"; ?> </file>
<?php echo "hello world!"; ?>
Nếu bạn không muốn highlighting cho file có thể download sử dụng cú pháp sau <code - myfile.foo>.
Bạn có thể nhúng mã HTML hoặc PHP vào bài viết sử dụng thẻ <html> hoặc<php> . (Use uppercase tags if you need to enclose block level elements.)
Ví dụ nhúng HTML:
<html> This is some <span style="color:red;font-size:150%;">inline HTML</span> </html> <HTML> <p style="border:2px dashed red;">And this is some block HTML</p> </HTML>
This is some inline HTML
And this is some block HTML
Ví dụ nhúng PHP:
<php> echo 'A logo generated by PHP:'; echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; echo '(generated inline HTML)'; </php> <PHP> echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; echo '</tr></table>'; </PHP>
echo 'A logo generated by PHP:';
echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />';
echo '(inline HTML)';
echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>'; echo '</tr></table>';
Ghi chú: Mã nhúng HTML và PHP mặc định bị disable . Nếu cấu hình Enable lên đoạn mã HTML và PHP đó sẽ được thực thi.
DokuWiki can integrate data from external XML feeds. For parsing the XML feeds, SimplePie is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters:
| Parameter | Description |
|---|---|
| any number | will be used as maximum number items to show, defaults to 8 |
| reverse | display the last items in the feed first |
| author | show item authors names |
| date | show item dates |
| description | show the item description. If HTML is disabled all tags will be stripped |
| n[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). |
The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. DokuWiki will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells DokuWiki to re-render the page if it is more than refresh period since the page was last rendered.
Example:
{{rss>http://slashdot.org/index.rss 5 author date 1h }}
Ví dụ về lệnh Macro tạo bảng
| Macro | Mô tả |
|---|---|
| ~~NOTOC~~ | If this macro is found on the page, no table of contents will be created |
| ~~NOCACHE~~ | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the <php> syntax above is used), adding this macro will force DokuWiki to rerender a page on every call |