From cb1179082872043c29990e01af8a1d62a7cae0d3 Mon Sep 17 00:00:00 2001 From: Ruijie Yu Date: Tue, 11 Apr 2023 01:32:26 +0800 Subject: [PATCH 12/16] * zh-CN/quickstart.org: zh-CN translation --- zh-CN/quickstart.org | 247 ++++++++++++++++++------------------------- 1 file changed, 104 insertions(+), 143 deletions(-) diff --git a/zh-CN/quickstart.org b/zh-CN/quickstart.org index 8a34c51..4470d23 100644 --- a/zh-CN/quickstart.org +++ b/zh-CN/quickstart.org @@ -1,214 +1,181 @@ -#+TITLE: Quickstart | Org mode +#+TITLE: 快速开始 | Org 主模式 #+setupfile: setup.org -#+description: Org: an Emacs Mode for Notes, Planning and Authoring -#+include: "./resources/preamble.html" export html +#+include: "resources/preamble.html" export html -* Getting started with Org-mode +* 开始使用 Org@@comment:Get Started@@ :PROPERTIES: :CUSTOM_ID: getting-started :END: -In its simplest form, Org is like any other markup language. +简单来说,Org 与任何其它的标记语言一样:你可以在任何文本编辑器里使用[[file:../worg/dev/org-syntax.html][Org 语法]]编辑文档。 -You can write [[https://orgmode.org/worg/dev/org-syntax.html][Org syntax]] in any text editor. - -However, to experience the full potential of Org you need an editor -that transforms Org syntax into a living, interactive document. +然而,为了体验 Org 全部的潜力,你需要一个能够把 Org 语法转换为一个可互动文档的编辑器。 #+begin_center #+attr_html: :class btn -*[[https://orgmode.org/org.html#Installation][Install Org]]* +*[[file:../org.html#Installation][安装 Org]]* #+end_center -* Preamble +* 文档引言@@comment:Preamble@@ :PROPERTIES: :CUSTOM_ID: preamble :END: -At the start of a file (before the first heading), it is common to -set the title, author and other [[https://orgmode.org/manual/Export-Settings.html][export options]]. +在文件的最开始(第一个章节标题之前),你常常需要设置标题、作者以及其它[[file:../manual/Export-Settings.html][导出选项]]。 #+BEGIN_SRC org -,#+title: The glories of Org -,#+author: A. Org Writer +,#+title: Org 的荣光 +,#+author: Org 用户 #+END_SRC -* Heading +* 章节标题@@comment:Heading@@ :PROPERTIES: :CUSTOM_ID: headings :END: -Lines that start with an asterisk ~*~ are [[https://orgmode.org/worg/dev/org-syntax.html#Headlines_and_Sections][headings]]. +由星号 ~*~ 开始的行被称作[[file:../worg/dev/org-syntax.html#Headlines_and_Sections][章节标题(heading)]]。 -A single ~*~ denotes a 1st-level heading, ~**~ denotes a 2nd-level -heading, etc. +一个星号 ~*~ 代表一级章节标题,两个星号 ~**~ 代表二级章节标题,等等。 #+BEGIN_SRC org -,* Welcome to Org-mode -,** Sub-heading -Each extra ~*~ increases the depth by one level. + ,* 欢迎来到 Org + ,** 子章节标题 + 每个额外的 ~*~ 为章节的深度增加一级。 #+END_SRC -In their simplest form headings are just the start of a section. -However, any heading can also become a [[https://orgmode.org/manual/TODO-Items.html][TODO item]]. +简单来说,章节标题代表了一个章节的开始。然而,任何章节也可以成为一个[[file:../manual/TODO-Items.html][待办事项]]。 -TODO items are the basic building block that Org uses to track and -organize all kinds of tasks. +待办事项是 Org 用来跟踪、整理各类的任务的基本模块。 -To add a TODO item to a heading, start the heading with a TODO -keyword such as ~TODO~ or ~HOLD~. +若要把一个现有的章节标题转换为一个待办事项,仅需在其开头加上一个待办关键词,例如 ~TODO~ 或者 ~HOLD~​。 #+BEGIN_SRC org -,* TODO Promulgate Org to the world -,** TODO Create a quickstart guide + ,* TODO 向世界介绍 Org + ,** TODO 创建一个快速开始指南 #+END_SRC -* Markup +* 标记@@comment:markup@@ :PROPERTIES: :CUSTOM_ID: markup :END: -To mark up text in Org, simply surround it with one or more marker -characters. *Bold*, /italic/ and _underline_ are fairly intuitive, and the -ability to use +strikethrough+ is a plus. You can _/*combine*/_ the basic -markup in any order, however ~code~ and =verbatim= need to be the -*_~inner-most~_* markers if they are present since their contents are -interpreted =_literally_=. +# 代码 = code; 逐字 = verbatim +若要在 Org 里标记文字,仅需要在其两侧使用标记字符。​*加粗*​、​/斜体/​、​_下划线_​都很简单;你甚至能够轻松地使用​+删除线+​。你可以任意组合这些基本的标记,但需要记住一点,若使用了​~代码~​或​=逐字=​这两个标记之一,它们需要在这个组合的​*_~最里侧~_*​,因为它们包含的内容是​=按字面=​解析的。 #+begin_example -To markup text in Org, simply surround it with one or more marker characters. -*Bold*, /italic/ and _underline_ are fairly intuitive, and the ability to use -+strikethrough+ is a plus. You can _/*combine*/_ the basic markup in any -order, however ~code~ and =verbatim= need to be the *_~inner-most~_* markers -if they are present since their contents are interpreted =_literally_=. +若要在 Org 里标记文字,仅需要在其两侧使用标记字符。​*加粗*​、​/斜体/​、​_下划线_​都很简单;你甚至能够轻松地使用​+删除线+​。你可以任意组合这些基本的标记,但需要记住一点,若使用了​~代码~​或​=逐字=​这两个标记之一,它们需要在这个组合的​*_~最里侧~_*​,因为它们包含的内容是​=按字面=​解析的。 #+end_example -See [[https://orgmode.org/worg/dev/org-syntax.html#Emphasis_Markers][Emphasis Markers]] for more details. +可在[[file:../worg/dev/org-syntax.html#Emphasis_Markers][标记符号(英语)]]里查看更多信息。 + +** 中文用户 +中文用户_​:由于 Org 的限制,标记字符的内侧必须不是空格,而外侧必须是空格(包含换行等)。因此,中文用户需要在使用标记时,可以在有需要时使用[[file:../manual/Escape-Character.html][零宽空格]](16进制代码​~#x200b~​,名称为​~ZERO WIDTH SPACE~​)。 -* Lists +* 列表@@comment:Lists@@ :PROPERTIES: :CUSTOM_ID: lists :END: -Unordered lists start with ~+~, ~-~, or ~*~[fn::~*~ cannot be used to start -a plain list if it is immediately preceded by a newline because it -will be interpreted as a heading.]. Ordered lists start with ~1.~, ~1)~, -~A.~, or ~A)~. Ordered and unordered bullets can be nested in any order. +# 无序列表 = unordered list; 有序列表 = ordered list +无序列表由​~+~​、​~-~​、​~*~​开头​[fn::~*~​不能被用作一行的最开头,因为这样它会被解析成一个章节标题。]。有序列表由​~1.~​、​~1)~​、​~A.~​、​~A)~​开头。有序与无序符号可以以任意顺序嵌套。 #+BEGIN_SRC org -To buy: -1. Milk -2. Eggs - - Organic -3. Cheese - + Parmesan - + Mozzarella + 采购单: + 1. 牛奶 + 2. 鸡蛋 + - 有机 + 3. 调料 + + 糖 + + 盐 #+END_SRC -Lists can contain checkboxes ~[ ]~, ~[-]~, ~[X]~. +# 勾选项 = checkbox +列表可包含勾选项​~[ ]~​、​~[-]~​、​~[X]~​。 #+BEGIN_SRC org -- [ ] not started -- [-] in progress -- [X] complete + - [ ] 未开始 + - [-] 进行中 + - [X] 已完成 #+END_SRC -Lists can contain tags (and checkboxes at the same time). +# 标签 = tag +列表也可同时包含标签。 #+BEGIN_SRC org -- [ ] fruits :: get apples -- [X] veggies :: get carrots + - [ ] 水果 :: 买苹果 + - [X] 蔬菜 :: 买胡萝卜 #+END_SRC -* Links +* 链接@@comment:Links@@ :PROPERTIES: :CUSTOM_ID: links :END: -To create a link put the target between two square brackets, like so: ~[[target]]~. -You can include a description in square brackets after the target ~[[target][desc]]~. +创建链接时把目标放在两对​*半角*​方括号中,例如:​~[[目标]]~​。你也可以在链接里、目标之后添加描述:​~[[目标][描述]]~​。 -The order is easy to remember because it is the same as an html == -tag ~desc~ and you can't mix up brackets and -parentheses because there are only square brackets! +这个顺序相当好记,因为这跟 HTML 的 == 标记 ~描述~ 一样,并且你不可能混淆不同种类的括号,因为 Org 语法里只用中括号。 -Org supports a wide variety of types of link targets, and you can also -[[https://orgmode.org/manual/Adding-Hyperlink-Types.html][add your own]]. -Link types are indicated with a ~type:~ prefix, i.e., ~[type:target]~. -If no ~type:~ is provided, org searches the current file for a heading -that matches ~target~. +Org 支持一系列不同的链接目标类型,并且你还可以[[file:../manual/Adding-Hyperlink-Types.html][添加你自己的目标类型]]。链接目标类型由其前缀​~类型:~​表示,例如:​~[[类型:目标]]~​。若没有提供类型,Org 会在当前文件里搜索一个符合​~目标~​的章节标题。 -Some examples: +举个例子: #+BEGIN_EXAMPLE -[[https://orgmode.org][a nice website]] +[[https://orgmode.org][一个网页]] [[file:~/Pictures/dank-meme.png]] -[[earlier heading][an earlier heading in the document]] +[[之前的章节标题][此文档里一个之前的章节标题]] #+END_EXAMPLE -** More info -For more on links, see the manual sections for -[[https://orgmode.org/manual/Internal-Links.html][Internal Links]] and -[[https://orgmode.org/manual/External-Links.html][External Links]]. +** 更多信息 +更多关于链接的信息参见手册(英语):[[file:../manual/Internal-Links.html][内部链接]]、[[file:../manual/External-Links.html][外部链接]]。 -* Images +* 图像@@comment:Images@@ :PROPERTIES: :CUSTOM_ID: images :END: -Org mode automatically recognizes and renders image links during -export. Just link to an image (don't include a description). That's -it. \\ -~[[https://upload.wikimedia.org/wikipedia/commons/5/5d/Konigsberg_bridges.png]]~ +Org 会在导出时自动识别且显示图片链接。你只需要链接一个图片,且不提供描述既可。\\ +~[[https://orgmode.org/resources/img/quickstart.svg]]~ #+attr_html: :height 120px -[[https://upload.wikimedia.org/wikipedia/commons/5/5d/Konigsberg_bridges.png]] +[[file:../resources/img/quickstart.svg]] -Images located on your computer can also be rendered in the Emacs -buffer with =C-c C-x C-v=. +在你电脑里的图片也可以按 =C-c C-x C-v= 在 Emacs 缓存区里显示。 -* Blocks +* 区块@@comment:Blocks@@ :PROPERTIES: :CUSTOM_ID: blocks :END: -Org mode uses =#+BEGIN= ... =#+END= blocks for many purposes. -Some of the basic blocks types quote, example, and src. +Org 主模式里可以包含区块 =#+BEGIN= …… =#+END=​,不同的区块对应不同的用途。基本的区块包括:引用(quote),举例(example),以及源码(src)。 -If all you need is monospace text, you can use an example block. +若你只需要等宽文字,你可以使用举例区块。 #+BEGIN_SRC org ,#+begin_example -monospace +monospace 等宽 ,#+end_example #+END_SRC -However, example blocks do not give you the power of [[https://orgmode.org/worg/org-contrib/babel/][Org babel]]. -For that you need a source block. -Source blocks provide syntax highlighting, code execution, literate programming, and more. +然而,你不能在举例区块里使用 [[file:../worg/org-contrib/babel/][Org Babel]] ----- 你需要使用源码区块。源码区块提供了语法高亮、代码运行、文学编程等等。 #+BEGIN_SRC org ,#+begin_src emacs-lisp (message "Hello world") ,#+end_src #+END_SRC -** More info -A hello world example cannot even begin to scratch the surface -Org mode's support for [[https://orgmode.org/manual/Working-with-Source-Code.html][working with source code]]. +** 更多信息 +一个”你好世界“的例子根本不足以向你展示 Org 与源代码的[[file:../manual/Working-with-Source-Code.html][所有功能]]。 -* Tables +* 表格@@comment:Tables@@ :PROPERTIES: :CUSTOM_ID: tables :END: -Org mode comes with a table editor complete with support cell references -and formulas. - -In its simplest form a table is text separated using pipes ~|~. +Org 主模式内置了一个表格编辑器,并且支持各种与元素引用以及公式的功能。 +最简单的表格仅仅是由 ~|~ 分隔开的文本。 #+BEGIN_SRC org -| I | am | a | table | -| with | two | rows | ! | +| 我 | 是 | 一个 | 表格 | +| 我 | 有 | 两行 | ! | #+END_SRC -A more useful example is this comparison of existing Literate -programming / reproducible research tools (from [[doi:10.18637/jss.v046.i03][Schulte /et al./ 2012]]). +这是在一篇论文([[doi:10.18637/jss.v046.i03][Schulte /et al./ 2012]])里的一个表格,对比了现有的文学编程与可重复研究工具。 #+BEGIN_SRC org | Tool | Literate programming? | Reproducible Research? | Languages | @@ -220,75 +187,69 @@ programming / reproducible research tools (from [[doi:10.18637/jss.v046.i03][Sch | Org-mode | yes | yes | any | #+END_SRC -Worried about aligning free text tables? -Org mode does it in a single keystroke -- =tab=. +担心无法在文本表格中对齐?你只需按一个键 ----- =tab=​。 -* Comments +* 注释@@comment:Comments@@ :PROPERTIES: :CUSTOM_ID: comments :END: -Org mode has a variety of ways to add comments. +在 Org 里有很多种方法添加注释: -- Line comments start with ~#~. -- Inline comments wrap ~@@comment:like so@@~. -- Block comments are wrapped with ~#+BEGIN_COMMENT~ and ~#+END_COMMENT~. -- Section comments can be created by adding the ~COMMENT~ keyword to a heading ~* - COMMENT like so~[fn::There are a number of more granular ways to control the - exact behavior of headings, including use of the special tags ~:ARCHIVE:~ and - ~:noexport:~.]. +- 行注释:用​~#~​开头。 +- 行内注释:把注释包起来(​~@@comment:就像这样@@~​)。 +- 区块注释:用​~#+BEGIN_COMMENT~​和​~#+END_COMMENT~​把注释包起来。 +- 章节注释:在章节标题前加上 ~COMMENT~ 可以把这整个章节变成注释[fn::还有一些对章节的更精细的操作,包括使用特殊章节标签​~:ARCHIVE:~​以及​~:noexport:~​。]。 #+BEGIN_SRC org -# A line comment +# 一个行注释 -Example of an @@comment:inline@@ comment. +这是一个​@@comment:行内@@​注释。 -Inline comments are used for end of line comments. @@comment:~#~ won't -work@@ Since # only only works if preceeded by a newline follow by -whitespace. +行内注释可同时被用作行末注释。​@@comment:~#~没有用@@ +这是因为​~#~​只在作为一行第一个非空格字符时才是行注释。 ,#+begin_comment -This is a block comment. -It can span multiple line. -As well as other markup. +这是一个区块注释。 +它可以跨越多行,或者其它标记与区块定义。 ,#+begin_src emacs-lisp (+ 1 2) ,#+end_src ,#+end_comment -,* A top level heading -,** COMMENT This section and subsections are commented out -,*** This heading inherits the =COMMENT= keyword -This text is commented out -,** This heading is not commented -This text will be exported and code blocks will run. +,* 一个顶层章节标题 +,** COMMENT 这个章节与其子章节是注释 +,*** 这个章节继承了关键词​=COMMENT= +这段文字是注释 +,** 这个章节不是注释 +这段文字会被导出,且代码区块会被运行。 #+END_SRC -* Macros +** 中文用户 +_中文用户_​:​=@@comment:行内注释@@=​两侧需要使用零宽空格,详见[[#markup][标记]]章节。 + +* 宏@@comment:Macros@@ :PROPERTIES: :CUSTOM_ID: macros :END: -Org has many more advanced features built into its syntax. To give -only a single example, let's take a look at [[https://orgmode.org/manual/Macro-Replacement.html][macros]]. + Org 的语法拥有更多高级功能,[[file:../manual/Macro-Replacement.html][这里]]有一个简单的例子。 #+BEGIN_SRC org ,#+macro: attn _*/$1/*_ -{{{attn(Attention! This text gets all the markup!)}}} +{{{attn(注意!这个文本有所有标记!)}}} ,#+html_head: ,#+latex_header: \usepackage{xcolor} ,#+macro: red @@html:$1@@@@latex:\textcolor{red}{$1}@@ -Regular text. {{{red(This text will be red.)}}} More regular text. +普通文本。{{{red(红色文本。)}}}更多普通文本。 #+END_SRC -* Next steps +* 下一步 :PROPERTIES: :CUSTOM_ID: next-steps :END: -Looking for something in particular? The [[file:manual/][manual]] ([[file:org.pdf][PDF]]) is a good place -to start. +在寻找某一个话题?试着读读[[file:../manual/][手册]]([[file:../org.pdf][PDF]])吧。 -Looking for something between this quickstart and the manual? The -[[file:guide/][guide]] ([[file:orgguide.pdf][PDF]]) is worth a shot. +在寻找这个快速开始与手册之间的内容?试试[[file:../guide/][指南]]([[file:../orgguide.pdf][PDF]])吧。 -- 2.40.0