Emacs 与 VS 的集成
Emacs 之 ediff 学习

Emacs-WiKi-Mode-

皮贝贝 posted @ 2008年12月27日 06:40 in emacs with tags emacs emacs-wiki , 3675 阅读

 引用地址:  imps.bokee.com/99582.html                                 

Emacs-WiKi-Mode 可以用来做笔记,按照章节,结构生成一个有序的文档,可以在emacs中直接看到不同的结构层次,而且可以生成网页。在一个工程下的多个网页还会自动生成index,利用index在各个网页之间跳转。是个很好玩的东东。

 

语法

C-c C-l 切换源码

改变title和css样式

可以在文件开头加入

#title NewTitle
#style NewStyle.css

标题

* 一级标题
** 二级
*** 三级

横线

需要顶头,四个短划

----

强调

*empahsis* and nonemphasis--
**strong emphasis**--
***very strong emphasis***--
_下划线_--
=verbatim=--

empahsis and nonemphasis-- strong emphasis -- very strong emphasis -- 下划线 -- verbatim


取消标记(preventing markup)

用"="可以取消markup

=*emphasia*=

*emphasia*

可以防止中的标记内容被解释,适用于较多的内容,并有"="不具有的功能。

This tag should be  used for larger blocks of text

This tag should be used for larger blocks of text


脚注

方括号内放入数字,表示脚注。在新的一行开头用同样的数字加方括号加入脚注内容

  A reference[1], which is just a number in square brackets,
  constitutes a footnote reference.

[1] 这是脚注

A reference1, which is just a number in square brackets, constitutes a footnote reference.

[1] 这是脚注


段落

  • 空行分段
  • 段落居中,要用6个以上的空格,或者用Tab,在wiki模式中,Tab用C-q Tab实现
  • 如果少于6个空格,就是引用格式,少量缩进

引用原文

用< example > < /example>

  Some literal text or code here. < /example> 

列表

- bullet list

1. Enumerated list

Term :: A definition list (上边是Term,下起一行缩进,解释)
  • bullet list
  1. Enumerated list
Term
A definition list (上边是Term,下起一行缩进,解释)

 


 

Double bars   Separate header fields
Single bars   Separate body fields
Here are more   body fields
Triple bars   Separate footer fields
空格+   +文字, 在文字外加上一个框体

 

表单的border和padding,可以通过M-x customize-variables emacs-wiki-table-attributes


锚点

# 放在句首,定义了一个名字为foo的锚点

#foo anchor point for mode

定义了一个名为foo的锚点,html中并不显示出来

anchor point for mode


引用

引用页面#foo,直接跳转到引用页面的foo处

[[wiki-mode#foo]]跳转到wiki-mode 页面的foo锚点处

wiki-mode


转向

进入页面时自动转入其他页面

URL

直接写URL就可以链接

链接

[[http://www.sina.com.cn][新浪]]

新浪

dotemacs 配置

 

(require 'emacs-wiki)

(setq emacs-wiki-directories '("D:/My Documents/wiki"))

;指定项目及其默认目录
(setq emacs-wiki-projects
      `(("default" . ((emacs-wiki-directories . ("D:/My Documents/wiki/dailynote"))))
       ("emacs" . ((fill-column . 65)
                  (emacs-wiki-directories . ("D:/My Documents/wiki/emacs"))))
       ("linux" . ((fill-column . 65)
                  (emacs-wiki-directories . ("D:/My Documents/wiki/linux"))))))

;不同project的html文件都会发布在project对应目录的publish目录下
;写wiki文档时,最好在指定的wiki目录下工作,否则会把publish目录生
;成在所编辑文件的目录下。生成html文件时,该目录下所有的wiki文件都
;会被发布,如果编辑的文件不在该目录下,;那么该文件生成的html文件和
;wiki目录下的文件一起都会出现在publish目录下
(setq emacs-wiki-publishing-directory "publish")

;也可以指定发布到同一个目录下,如果只有一个项目,这样所有的html文件
;都生成到指定位置了
;(setq emacs-wiki-publishing-directory "D:/My Documents/wiki/publish")

;css文件应该放入publish目录中,也可以在eamcs-wiki-style-sheet
;里指定href所指向的css文件位置
(setq emacs-wiki-style-sheet "
")

; 在wiki-directory下必须有一个emacs-wiki-home-page所指定名字的文件,
; 默认是WelcomePage,才能在生成的html文件里才会出现形如"Home/Index"的
; 样式,这里改为Home。只要在wiki的工作目录下有这样一个文件作为首页即可。
 (setq emacs-wiki-home-page "Home")

; For Chinese Display
(setq emacs-wiki-meta-content-coding "gb2312")
(setq emacs-wiki-charset-default "gb2312")
(setq emacs-wiki-coding-default 'gb2312)

(setq emacs-wiki-inline-relative-to 'emacs-wiki-publishing-directory)
(setq emacs-wiki-anchor-on-word nil)
(setq emacs-wiki-maintainer "mailto:xxxx@gmail.com")
 (setq emacs-wiki-table-attributes "border="1" cellpadding="1"")

(add-hook 'emacs-wiki-mode-hook
      (lambda ()
        (define-key emacs-wiki-mode-map (kbd "C-c C-h") 'emacs-wiki-preview-html)
        (define-key emacs-wiki-mode-map (kbd "C-c C-c") 'emacs-wiki-preview-source)))
(defun emacs-wiki-preview-source ()
  (interactive)
  (emacs-wiki-publish-this-page)
  (find-file (emacs-wiki-published-file)))

(defun emacs-wiki-preview-html ()
  (interactive)
  (emacs-wiki-publish-this-page)
  (browse-url (emacs-wiki-published-file)))

参考文献

http://repose.cx/emacs/wiki/

http://www.magma.com.ni/~jorge/WikiDoc/EmacsWiki.html

 

- 作者: imps 2004年09月12日, 星期日 20:37 加入博采

Trackback

你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=99582

Avatar_small
boardmodelpaper.com 说:
2024年1月20日 01:36

A sample or model question paper created by educational boards or other institutions for a variety of exams is commonly referred to as the Board model paper. These practice papers give students a sense of the format, degree of difficulty, and kind of material that may be covered in the real exam, helping them get ready for exams. Typically, model papers are written for particular courses or subjects. They cover boardmodelpaper.com a variety of subjects and chapters that are anticipated to have been studied by students during the course of the semester.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter