M-Enter
可以生成标题
/italic/斜体
*bold*黑体
_underlined_下划线
=code= 等宽
~verbatim~表保持原有格式输出(LaTeX有个verbatim环境,功能一样)
#<>标志着一个锚点 [[anchor][description]]链接到锚点
<<>> 则全文所有[[anchor]]都是到上面锚点的链接 C-c C-c update
C-c C-x f 即可快速添加添加Footnote 形式是[fn:1]并将光标转到Footnote处 也可以[1]这样来添加,但需要手工添加Footnote文本,建议用上面那个。
#+BEGIN_CENTER与 #+END_CENTER之间的文本居中 #+BEGIN_VERSE #+END_VERSE和#+BEGIN_QUOTE #+END_QUOTE可以保留引文的格式 #+BEGIN_SRC #+END_SRC 源码环境
-n | add line number |
-r | reference |
注意下面源码中要把\ref换成ref #+BEGIN_SRC emacs-lisp -n -r (save-excursion (\ref:sc) (goto-char (point-min)) (\ref:jump) #+END_SRC In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]] jumps to point-min.
效果:
1: (save-excursion 2: (goto-char (point-min))
In line 1 we remember the current position. Line 2 jumps to point-min.
插入表格的快捷键
#+CAPTION: 表格或者图片的标题 #+LABEL: label_name 标记一个标签,\ref{label_naem}可以引用该标签 #+ATTR_HTML: border="3" rules="all" frame="all 指定表格边框及宽度
简单地显示一个图片 [[~/Desktop/Screenshot.png]] 显示一个图片ubuntu_log.png,单击该图片会链接到baidu [[http://baidu.com][file:/media/Source_Study/Picture/Collections/ubuntu_logo.png]] 显示一个图片ubuntu_log.png,单击该图片会链接到Screenshot.png [[file:~/Desktop/Screenshot.png][file:/media/Source_Study/Picture/Collections/ubuntu_logo.png]] #+ATTR_HTML可以指定图片或表格的属性,例如:#+ATTR_HTML: alt="cat/spider image" title="Action!" align="right"
快捷键 C-c C-a
可以列出选项,其中a是添加文件系统中的文件来做为附近
以 - + * (必须缩进以区分 outline 的)
以 1或 1.或 1)开头
以-开头后跟 空格 待描述字 :: 描述
C-c - | turn heading line to items |
C-c * | turn item into headling |
S-UP/DOWN | previous/next item |
M-S-UP/DOWN | move item up/down |
CANNOT INCLUDE FILE ~/filename 如果是源码文件的话可以加上src 语言类型 CANNOT INCLUDE FILE ~/filename
C-c ' | visit the include file at point |
`C-c C-e t' Insert template with export options, see example below. #+TITLE: the title to be shown (default is the buffer name) #+AUTHOR: the author (default taken from `user-full-name') #+DATE: a date, fixed, of a format string for `format-time-string' #+EMAIL: his/her email address (default from `user-mail-address') #+DESCRIPTION: the page description, e.g. for the XHTML meta tag #+KEYWORDS: the page keywords, e.g. for the XHTML meta tag #+LANGUAGE: language for HTML, e.g. `en' (`org-export-default-language') #+TEXT: Some descriptive text to be inserted at the beginning. #+TEXT: Several lines may be given. #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t f:t TeX:t ... #+BIND: lisp-var lisp-val, e.g.: org-export-latex-low-levels itemize You need to confirm using these, or configure `org-export-allow-BIND' #+LINK_UP: the ``up'' link of an exported page #+LINK_HOME: the ``home'' link of an exported page #+LATEX_HEADER: extra line(s) for the LaTeX header, like \usepackage{xyz} #+EXPORT_SELECT_TAGS: Tags that select a tree for export #+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export 其中#+OPTIONS可以指定选项有: H: set the number of headline levels for export num: turn on/off section-numbers toc: turn on/off table of contents, or set level limit (integer) \n: turn on/off line-break-preservation @: turn on/off quoted HTML tags :: turn on/off fixed-width sections |: turn on/off tables ^: turn on/off TeX-like syntax for sub- and superscripts. If you write "^:{}", `a_{b}' will be interpreted, but the simple `a_b' will be left as it is. -: turn on/off conversion of special strings. f: turn on/off footnotes like this[1]. todo: turn on/off inclusion of TODO keywords into exported text pri: turn on/off priority cookies tags: turn on/off inclusion of tags, may also be `not-in-toc' <: turn on/off inclusion of any time/date stamps like DEADLINES *: turn on/off emphasized text (bold, italic, underlined) TeX: turn on/off simple TeX macros in plain text LaTeX: turn on/off LaTeX fragments skip: turn on/off skipping the text before the first heading author: turn on/off inclusion of author name/email into exported file creator: turn on/off inclusion of creator info into exported file timestamp: turn on/off inclusion creation time into exported file d: turn on/off inclusion of drawers
写了两篇文章:配置Emacs org-mode利用latex生成pdf文件 及 关于利用xelatex不能将latex转化为html
Export Options | |
insert template with export option | C-c C-e t |
MOTION | |
next/previous headings | C-c C-n/C-p |
next/previous headings, same level | C-c C-f/b |
backward to higher level heading | C-c C-u |
previous/next plain list items | S-UP/DOWN |
Structure editing | |
promote/demote heading | M-LEFT/RIGHT |
promote/demote current subtree | M-S-LEFT/RIGHT |
turn (head)line into items, cycle item type | C-c - |
turn items/line into headline | C-c * |
move subtree/list item up/down | M-S UP/DOWN |
Links | |
insert a link | C-c C-l |
insert file link with file name completetion | C-u C-c C-l |
edit link at point | C-c C-l |
find next link | C-c C-x C-n |
find previous link | C-c C-x C-p |
表格生成是Org的一大特点,其快捷键基本如下(不一定死记,用的时候多查看,久了自然记住了)
Creating a table | |
just starting typing | |
convert region to table | C-c bar |
separator at least 3 spaces | c-3 C-c bar |
Commands available inside tables | |
re-align the table, move to next field | TAB |
re-align the table, move to the next row | RET |
move to previous field | S-TAB |
move to the begin/end of field | M-a/e |
Row and column editing | |
move the current column left/right | M-LEFT/RIGHT |
kill the current column | M-S-LEFT |
insert new column to left of cursor position | M-S-RIGHT |
move the current row up/down | M-UP/DOWN |
kill the current row | M-S-UP |
insert new row above the current row | M-S-DOWN |
Insert Hline | |
insert hline above the current line | C-u C-c - |
insert hline below the current line | C-c - |
insert hline and move to line below it | C-c RET |
sort lines in region | C-c ^ |
Regions | |
edit the current field in a seperate window | C-c ' |
export as tab-seperated file | M-x org-table-export |
import tab-seperated file | M-x org-table-import |
加入以下代码即可:
#+BEGIN_HTML#+END_HTML
将其中的搜索改成自己的就好
#+BEGIN_HTML#+END_HTML
#+BEGIN_HTML#+END_HTML
不是关于Org-mode的 Emacs Tricks(不断更新中)
写了篇文章:Emacs Org-mode 生成 HTML CSS 配置
org-remember是中一个比较好用的功能,先贴上我的配置:
(org-remember-insinuate) (setq org-default-notes-file "~/.emacs.d/GDT/.notes.org") (define-key global-map [M-f12] 'org-remember) (setq org-remember-templates '(("TODO" ?t "* TODOS %^{TO DO What(Briefly)} \n %?" "~/.emacs.d/GDT/.notes.org" "TODO") ("IDEA" ?i "* TODO %^{What's your IDEA (Briefly)} \n %?" "~/.emacs.d/GDT/.notes.org" "IDEA") ("MOVIE" ?m "* TODO %^{Enter the Movie Name}\n %?" "~/.emacs.d/GDT/.notes.org" "MOVIE") ("SITES" ?s "* %^{Enter the Name of the Site}\n %?" "~/.emacs.d/GDT/.notes.org" "SITES") ("BlogToPublish" ?b "* %^{Enter the Name of the Blog}\n %a %?" "~/.emacs.d/GDT/.notes.org" "BlogToPublish")))
设置M-F12为org-remember快捷键,并在~/.emacs.d/GDT下建立了一个.notes.org文件。 比如现在我想到有一件要做的事,我可以把它记下来: M-F12 在Mini Buffer中出现如下图所示的几个选项,分别是TODO IDEA MOVIE SITES BlogToPublish.
此时按下t然后根据提示输入想办的事情。 再比如我遇到一个好的网站,M-F12,然后输入s 然后根据提示输入网站内容及网址。
以("IDEA" ?i "* TODO %What's your IDEA (Briefly) \n %?" "~/.emacs.d/GDT/.notes.org" "IDEA")为例: