跳转至

Table of Contents

  1. 标题
    1. 代码实例
    2. 大纲相关的快捷键
      1. 折叠
      2. 大纲间移动
      3. 基于大纲的编辑
      4. 关于大纲显示
    3. 轻量级标记语言
      1. 段落
      2. 字体
      3. 列表
  2. Organize Party [100%]
    1. Call people [2/2]
      1. Peter
      2. Sarah
    2. Buy products
    3. 表格
      1. 表格语法
      2. 表格快捷键
      3. 分隔线
      4. 链接
      5. 标记
      6. 代码块
      7. 脚注
      8. anchor
      9. todo
      10. 导出
      11. math

标题

文章中的标题可以通过 #+TITLE 来设置;正文中的标题可以通过 * 来设置, 一个 * 代表一级。

代码实例

* 这是一个一级标题
** 这是一个二级标题
*** 这是一个三级标题

大纲相关的快捷键

折叠

快捷键 说明
S-Tab 循环 整个文档的 的大纲状态
TAB 循环切换 光标所在 大纲的状态

大纲间移动

快捷键 说明
C-c C-n/p 下/上一级标题
C-c C-f/b 下/上一级标题 (仅限同级标题)
C-c C-u 跳转到上一级标题

基于大纲的编辑

快捷键 说明
M-Return 插入一个同级标题
M-S-Return 插入一个同级TODO标题
M-Left/Right 将当前标题升级/降级
M-S-Left/Right 将当前标题(和子标题一起)升级/降级
M-S-UP/DOWN 将标题上/下移动
C-c C-t / S-L/R todo done 切换
S-U/D 任务优先级 切换
C-c / 只保留大纲

关于大纲显示

  • 当前文档显示缩进 M-x: org-indent-mode
  • 默认显示缩进 #+STARTUP: indent

轻量级标记语言

段落

org Mode 中,需要回车两行开始新的段落。 这是一段文字 这还是第一个段文字

这是第二段文字。

字体

  • bold *bold*
  • italic italic
  • underline underline
  • H2 O; e=mc2
  • git

列表

  1. ordered list

    1. first item
      1. sub task 1
      2. sub task 2
    2. second item
  2. unordered list

    可使用 -, +, * 开头

    • List
      • sublist
        • subsub list
  3. 添加列表完成进度

Organize Party [100%]

Call people [2/2]

DONE Peter

DONE Sarah

DONE Buy products

  1. 添加时间戳

    C-c C-s/d schedule/deadline

    C-c > 日历

  2. 任务一

  3. 有关列表的快捷键

    快捷键 说明
    M-Return 插入一个同级项
    M-S-Return 插入一个带有复选框的项
    M-Left/Right 升级/降级
    M-S-Left/Right 将当前项(和项一起)升级/降级
    M-S-UP/DOWN 上/下移动
    C-c C-c 改变复选框状态
    C-c - 循环切换列表标记

表格

表格语法

| Name     | Height | Weight | Age |
|----------+--------+--------+-----|
| Abcdefgh |    178 |    123 |  18 |

表格快捷键

Table 1: 表格标题
快捷键 说明
C-c 竖线 创建表格
C-c C-c 调整表格
Tab/S-Tab 移动
M-Left/Right 移动列
M-Up/Down 移动行
M-S-L/R 删除/插入列
M-S-U/D 删除/插入行
C-c - 添加水平分割线
C-c ^ 排序
一级部门 二级部门 人数
A A.1 5
  A.2 6
B B.1 7
  B.2 3

分隔线

_

链接

  1. 链接语法

    • C-c C-i 插入链接
    • C-c C-o 点击链接

    The Missing Semester of your CS education NCU local version

    docx 文件

    视频

标记

在标题后 :tag1:tag2:tag3...

代码块

  • C-c C-, 生成模板
  • C-c ' 在小窗编辑代码块

    module tb;
        reg clk;
        initial begin
            clk = 1'b0;
        end
        always #5 clk = ~clk;
    endmodule
    #include <stdio.h>
    int main ()
      {printf("hello emacs\n"); return 0;}

Sede Max cites H-index
Chile 257.72 21.39
Leeds 165.77 19.68
Sao Paolo 71.00 11.50
Stockholm 134.19 14.33
Morelia 257.56 17.67

    cities = [d[0] for d in data];
    for _ in cities:
        print(_)
    import matplotlib
    import matplotlib.pyplot as plt
    matplotlib.use('Agg')
    fig=plt.figure(figsize=(3,2))
    plt.plot([1,3,2])
    fig.tight_layout()
    plt.savefig('myfig.png')
    return './myfig.png' # return this to org-mode

    #include "Foo.cpp"
    #include <utility>
    // 模板参数的推导还不是很熟

    template <typename T>
    class Container {
        int capacity = 512;
        int size = 0;
        T* data;
    public:
        // using 可以支持泛型吗
        class containerIterator;
        using iterator=containerIterator;
        // 无参构造器
        explicit Container ()
            : size(0), data(static_cast<T*>(malloc(capacity * sizeof(T)))) {}

        // 有参构造器
        explicit Container (int capacity)

脚注

Latex is the best engine1, It is a great tool.

anchor

go to p1

C-c %/& 记忆/回溯位置

todo

  • execute code in org, using babel?
  • export and preview org
  • Latex support

导出

  • C-c C-e 导出,可以看 menu bar 里的快捷键
  • M-x:org-md-export-as-markdown 导出 markdown file

math

  • C-c C-x C-l 预览latex
  • C-c C-x C-v 预览图片
\[\begin{equation} x = \sqrt{2} \end{equation}\]

Footnotes

1 http://www.latexlive.com

颜色主题调整

评论区~