emacs-wiki markup 标记语言

C-h v emacs-wiki-publishing-markup 可以在正确的安装了emacs-wiki之后打开markup的帮助页

emcas-wiki-publishing-markup定义在 emacs-wiki-publish.el中,是可以被定义的


每一条规则都是一个函数,或者是向量,他们的形式如下
[REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL].

REGEXP是一个正则表达式,或者值是正则表达式的符号
TEXT-BEGIN-GROUP是被匹配的文本
REPLACEMENT-TEXT是要被传递给`replace-match'的字符串,如果是个函数而不是字符串,就会调用函数,函数返回字符串。如果是个符号,符号的值也得是个字符串。

替换按照顺序执行,每次一条规则。写正则表达式是个很麻烦的事情。大小写是敏感的。


标题
* First level
** Second level
*** Third level
第一级标题实际上使用的是H2号


水平线
----

重点
*emphasis*
**strong emphasis**
***very strong emphasis***
_underlined text_
=verbatim=

Footnotes 脚注
  A reference[1], which is just a number in square brackets,
  constitutes a footnote reference.
  Footnotes:
  [1]  Footnotes are defined by the same number in brackets
       occurring at the beginning of a line.  Use footnote-mode's C-c
       ! a command, to very easily insert footnotes while typing.  Use
       C-x C-x to return to the point of insertion.

首先要开启footnote-mode,M-x footnote-mode,然后在要插入脚注的地方,什么都不用输入,C-c !,叹号是shift+1打上的,然后emacs会自动的编号的,并且增加了一个脚注的提示,然后你就输入需要输入的东西就可以了。输入完成之后,C-x C-x,连着两次的输入退出,然后就可以查看效果了。
脚注的标号是在右上角的,并且在当前页形成一个锚。


Paragraphs 段落
  One or more blank lines separates paragraphs. 分段就是空行,最少空上一行就行了。


Centered paragraphs and quotations 段落居中这个我还没发现管用。。
  A line that begins with six or more columns of whitespace (made up
  of tabs or spaces) indicates a centered paragraph.  I assume this
  because it's expected you will use M-s to center the line, which
  usually adds a lot of whitespace before it.
  If a line begins with some whitespace, but less than six columns, it
  indicates a quoted paragraph.


Poetic verse 诗歌
  Poetry requires that whitespace be preserved, without resorting to 尖括号后面一定要有一个空格
  the monospace typical of <pre>.  For this, the following special
  markup exists, which is reminiscent of e-mail quotations:
    > A line of Emacs verse;
    > forgive its being so terse.
  You can also use the <verse> tag, if you prefer:
    <verse> 这个标签也是可以用的

    A line of Emacs verse;
    forgive its being so terse.
    </verse>


Literal paragraphs 纯文本的
  Use the HTML tags <pre></pre> to insert a paragraph and preserve
  whitespace.  If you're inserting a block of code, you will almost
  always want to use <verbatim></verbatim> *within* the <pre> tags.
  The shorcut for doing this is to use the <example> tag:
    <example>
    Some literal text or code here.
    </example>


Lists 列表
  - bullet list 减号后面要有空格
  1. Enumerated list 点后面要有空格
  Term :: A definition list
  Blank lines between list elements are optional, but required between
  members of a definition list.


Tables 表格
  There are two forms of table markup supported.  If Takaaki Ota's
  table.el package is available, then simply create your tables using
  his package, and they will be rendered into the appropriate HTML.
  You need to (require 'emacs-wiki-table) for this functionality.

  If table.el is not available, then only very simple table markup is
  supported.  The attributes of the table are kept in
  `emacs-wiki-table-attributes'.  The syntax is:

    Double bars || Separate header fields 两个竖线是开始
    Single bars | Separate body fields        一个竖线是内容
    Here are more | body fields
    Triple bars ||| Separate footer fields     三个竖线是结束

  Other paragraph markup applies to both styles, meaning that if six
  or more columns of whitespace precedes the first line of the table,
  it will be centered, and if any whitespace at all precedes first
  line, it will occur in a blockquote.


Anchors and tagged links

  #example If you begin a line with "#anchor" -- where anchor
  can be any word that doesn't contain whitespace -- it defines an
  anchor at that point into the document.  This anchor text is not
  displayed. 锚不显示出来

  You can reference an anchored point in another page (or even in the 可以在其他地方引用
  current page) using WikiName#anchor.  The #anchor will never be
  displayed in HTML, whether at the point of definition or reference,
  but it will cause browsers to jump to that point in the document. 还不知道怎么引用


Redirecting to another page or URL 自动重定向...
  Sometimes you may wish to redirect someone to another page.  To do
  this, put:

    <redirect url="http://somewhereelse.com" />

  at the top of the page.  If the <redirect> tag specifies content,
  this will be used as the redirection message, rather than the
  default.

  The numbers of seconds to delay is defined by
  `emacs-wiki-redirect-delay', which defaults to 2 seconds.  The page
  shown will also contain a link to click on, for browsing which do
  not support automatic refreshing.


URLs

  A regular URL is given as a link.  If it's an image URL, it will
  be inlined using an IMG tag.

Embedded lisp

  <lisp>(concat "This form gets" "inserted")</lisp>

Special handling of WikiNames


  If you need to add a plural at the end of a WikiName, separate it
  with four single quotes (WikiName''''s) or make it an explicit
  link ([[WikiName]]s).


  To prevent a link name (of any type) from being treated as such,
  surround it with =equals= (to display it in monotype), or prefix it
  with the tag <nop> to escape it from WikiName markup.


Special Wiki links


  Besides the normal WikiName type links, emacs-wiki also supports
  extended links:


    [[link text][optional link description]]


  An extended link is always a link, no matter how it looks.  This
  means you can use any file in your `emacs-wiki-directories' as a
  Wiki file.  If you provide an optional description, that's what will
  be shown instead of the link text.  This is very useful for
  providing textual description of URLs.


  See the documentation to emacs-wiki-image-regexp for how to inline
  files and images.


InterWiki names


  There are times when you will want to constantly reference pages on
  another website.  Rather than repeating the URL ad nauseum, you can
  define an InterWiki name.  This is a set of WikiNames to URL
  correlations, that support textual substitution using #anchor names
  (which are appended to the URL).  For example, MeatballWiki is
  defined in the variable `emacs-wiki-interwiki-names'.  It means you
  can reference the page "MeatBall" on MeatballWiki using this
  syntax:


    MeatballWiki#MeatBall


  In the resulting HTML, the link is simply shown as
  "MeatballWiki:MeatBall".

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值