]> git.lyx.org Git - lyx.git/blob - lib/doc/zh_CN/Tutorial.lyx
doc-files: port latest changes to trunk
[lyx.git] / lib / doc / zh_CN / Tutorial.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass book
6 \begin_preamble
7 %\usepackage{fontspec}
8 %\setromanfont{AR PL ShanHeiSun Uni}%字体来自Adobe Reader 8.0 OpenType,可以选用任何系统已有的字体
9 %中文断行 
10 %\XeTeXlinebreaklocale "zh"
11 %\XeTeXlinebreakskip = 0pt plus 1pt 
12 \usepackage{CJK}
13
14 % redefine the \LyX macro for PDF bookmarks
15 \def\LyX{\texorpdfstring{%
16   L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
17   {LyX}}
18 \end_preamble
19 \options cjk
20 \use_default_options true
21 \maintain_unincluded_children false
22 \language chinese-simplified
23 \language_package default
24 \inputencoding UTF8
25 \fontencoding global
26 \font_roman default
27 \font_sans default
28 \font_typewriter default
29 \font_default_family default
30 \use_non_tex_fonts false
31 \font_sc false
32 \font_osf false
33 \font_sf_scale 100
34 \font_tt_scale 100
35 \font_cjk gbsn
36
37 \graphics default
38 \default_output_format default
39 \output_sync 0
40 \bibtex_command default
41 \index_command default
42 \float_placement th
43 \paperfontsize 12
44 \spacing onehalf
45 \use_hyperref true
46 \pdf_title "The LyX Tutorial"
47 \pdf_author "LyX Team"
48 \pdf_subject "LyX-documentation Tutorial"
49 \pdf_keywords "LyX, documentation"
50 \pdf_bookmarks true
51 \pdf_bookmarksnumbered true
52 \pdf_bookmarksopen true
53 \pdf_bookmarksopenlevel 1
54 \pdf_breaklinks false
55 \pdf_pdfborder false
56 \pdf_colorlinks true
57 \pdf_backref section
58 \pdf_pdfusetitle false
59 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true,pdfstartview=XYZ, plainpages=false"
60 \papersize a4paper
61 \use_geometry false
62 \use_amsmath 1
63 \use_esint 1
64 \use_mhchem 1
65 \use_mathdots 1
66 \cite_engine basic
67 \use_bibtopic false
68 \use_indices false
69 \paperorientation portrait
70 \suppress_date false
71 \use_refstyle 0
72 \index 索引
73 \shortcut idx
74 \color #008000
75 \end_index
76 \secnumdepth 3
77 \tocdepth 3
78 \paragraph_separation indent
79 \paragraph_indentation default
80 \quotes_language english
81 \papercolumns 1
82 \papersides 2
83 \paperpagestyle default
84 \tracking_changes false
85 \output_changes false
86 \html_math_output 0
87 \html_css_as_file 0
88 \html_be_strict false
89 \end_header
90
91 \begin_body
92
93 \begin_layout Standard
94 \begin_inset ERT
95 status collapsed
96
97 \begin_layout Plain Layout
98
99
100 \backslash
101 CJKindent
102 \end_layout
103
104 \end_inset
105
106
107 \end_layout
108
109 \begin_layout Title
110 The LyX Tutorial
111 \end_layout
112
113 \begin_layout Author
114 by the LyX Team
115 \begin_inset Foot
116 status collapsed
117
118 \begin_layout Plain Layout
119 对这个中文版有任何话想说请 Email 到 
120 \family typewriter
121 \lang english
122
123 \begin_inset CommandInset href
124 LatexCommand href
125 target "lyx-docs@lists.lyx.org"
126 type "mailto:"
127
128 \end_inset
129
130
131 \family default
132 \lang chinese-simplified
133
134 \end_layout
135
136 \end_inset
137
138
139 \end_layout
140
141 \begin_layout Standard
142 \begin_inset CommandInset toc
143 LatexCommand tableofcontents
144
145 \end_inset
146
147
148 \end_layout
149
150 \begin_layout Chapter
151 介绍
152 \end_layout
153
154 \begin_layout Section
155 欢迎来到 LyX!
156 \end_layout
157
158 \begin_layout Standard
159 这个文档是为那些不知道 LaTeX 或知之甚少的人准备的。不必担心,使用 LyX 不必学习 LaTeX。LyX 的目标就是提供一个所见即所得的
160  LaTeX 应用。为了高效的使用 LyX,还是需要学习一些东西的。
161 \end_layout
162
163 \begin_layout Standard
164 你会发现在其它字处理软件中常用的排版方式在 LyX 中都不能使用了,比如:在“.”后边输入两个空格,在段间输入三个空行。你以前使用的软件允许手动调整间距、字体等东
165 西,所以你不得不即录入又排版。LyX会做好排版的事情的,而你只需要转注于重要的东西:你正在写的内容。
166 \end_layout
167
168 \begin_layout Standard
169 继续读下去,了解更多 LyX。读完这篇教程,你会觉得物有所值的。
170 \end_layout
171
172 \begin_layout Section
173 本教程简介
174 \end_layout
175
176 \begin_layout Standard
177 在开始之前建议您先读一下 Introduction,那里解释了本文使用的注释方式。当你了解了各种字体的意义之后,我们先来说说本篇教程是干什么的。
178 \end_layout
179
180 \begin_layout Subsection
181 学习方式
182 \end_layout
183
184 \begin_layout Standard
185 本教程包含了例子和练习。学习中您应该试着输入我们让你输入的东西,完成所有练习,看看您是不是得到了正确的东西。为了方便,将本文档打印出来会是一个好选择。
186 \end_layout
187
188 \begin_layout Standard
189 如果对 LaTeX 比较熟悉的话,你将能够较快的阅读本教程,因为 LyX 的思想就是 LaTeX 思想的一种包装。LyX 自身也有很多特性是你想了解的。就算不想
190 继续读下去,你也应该看看 
191 \begin_inset CommandInset ref
192 LatexCommand ref
193 reference "sec:LaTeX-用户必读"
194
195 \end_inset
196
197 ,它是专门写给熟练的 LaTeX 用户的。
198 \end_layout
199
200 \begin_layout Subsection
201 本教程没有的
202 \end_layout
203
204 \begin_layout Itemize
205 LyX 全部特性的详细解释。
206 \end_layout
207
208 \begin_deeper
209 \begin_layout Standard
210 需要的话,请阅读 the 
211 \emph on
212 User's Guide。
213 \end_layout
214
215 \end_deeper
216 \begin_layout Itemize
217 LaTeX 的详细解释。
218 \end_layout
219
220 \begin_deeper
221 \begin_layout Standard
222 没必要这样做。要想知道用 LaTeX 在 LyX 中能做些什么,可以看看 the 
223 \emph on
224 Embedded
225 \begin_inset space ~
226 \end_inset
227
228 Objects
229 \emph default
230  manual。
231 \end_layout
232
233 \end_deeper
234 \begin_layout Standard
235 现在是开始你的第一个文档的时候了。
236 \end_layout
237
238 \begin_layout Chapter
239 初识 LyX
240 \end_layout
241
242 \begin_layout Section
243 第一个 LyX 文档
244 \end_layout
245
246 \begin_layout Standard
247 开始之前说几件事情,这会使本教程发挥更大的作用。
248 \end_layout
249
250 \begin_layout Standard
251 由于本教程不会提供所有信息,所以你需要找到其它的帮助文件。这很简单:启动 LyX,在帮助菜单中就有 the 
252 \emph on
253 User's Guide。
254 \shape italic
255 在写自己的文件时就可以读到它们了(它们本身就是很好的例子)。注意,当打开多个文件时,可以通过 View 菜单或文档标签进行切换。
256 \end_layout
257
258 \begin_layout Standard
259 我们假设你已经有了全功能的 LyX 和 LaTeX,包括 DVI、PDF 文件浏览器。一般来说,在各种操作系统上,在安装 LyX 的时候就已经做好了。
260 \end_layout
261
262 \begin_layout Standard
263 最后,我们提供了一个文件 
264 \family typewriter
265 example_raw.lyx,
266 \family default
267 给你练习使用。假想这个文件是由一个完全不知道 LyX 特性的人写的,在学习的过程中,我们会建议你修改这个文件的。example_raw.lyx 中也包含了修改的提
268 示信息。为了对比,我们还提供了一份 LyX 高手写的同样内容的文档:example_lyxified.lyx。
269 \end_layout
270
271 \begin_layout Standard
272 示例文档存在于 LyX 安装路径的 examples 目录下。打开示例文档,另存到自己的目录下,修改后输出到 DVI 文件看效果。
273 \end_layout
274
275 \begin_layout Standard
276 另外,examples 目录中还有很多其它的示例文件,它们将向您展示 LyX 的强大功能。当你忘记了某个功能怎么使用的时候,也可以回来看看这些文档。
277 \end_layout
278
279 \begin_layout Subsection
280 录入、查看、输出
281 \end_layout
282
283 \begin_layout Itemize
284 使用菜单 
285 \family sans
286 File\SpecialChar \menuseparator
287 New 打开新文件。
288 \end_layout
289
290 \begin_layout Itemize
291 输入一个句子: 
292 \family typewriter
293 This is my first LyX document!
294 \end_layout
295
296 \begin_layout Itemize
297 使用菜单 
298 \family sans
299 File\SpecialChar \menuseparator
300 Save
301 \begin_inset space ~
302 \end_inset
303
304 As 保存文件。
305 \end_layout
306
307 \begin_layout Itemize
308 运行 LaTeX 生成 DVI 文件,使用菜单 
309 \family sans
310 View\SpecialChar \menuseparator
311 DVI
312 \family default
313  或 工具栏按钮 
314 \begin_inset Graphics
315         filename ../../images/buffer-view_dvi.png
316         scale 75
317
318 \end_inset
319
320 。 LyX 将打开 DVI-viewer 程序显示文档打印时的样子。 
321 \begin_inset Foot
322 status collapsed
323
324 \begin_layout Plain Layout
325 保持 DVI-viewer在后台运行会节省时间。以后可以点击 
326 \family sans
327 View\SpecialChar \menuseparator
328 Update\SpecialChar \menuseparator
329 DVI
330 \family default
331  或工具栏按钮
332 \begin_inset Graphics
333         filename ../../images/buffer-update_dvi.png
334         scale 75
335
336 \end_inset
337
338 ,等 LyX 运算完成后切换到 DVI-viewer即可。
339 \end_layout
340
341 \end_inset
342
343
344 \end_layout
345
346 \begin_layout Itemize
347 使用菜单 
348 \family sans
349 File\SpecialChar \menuseparator
350 Export
351 \family default
352  将文档输出成希望的格式。
353 \end_layout
354
355 \begin_layout Standard
356 恭喜!你已经写出了第一个 LyX 文档。其余的细节,你会在其它手册中读到。
357 \end_layout
358
359 \begin_layout Subsection
360 简单操作
361 \end_layout
362
363 \begin_layout Standard
364 LyX 能够做到其它软件能做的绝大部分事情,如:自动换行、段落缩进……以下是几个简单操作的使用方法。
365 \end_layout
366
367 \begin_layout Description
368 撤消 LyX 有多级撤消功能,你可以使用 
369 \family sans
370 Edit\SpecialChar \menuseparator
371 Undo
372 \family default
373  (或工具拦按钮 
374 \begin_inset Graphics
375         filename ../../images/undo.png
376         scale 50
377         groupId In line
378
379 \end_inset
380
381 )来撤消本次编辑会话开始以来的所有操作。如果撤消过头了,可以选择 
382 \family sans
383 Edit\SpecialChar \menuseparator
384 Redo
385 \family default
386  (或工具栏按钮 
387 \begin_inset Graphics
388         filename ../../images/redo.png
389         scale 50
390         groupId In line
391
392 \end_inset
393
394 )恢复。 
395 \end_layout
396
397 \begin_deeper
398 \begin_layout Standard
399 目前撤消操作支持100步,而且撤消也不是能够支持所有更改的,比如对文档布局的更改就不能被撤消,这的确是一个 bug。
400 \end_layout
401
402 \end_deeper
403 \begin_layout Description
404 剪切/粘贴/复制 使用 
405 \family sans
406 Edit\SpecialChar \menuseparator
407 Cut
408 \family default
409  (工具栏按钮 
410 \begin_inset Graphics
411         filename ../../images/cut.png
412         scale 50
413         groupId In line
414
415 \end_inset
416
417 ), 
418 \family sans
419 Edit\SpecialChar \menuseparator
420 Copy
421 \family default
422  (工具栏按钮 
423 \begin_inset Graphics
424         filename ../../images/copy.png
425         scale 50
426         groupId In line
427
428 \end_inset
429
430 ),和 
431 \family sans
432 Edit\SpecialChar \menuseparator
433 Paste
434 \family default
435  (工具栏按钮 
436 \begin_inset Graphics
437         filename ../../images/paste.png
438         scale 50
439         groupId In line
440
441 \end_inset
442
443 ) 来实现剪切、复制和粘贴操作。或者也可通过鼠标中键来粘贴选中的文本(包括其它程序中选定的文本)。
444 \end_layout
445
446 \begin_layout Description
447 查找/替换 点击 
448 \family sans
449 Edit\SpecialChar \menuseparator
450 Find
451 \begin_inset space ~
452 \end_inset
453
454 &
455 \begin_inset space ~
456 \end_inset
457
458 Replace
459 \family default
460  (工具栏按钮 
461 \begin_inset Graphics
462         filename ../../images/dialog-show_findreplace.png
463         scale 50
464         groupId In line
465
466 \end_inset
467
468 ) ,在出现的对话框中点击按钮“
469 \family sans
470 Find
471 \begin_inset space ~
472 \end_inset
473
474 Next”
475 \family default
476  进行搜索,点击按钮“ 
477 \family sans
478 Replace”替换搜到的字词。
479 \family default
480
481 \begin_inset Foot
482 status open
483
484 \begin_layout Plain Layout
485 完成后关闭窗口,如果觉得方便的话也可一直开着它。LyX 中的大部分窗口都可以这样。使用时注意焦点的切换即可。
486 \end_layout
487
488 \end_inset
489
490  你还可以指定区分大小写或全字匹配,当然也可以反向搜索文档。
491 \end_layout
492
493 \begin_layout Description
494 字符格式 用 
495 \family sans
496 Edit\SpecialChar \menuseparator
497 Text
498 \begin_inset space ~
499 \end_inset
500
501 Style
502 \family default
503  对话框中的 toggle buttons ,可以
504 \shape italic
505 强调
506 \shape default
507 (默认斜体)、加粗或设置为
508 \noun on
509 无格式(
510 \noun default
511 字体一般较小,用于人名)。
512 \end_layout
513
514 \begin_layout Description
515 工具栏 菜单支边的工具栏提供了一些常用功能的按钮,例如:粘贴、打印。
516 \end_layout
517
518 \begin_layout Standard
519 当然,目前还没有输入足够多的内容以使所有这些功能可用。
520 \end_layout
521
522 \begin_layout Subsection
523 所见即所想:LyX 中的空白
524 \end_layout
525
526 \begin_layout Standard
527 对新用户来说,最难理解的是 LyX 处理空白的方式。敲多次回车只能得到一个空行;敲多次空格只能得到一个空格。在空白行上,连一个空格都无法得到。按下
528  Tab 键也不会移动一个 Tab 位;实际上就没有 Tab 位!在页面上方也没有标尺可供设置 Tab 位和边距。
529 \end_layout
530
531 \begin_layout Standard
532 很多字处理软件建立在 WYSIWYG 理念之上,也就是:看到的就是得到的(所见即所得)。LyX 不同,它建立在 WYSIWYM (所想即所得)的理念之上。你想什
533 么就输入什么,LyX 会处理排版的问题,这样保证了输出文件的美观。回车分段,空格断词,没理由在一行中输入好几次空格。Tab 根本就没有语法意义,所以
534  LyX 不支持它。使用 LyX,你将花费更多的时间去考虑文档的
535 \series bold
536 内容
537 \series default
538 ,而不是它的
539 \series bold
540 格式
541 \series default
542 。更多关于 WYSIWYM 的解释参见 
543 \emph on
544 Introduction。
545 \end_layout
546
547 \begin_layout Standard
548 LyX 的确也有不少精细调整文档格式的方法。毕竟 LyX 可能不会 100% 精确的按照你想的去排版。
549 \emph on
550 User's Guide 
551 \shape italic
552 包含了调整文档格式的详细方法,包括水平填充(HFills)和垂直距离(它们比空格、回车更加强大灵活);设置字体大小 、样式的方法;调整段落对齐方式的手段。你只需
553 要专心写你的文档,在最后细调一下文档格式就好了。使用普通的字处理软件,你会在写文档的整个过程中都被格式排版所困扰。
554 \begin_inset Foot
555 status open
556
557 \begin_layout Plain Layout
558
559 \shape italic
560 \emph on
561 译注:连 AbiWord 这样轻量级的字处理软件都有样式了,就不要说 MS Word、OOo 了。
562 \end_layout
563
564 \end_inset
565
566
567 \end_layout
568
569 \begin_layout Section
570 环境
571 \end_layout
572
573 \begin_layout Standard
574 文档的不同部分有不同的作用,我们称这些部分为“环境”(
575 \emph on
576 environments
577 \emph default
578 )。标题告诉读者新的话题(子话题)将会开始。某些文档含有特殊的环境,比如:期刊会有摘要和题目;书信就没有摘要和题目,但它有地址。
579 \end_layout
580
581 \begin_layout Standard
582 环境是 LyX 所见即所得哲学的重要部分。一个环境需要具体的定义:字体大小、样式、缩进、行间距等等。这个问题非常重要,因为一个给定环境的具体定义会随着文档类型的
583 变化而变化。比如:某期刊要求标题是黑体、18pt、居中,而另一个可能要求斜体、15pt、左对齐;不同的语言也有不同的缩进标准;参考文献的格式就变化更大了。LyX
584  会把你从这些格式中间拯救出来。
585 \end_layout
586
587 \begin_layout Standard
588 你可以使用工具栏上的环境下拉菜单
589 \begin_inset Graphics
590         filename ../clipart/ToolbarEnvBox.png
591         scale 50
592         groupId In line
593
594 \end_inset
595
596 来选择环境,它也能告诉你当前的环境是什么,其中“Standard”是文本的默认环境。现在我们将在你的新文档中添加几个环境,来看看它们是怎么工作的吧。
597 \end_layout
598
599 \begin_layout Subsection
600 节(
601 \family sans
602 Section
603 \family default
604 )与子节(Subsection)
605 \end_layout
606
607 \begin_layout Standard
608 在 LyX 文档的第一行输入“
609 \family typewriter
610 Introduction
611 \family default
612 ”,在环境下拉菜单中设为“节”(
613 \family sans
614 Section
615 \family default
616
617 \begin_inset Foot
618 status collapsed
619
620 \begin_layout Plain Layout
621 设定环境不需要选择整行(段),光标停留其中即可。若想一次改变多行的环境,则需要选定之。
622 \end_layout
623
624 \end_inset
625
626 , 确定你选择了“节”(
627 \family sans
628 Section
629 \family default
630 )而不是“节
631 \family sans
632 *
633 \family default
634 ”(
635 \family sans
636 Section*
637 \family default
638 )。LyX 将在前边加上“1”并把字体调大。现在敲回车,环境将从“节”(
639 \family sans
640 Section
641 \family default
642 )变回“标准”(Standard)。和多数环境类似,敲回车后环境将终止。输入文本:
643 \end_layout
644
645 \begin_layout LyX-Code
646 This is an introduction to my first LyX document.
647 \end_layout
648
649 \begin_layout Standard
650 再次回车,选择“节”(
651 \family sans
652 Section
653 \family default
654 )环境,LyX 将写上“2”并等待输入。现在输入“
655 \family typewriter
656 More Stuff
657 \family default
658 ”,LyX 会把它设置成节(
659 \family sans
660 Section
661 \family default
662 )标题的样式。
663 \end_layout
664
665 \begin_layout Standard
666 将光标定位到节 1 (Section
667 \begin_inset space ~
668 \end_inset
669
670 1)末尾,敲回车,再次设置为“节”(
671 \family sans
672 Section
673 \family default
674 ),LyX 会写上“2”并等待输入。输入“
675 \family typewriter
676 About This Document
677 \family default
678 ”。刚才的节 2 (Section
679 \begin_inset space ~
680 \end_inset
681
682 2),“More Stuff”,现在已经被改成了节 3 (Section
683 \begin_inset space ~
684 \end_inset
685
686 3)。你只需要确定哪些文字是节(
687 \family sans
688 Section
689 \family default
690 )标题,LyX 会处理编号和排版格式的,这就是所见即所想(WYSIWYM)的风格。
691 \end_layout
692
693 \begin_layout Standard
694 敲回车,回到“标准”(Standard)环境,输入下边 5 行文字:
695 \end_layout
696
697 \begin_layout LyX-Code
698 Sections and subsections are described below.
699 \end_layout
700
701 \begin_layout LyX-Code
702 Section Description
703 \end_layout
704
705 \begin_layout LyX-Code
706 Sections are bigger than subsections.
707 \end_layout
708
709 \begin_layout LyX-Code
710 Subsection description
711 \end_layout
712
713 \begin_layout LyX-Code
714 Subsections are smaller than sections.
715 \end_layout
716
717 \begin_layout Standard
718 点击第二行,在环境下拉菜单中设为“子节”(Subsection)。LyX 将会在前边加上“2.1”,并把字体调整的比正文大,比节(Section)标题小。接着把第
719  4 行也设置成为“子节”(Subsection),LyX 将在它前边加上“2.2”。如果在节 2 (Section 2)前边加上了别的节,节 2
720  将会自动变为节 3(Section 3),后边的子节也会跟着变成“3.1”和“3.2”。
721 \end_layout
722
723 \begin_layout Standard
724 文档的层级结构还有次子节 ( Subsubsection )、段 ( Paragraph ) 和子段 ( Subparagraph ),这些就由读者自行把玩吧。
725 段和子段的标题默认是不编号的,而且子段还有缩进,参阅 
726 \emph on
727 User's Guide
728 \emph default
729  得到更多解释以及如何改变它们。章(Chapter)是文档层级结构中最高的一级,只能在某些特定的 LyX 文档类型中才能使用它(见 
730 \begin_inset CommandInset ref
731 LatexCommand ref
732 reference "sec:文档类"
733
734 \end_inset
735
736 )。
737 \end_layout
738
739 \begin_layout Standard
740 你可能还希望一些节和子节是不编号的,LyX 有专门的环境实现这个功能。当把节的标题环境改为“节*
741 \begin_inset Quotes erd
742 \end_inset
743
744 (Section*)后,LyX 还将对它使用相同的字体,只是不再对它进行编号。相应的也有带“星”的子节和次子节环境。试着把一些节或子节的标题环境改为带星的,同时
745 看看其它的编号怎么随之改变。
746 \end_layout
747
748 \begin_layout Standard
749 练习:修改 example_raw.lyx 中的节和子节标题。
750 \end_layout
751
752 \begin_layout Subsection
753 列表(Lists)和子列表(sublists)
754 \end_layout
755
756 \begin_layout Standard
757 LyX 有好几种列表环境,在写提纲或者重新排序一个已有的列表时,这些列表环境会帮上大忙。不同的文档类型需要不同的列表环境:
758 \end_layout
759
760 \begin_layout Itemize
761 幻灯片使用带圆点的条目环境(
762 \family sans
763 Itemize
764 \family default
765 )。
766 \end_layout
767
768 \begin_layout Itemize
769 大纲使用带编号的枚举环境(
770 \family sans
771 Enumerate
772 \family default
773 )。
774 \end_layout
775
776 \begin_layout Itemize
777 名词解释常用描述环境(
778 \family sans
779 Description
780 \family default
781 )。
782 \end_layout
783
784 \begin_layout Itemize
785 列表环境(
786 \family sans
787 List
788 \family default
789 )和描述环境(
790 \family sans
791 Description
792 \family default
793 )差不多,只是对齐方式稍有不同。
794 \end_layout
795
796 \begin_layout Standard
797 现在我们写一个 LyX 有关优点的列表。在文档中输入:
798 \end_layout
799
800 \begin_layout Standard
801
802 \family typewriter
803 LyX is better than other word processors because: 
804 \end_layout
805
806 \begin_layout Standard
807 然后敲回车,并在环境下拉列表中选择条目环境(
808 \family sans
809 Itemize
810 \family default
811 )。LyX 会在行首加上圆点。继续输入:
812 \end_layout
813
814 \begin_layout LyX-Code
815 Typesetting is done for you.
816 \end_layout
817
818 \begin_layout LyX-Code
819 Math is WYSIWYG
820 \end_layout
821
822 \begin_layout LyX-Code
823 Lists are very easy to create!
824 \end_layout
825
826 \begin_layout Standard
827 和标题不同,列表环境在敲回车时不会终止,LyX 会认为你将继续写下一个条目。所以上边的输入将会产生三个列表项。重新选择标准环境(
828 \family sans
829 Standard
830 \family default
831 )或使用快捷键 
832 \family sans
833 Alt+P
834 \begin_inset space ~
835 \end_inset
836
837 S
838 \family default
839  才能退出列表环境。要在一个列表项中使用多个段落,可使用保护性中断(
840 \family sans
841 Protected
842 \begin_inset space ~
843 \end_inset
844
845 Break
846 \family default
847 ),按下 Ctrl + 回车即可。
848 \end_layout
849
850 \begin_layout Standard
851 你已经得到了一个漂亮的条目列表,你是不是已经迫不及待的想运行 LaTeX 看看它们打印出来的样子了?可如果您想给它们加上编号呢?你只需要选定整个列表
852 \begin_inset Foot
853 status collapsed
854
855 \begin_layout Plain Layout
856 如果不连前边一段也一起选上的话,你是无法选上第一个条目前边的圆点的;类似的,你也无法选定章节编号。这是有意如此的,因为随着文档类型和文字位置的不同,这些圆点和编
857 号也会发生变化。
858 \end_layout
859
860 \end_inset
861
862 ,然后选择枚举环境(
863 \family sans
864 Enumerate
865 \family default
866 )即可。如果你增删条目的话,LyX 会自动修改枚举编号的。
867 \end_layout
868
869 \begin_layout Standard
870 现在列表项还是处于被选定状态的,你可以再试试描述(
871 \family sans
872 Description
873 \family default
874 )和列表(
875 \family sans
876 List
877 \family default
878 )两种环境。这两种环境都是名词加定义的形式,描述环境前边的名词用黑体,列表环境的名词和后边的定义由“Tab”
879 \begin_inset Foot
880 status collapsed
881
882 \begin_layout Plain Layout
883 这里的Tab是排版Tab(它会自适应到最长的名词长度),而不是定长的打字机Tab。
884 \end_layout
885
886 \end_inset
887
888 分隔。前边的名词如果多于一个词的话,需要使用保护性空格(
889 \family sans
890 Protected
891 \begin_inset space ~
892 \end_inset
893
894 Blank
895 \family default
896 s)将它们分开。
897 \end_layout
898
899 \begin_layout Standard
900 练习:排版 
901 \family typewriter
902 example_raw.lyx
903 \family default
904  中的列表。
905 \end_layout
906
907 \begin_layout Standard
908 这些列表环境还可以嵌套使用,提纲就是最常见的例子。带编号或圆点的列表在子列表中会有不同的表现形式。更多详情参见 
909 \emph on
910 User's Guide
911 \emph default
912  。
913 \end_layout
914
915 \begin_layout Subsection
916 其它环境:诗、引用和更多
917 \end_layout
918
919 \begin_layout Standard
920 有两种引用环境:短一点的引用使用引用环境(
921 \family sans
922 Quote
923 \family default
924 );长一点的引用使用引文环境(
925 \family sans
926 Quotation
927 \family default
928 )。计算机代码使用代码环境(
929 \family sans
930 LyX-Code
931 \family default
932 ),该环境使用
933 \family typewriter
934 typewriter
935 \family default
936  字体,而且这里是 LyX 中唯一允许使用多个空格的地方。你还可以使用诗环境(
937 \family sans
938 Verse
939 \family default
940 )来写诗:回车分节,Ctrl + 回车断行。对所有环境的完整描述参见
941 \emph on
942  User's Guide
943 \emph default
944
945 \end_layout
946
947 \begin_layout Standard
948 练习:修改 
949 \family typewriter
950 example_raw.lyx
951 \family default
952  中的引用、代码、诗环境。
953 \end_layout
954
955 \begin_layout Chapter
956 编辑文档
957 \end_layout
958
959 \begin_layout Standard
960 前边的章节讲解了 LyX 的基本操作和环境的使用方法,使大家对 LyX 有了一个初步的了解。而大部分人使用 LyX 是为了写文档的,比如:论文、书、手册或书信。
961 本章将学习编辑完整的文档,你将学到文档类、标题、脚注、交叉引用、参考文献和目录的使用方法。
962 \end_layout
963
964 \begin_layout Section
965 文档类
966 \begin_inset CommandInset label
967 LatexCommand label
968 name "sec:文档类"
969
970 \end_inset
971
972
973 \end_layout
974
975 \begin_layout Standard
976 不同的文档有不同的排版方式,例如书籍是双面打印,文章是单面打印。文档还可能有特殊的环境,书信有发信人地址和签名两个环境,这两种环境在书籍和文章中就不起作用。Ly
977 X 的文档类
978 \begin_inset Foot
979 status collapsed
980
981 \begin_layout Plain Layout
982 for LaTeX users: this is equivalent to the LaTeX document class
983 \end_layout
984
985 \end_inset
986
987 会处理不同文档种类中不同的排版方式。本教程使用的就是书籍文档类。文档类是所见即所想哲学的一个重要部分,它告诉 LyX 怎样排版,所以你不需要知道太多。
988 \end_layout
989
990 \begin_layout Standard
991 你的文档可能是用文章(
992 \family sans
993 Article
994 \family default
995 )文档类
996 \begin_inset Foot
997 status collapsed
998
999 \begin_layout Plain Layout
1000 That's usually the default document class
1001 \end_layout
1002
1003 \end_inset
1004
1005 的,换到其它的文档类(使用 
1006 \family sans
1007 Document\SpecialChar \menuseparator
1008 Settings
1009 \family default
1010  对话框)看看有什么不同。切换到书籍类时,你会发现在环境下拉框中大部分的选项差异不大,只是现在可以使用“章”环境(Chapter)了。如果不能确定应该使用哪种文
1011 档类,你可以看看环境下拉框里边的东西。
1012 \end_layout
1013
1014 \begin_layout Standard
1015 各种杂志期刊排版区别主要在于字体大小、单双栏、页眉等地方。随着计算机时代的到来,期刊开始接受电子投稿,只要建立相应的 LaTeX 样式文件(style
1016  files),作者们就可以提交正确排版的文章了。LyX 就可以通过 
1017 \family sans
1018 Article
1019 \begin_inset space ~
1020 \end_inset
1021
1022 (AMS) 文档类支持美国数学学会会刊。
1023 \begin_inset Foot
1024 status collapsed
1025
1026 \begin_layout Plain Layout
1027
1028 \family sans
1029 译注:别指望中国的出版社能支持 LaTeX 格式的投稿,支持 LaTeX 的能超过一个巴掌就阿弥陀佛吧。
1030 \end_layout
1031
1032 \end_inset
1033
1034
1035 \end_layout
1036
1037 \begin_layout Standard
1038 这是几个文档类的简单描述,更多信息参见 
1039 \emph on
1040 Additional Features
1041 \emph default
1042
1043 \end_layout
1044
1045 \begin_layout Standard
1046 \align center
1047 \begin_inset Tabular
1048 <lyxtabular version="3" rows="7" columns="2">
1049 <features tabularvalignment="middle">
1050 <column alignment="center" valignment="top" width="0pt">
1051 <column alignment="center" valignment="top" width="0pt">
1052 <row>
1053 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1054 \begin_inset Text
1055
1056 \begin_layout Plain Layout
1057 Name
1058 \end_layout
1059
1060 \end_inset
1061 </cell>
1062 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1063 \begin_inset Text
1064
1065 \begin_layout Plain Layout
1066 Notes
1067 \end_layout
1068
1069 \end_inset
1070 </cell>
1071 </row>
1072 <row>
1073 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1074 \begin_inset Text
1075
1076 \begin_layout Plain Layout
1077 文章(article)
1078 \end_layout
1079
1080 \end_inset
1081 </cell>
1082 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1083 \begin_inset Text
1084
1085 \begin_layout Plain Layout
1086 单面、无章
1087 \end_layout
1088
1089 \end_inset
1090 </cell>
1091 </row>
1092 <row>
1093 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1094 \begin_inset Text
1095
1096 \begin_layout Plain Layout
1097 文章 (article AMS)
1098 \end_layout
1099
1100 \end_inset
1101 </cell>
1102 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1103 \begin_inset Text
1104
1105 \begin_layout Plain Layout
1106
1107 \family sans
1108 美国数学学会专用
1109 \end_layout
1110
1111 \end_inset
1112 </cell>
1113 </row>
1114 <row>
1115 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1116 \begin_inset Text
1117
1118 \begin_layout Plain Layout
1119
1120 \family sans
1121 报告(
1122 \family default
1123 report
1124 \family sans
1125
1126 \end_layout
1127
1128 \end_inset
1129 </cell>
1130 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1131 \begin_inset Text
1132
1133 \begin_layout Plain Layout
1134
1135 \family sans
1136 比文章长、双面
1137 \end_layout
1138
1139 \end_inset
1140 </cell>
1141 </row>
1142 <row>
1143 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1144 \begin_inset Text
1145
1146 \begin_layout Plain Layout
1147
1148 \family sans
1149 书籍(
1150 \family default
1151 book
1152 \family sans
1153
1154 \end_layout
1155
1156 \end_inset
1157 </cell>
1158 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1159 \begin_inset Text
1160
1161 \begin_layout Plain Layout
1162
1163 \family sans
1164 报告加上前后的一些零碎儿
1165 \end_layout
1166
1167 \end_inset
1168 </cell>
1169 </row>
1170 <row>
1171 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1172 \begin_inset Text
1173
1174 \begin_layout Plain Layout
1175
1176 \family sans
1177 幻灯片(
1178 \family default
1179 presentation
1180 \family sans
1181
1182 \end_layout
1183
1184 \end_inset
1185 </cell>
1186 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1187 \begin_inset Text
1188
1189 \begin_layout Plain Layout
1190 透明
1191 \end_layout
1192
1193 \end_inset
1194 </cell>
1195 </row>
1196 <row>
1197 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1198 \begin_inset Text
1199
1200 \begin_layout Plain Layout
1201 书信(letter)
1202 \end_layout
1203
1204 \end_inset
1205 </cell>
1206 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1207 \begin_inset Text
1208
1209 \begin_layout Plain Layout
1210 包含地址、签名等特殊环境
1211 \end_layout
1212
1213 \end_inset
1214 </cell>
1215 </row>
1216 </lyxtabular>
1217
1218 \end_inset
1219
1220
1221 \end_layout
1222
1223 \begin_layout Section
1224 模板:写一封信
1225 \end_layout
1226
1227 \begin_layout Standard
1228 要写信,你只需要新建一个文件并从 
1229 \family sans
1230 Document\SpecialChar \menuseparator
1231 Settings 对话框中设定书信文档类就行了。但每次写信都需要设定发信人地址、收信人地址、正文、签名等环境,LyX 的书信模板可以省下不少时间
1232 ,你只要替换模板中相应部分的文字即可。
1233 \end_layout
1234
1235 \begin_layout Standard
1236 点击菜单 
1237 \family sans
1238 File\SpecialChar \menuseparator
1239 New
1240 \begin_inset space ~
1241 \end_inset
1242
1243 from
1244 \begin_inset space ~
1245 \end_inset
1246
1247 Template,并选择 
1248 \family typewriter
1249 letter.lyx
1250 \family default
1251  
1252 \family sans
1253 模板。保存打印,看看不同的环境是怎么排版的。
1254 \end_layout
1255
1256 \begin_layout Standard
1257 在环境下拉列表框中,你会看到几个书信文档类独有的环境,如:我的地址环境(
1258 \family sans
1259 My
1260 \begin_inset space ~
1261 \end_inset
1262
1263 Address
1264 \family default
1265 )。建议在这儿把这些环境一个一个的都试试。你可能会注意到签名环境(
1266 \family sans
1267 Signature
1268 \family default
1269 ),签名文字前边有个红色的“
1270 \family sans
1271 Signature
1272 \family default
1273 :”标签,该标签并不出现在打印出来的书信中。它就是告诉你这里有你设置的签名,它出现在哪里也不重要,LyX 是所见即所想的,无论把它放在哪里,LyX
1274  都知道在打印时它应该出现在最后。
1275 \end_layout
1276
1277 \begin_layout Standard
1278 模板本身是一个 LyX 常规文件,你可以修改一下另存为一个新的模板。下次写信时,使用新模板会节省时间。这里我们没有建议的练习,你就给某人写封信吧。
1279 \begin_inset Foot
1280 status collapsed
1281
1282 \begin_layout Plain Layout
1283 One warning, if you're writing from a template.
1284  If you erase all of the text in an environment — for example, if you erase
1285  the whole 
1286 \family sans
1287 My
1288 \begin_inset space ~
1289 \end_inset
1290
1291 Address
1292 \family default
1293  field so that you can replace it with your own — and then you move the
1294  cursor without writing any text, the environment may disappear.
1295  This is because most environments cannot exist without any text in them.
1296  Just reselect the environment from the 
1297 \family sans
1298 Environment
1299 \family default
1300  box to get it back.
1301 \end_layout
1302
1303 \end_inset
1304
1305
1306 \end_layout
1307
1308 \begin_layout Standard
1309 鉴于使用模板能够节省大量时间,我们强烈建议您使用它。另外它们还能够帮助人们学习其它新奇的文档类。如果您想把 LyX 介绍给不太会用计算机的人使用的话,模板也能帮
1310 上忙。模板还能降低初学者对 LyX 的恐惧感。
1311 \end_layout
1312
1313 \begin_layout Section
1314 文档标题
1315 \end_layout
1316
1317 \begin_layout Standard
1318 标题包括题目、作者、日期、摘要。LyX 把标题视为文档中单独的一部分。
1319 \end_layout
1320
1321 \begin_layout Standard
1322 新建一个 LyX 文档,令其使用文章文档类(
1323 \family sans
1324 Article
1325 \family default
1326 )。
1327 \begin_inset Foot
1328 status collapsed
1329
1330 \begin_layout Plain Layout
1331 You should not be using the letter any more, since the 
1332 \family sans
1333 Letter
1334 \family default
1335  document class doesn't allow titles.
1336 \end_layout
1337
1338 \end_inset
1339
1340 在第一行写上题目并令其为标题环境(
1341 \family sans
1342 Title
1343 \family default
1344 ),下一行写上你的名字并设为作者环境(
1345 \family sans
1346 Author
1347 \family default
1348 ),再下一行写上日期并设为日期环境(
1349 \family sans
1350 Date
1351 \family default
1352 )。然后再写上一两段摘要,并设为摘要环境(
1353 \family sans
1354 Abstract
1355 \family default
1356 )。看看这些东西打印出来后是什么样子的。如果把文档设为书籍类,将会得到一个单独的标题页,看起来就像本教程的第一页。
1357 \end_layout
1358
1359 \begin_layout Standard
1360 练习:在 
1361 \family typewriter
1362 example_raw.lyx
1363 \family default
1364  中修改标题、日期、作者。
1365 \end_layout
1366
1367 \begin_layout Section
1368 标签(Labels)与交叉引用(Cross-References)
1369 \end_layout
1370
1371 \begin_layout Standard
1372 你可以为章节标题、列表项、公式、脚注、浮动体(floats)添加标签,之后可在文档的其它部分通过交叉引用引用它们,可以引用章节编号也可以引用页码,LyX
1373  当然也会自动计算交叉引用的编号。自动标签和交叉引用是 LyX 相对于其它字处理软件的显著优点。
1374 \end_layout
1375
1376 \begin_layout Subsection
1377 标签
1378 \end_layout
1379
1380 \begin_layout Standard
1381 我们回到第一个文档的第二节,它的标题是“About This Document”。将光标定位至该行末尾,选择 
1382 \family sans
1383 Insert\SpecialChar \menuseparator
1384 Label 或工具栏按钮
1385 \family default
1386  
1387 \begin_inset Graphics
1388         filename ../../images/label-insert.png
1389         scale 50
1390         groupId In line
1391
1392 \end_inset
1393
1394 。在对话框中输入标签名,点击 OK 后,标签名将会出现在行尾。
1395 \end_layout
1396
1397 \begin_layout Standard
1398 节标签可以放在节的任意位置,节的引用将会指向离标签最近的一个节或子节。你可以把节标签放在节标题上,或者是节的第一行上边,这样可以保证引用的页码会是节的开始页。
1399 \end_layout
1400
1401 \begin_layout Standard
1402 到目前为止,我们还没做什么事情,输出的 DVI 文件也不会有什么变化,因为标签是不会出现在打印文档中的。现在已经添加了一个标签,下边我们将会通过交叉引用来引用它
1403
1404 \end_layout
1405
1406 \begin_layout Subsection
1407 交叉引用
1408 \end_layout
1409
1410 \begin_layout Standard
1411 将光标定位到文档的节 2,输入
1412 \end_layout
1413
1414 \begin_layout LyX-Code
1415 If you want to know more about this document, then see 
1416 \begin_inset Newline newline
1417 \end_inset
1418
1419 section, which can be found on page.
1420 \end_layout
1421
1422 \begin_layout Standard
1423 然后将光标放在单词“section”后边,选择 
1424 \family sans
1425 Insert\SpecialChar \menuseparator
1426 Cross
1427 \begin_inset space ~
1428 \end_inset
1429
1430 Reference 或点击工具栏按钮
1431 \family default
1432  
1433 \begin_inset Graphics
1434         filename ../../images/dialog-show-new-inset_ref.png
1435         scale 50
1436         groupId In line
1437
1438 \end_inset
1439
1440  调出交叉引用对话框。你将会看到可用的标签列表,当然现在只有一个:
1441 \begin_inset Quotes eld
1442 \end_inset
1443
1444 sec:About-This-Document
1445 \begin_inset Quotes erd
1446 \end_inset
1447
1448 ,选定它并点击应用(
1449 \family sans
1450 Apply
1451 \family default
1452 )按钮。现在再把光标定位到单词“page”后边,并把引用格式改为页码,最后再点击应用。(为了保证排版的正确性,应该在单词“section”和引用之间放置一个保护
1453 性空格(
1454 \family sans
1455 Protected
1456 \begin_inset space ~
1457 \end_inset
1458
1459 Blank
1460 \family default
1461 )。对页码的引用也是这样。)
1462 \end_layout
1463
1464 \begin_layout Standard
1465 另外还可以在标签上右击,在上下文菜单(右键菜单)中选择“复制为引用”(
1466 \family sans
1467 Copy as Reference
1468 \family default
1469 )。这样当前标签的交叉引用就已经复制到了剪贴板中,在需要的地方粘贴即可。
1470 \end_layout
1471
1472 \begin_layout Standard
1473 LyX 会将交叉引用放在光标所在位置。在打印出来的文档中,引用将会被替换成页码或节编号(这要看引用格式是怎么设置的了)。在输出的 DVI 文件中,我们会看到对节
1474  2(Section
1475 \begin_inset space ~
1476 \end_inset
1477
1478 2)和页 1(Page
1479 \begin_inset space ~
1480 \end_inset
1481
1482 1)的引用。
1483 \end_layout
1484
1485 \begin_layout Standard
1486 点击交叉引用将会出现交叉引用对话框,点击转至标签(
1487 \family sans
1488 Go
1489 \begin_inset space ~
1490 \end_inset
1491
1492 to
1493 \begin_inset space ~
1494 \end_inset
1495
1496 Label
1497 \family default
1498 ),光标将会定位到引用标签。这个功能还真有点像超链接。
1499 \end_layout
1500
1501 \begin_layout Subsection
1502 关于标签的更多讨论
1503 \end_layout
1504
1505 \begin_layout Standard
1506 前边说过,LyX 会自动计算交叉引用的编号,现在来试试这个功能。在节 2 前边添加一个新节,更新 DVI 输出文件,对节的交叉引用已经变成 3
1507  了。再把“About this Document”设置成子节(subsection),引用将会从 3 变为 2.1 。当然,不在标签前边添加一整页文字的话,引用
1508 的页码是不会改变的。
1509 \end_layout
1510
1511 \begin_layout Standard
1512 你可以再多添加几个标签,在其它地方引用一下。如果使用交叉引用比较多的话,开着交叉引用对话框是个好主意。
1513 \end_layout
1514
1515 \begin_layout Standard
1516
1517 \shape italic
1518 \emph on
1519 还可以从 
1520 \shape default
1521 User's Guide
1522 \emph default
1523  
1524 \shape italic
1525 \emph on
1526 那里,复制些文字过来
1527 \begin_inset Foot
1528 status collapsed
1529
1530 \begin_layout Plain Layout
1531 By the way, copying a chapter title may cause an error, because chapters
1532  aren't allowed in the article class, see section
1533 \begin_inset space ~
1534 \end_inset
1535
1536
1537 \begin_inset CommandInset ref
1538 LatexCommand ref
1539 reference "sec:文档类"
1540
1541 \end_inset
1542
1543 .
1544  If this happens, just delete the chapter title.
1545 \end_layout
1546
1547 \end_inset
1548
1549 ,检验一下对页码的引用是不是正确。
1550 \end_layout
1551
1552 \begin_layout Standard
1553 练习:修正 
1554 \family typewriter
1555 example_raw.lyx
1556 \family default
1557  中的引用。
1558 \end_layout
1559
1560 \begin_layout Section
1561 脚注(Footnotes)与旁注(Margin Notes)
1562 \end_layout
1563
1564 \begin_layout Standard
1565 点击工具栏按钮 
1566 \begin_inset Graphics
1567         filename ../../images/footnote-insert.png
1568         scale 50
1569         groupId In line
1570
1571 \end_inset
1572
1573  或菜单 
1574 \family sans
1575 Insert\SpecialChar \menuseparator
1576 Footnote,将会在当前位置插入脚注。在文档中找到单词“LyX”,将光标定位在它后边,点击
1577 \family default
1578 工具栏按钮 
1579 \begin_inset Graphics
1580         filename ../../images/footnote-insert.png
1581         scale 50
1582         groupId In line
1583
1584 \end_inset
1585
1586 ,脚注框将会出现在“LyX”后边,可以在里边输入脚注文字,现在输入
1587 \end_layout
1588
1589 \begin_layout LyX-Code
1590 LyX is a typesetting word processor.
1591 \end_layout
1592
1593 \begin_layout Standard
1594 脚注文字前边有一个灰框,写着“脚注 x”(foot x),这里的“x”是脚注编号,点击它,脚注框将会关闭,光剩下那个灰框,这个动作称为“折叠”(folding)
1595 ,再次点击又会“展开”(unfold)。以后可以随时展开它重新编辑脚注文字。
1596 \end_layout
1597
1598 \begin_layout Standard
1599 这一段已经过时,跳过不译。
1600 \end_layout
1601
1602 \begin_layout Standard
1603 脚注也可以像普通文字那样剪切、粘贴,选定脚注的灰框后就可以粘贴了。另外,选定一段文本再点击按钮 
1604 \begin_inset Graphics
1605         filename ../../images/footnote-insert.png
1606         scale 50
1607         groupId In line
1608
1609 \end_inset
1610
1611 ,你就可以将一段文本转换为脚注了。要将从脚注变为常规文字,只需要将光标定位在脚注文字的最前边后再按下退格键(
1612 \family sans
1613 Backspace
1614 \family default
1615 ),或者将光标定位在脚注文字的最后边再按下删除键(
1616 \family sans
1617 Delete
1618 \family default
1619 )。
1620 \end_layout
1621
1622 \begin_layout Standard
1623 使用菜单 
1624 \family sans
1625 Insert\SpecialChar \menuseparator
1626 Marginal
1627 \begin_inset space ~
1628 \end_inset
1629
1630 Note 或工具栏按钮 
1631 \family default
1632
1633 \begin_inset Graphics
1634         filename ../../images/marginalnote-insert.png
1635         scale 50
1636         groupId In line
1637
1638 \end_inset
1639
1640 ,可以添加旁注。旁注和脚注从功能上说是类似的,其不同之处在于:
1641 \end_layout
1642
1643 \begin_layout Itemize
1644 屏幕上旁注显示为“旁注”(margin),脚注显示为“脚注”(foot)。
1645 \end_layout
1646
1647 \begin_layout Itemize
1648 旁注文字显示在页面旁边,脚注文字显示在页面底部。
1649 \end_layout
1650
1651 \begin_layout Itemize
1652 旁注不编号。
1653 \end_layout
1654
1655 \begin_layout Standard
1656 将脚注转变为常规文字,再把它们转变为旁注。运行 LaTeX 看看旁注是什么样的。
1657 \end_layout
1658
1659 \begin_layout Standard
1660 练习:修正 
1661 \family typewriter
1662 example_raw.lyx 
1663 \family default
1664 中的脚注
1665 \family typewriter
1666
1667 \end_layout
1668
1669 \begin_layout Section
1670 参考文献
1671 \family sans
1672 (Bibliography
1673 \family default
1674
1675 \begin_inset CommandInset label
1676 LatexCommand label
1677 name "sec:参考文献"
1678
1679 \end_inset
1680
1681
1682 \end_layout
1683
1684 \begin_layout Standard
1685 参考文献和交叉引用有点像,它在文档末尾有一个引用列表,你可以在文档中引用它们。和章节标题一样,LyX 和 LaTeX也会为您自动计算参考文献的编号,当编号改变时
1686 ,引用也会随之改变。
1687 \end_layout
1688
1689 \begin_layout Standard
1690 定位至文档末尾并切换至参考文献环境(
1691 \family sans
1692 Bibliography
1693 \family default
1694 ),你输入的每一个段落都将成为一个被引用对象。现在输入第一个引用项:“
1695 \family typewriter
1696 The Lyx Tutorial, by the LyX Documentation Team
1697 \family default
1698 ”。LyX 将会在每个引用项前边的框加上编号,点击引用项前边的框参考文献项(
1699 \family sans
1700 Bibliography
1701 \begin_inset space ~
1702 \end_inset
1703
1704 item
1705 \family default
1706 )对话框就会出现。其中“键”(key)是 LyX 中标识该引用项用的,标签(
1707 \family sans
1708 Label
1709 \family default
1710 )将会出现在输出文档中。标签项没有被设定时(默认如此),输出文档中就会出现参考文献的编号。为了方便记忆,把“键”(key)设定为“lyxtutorial”。
1711 \end_layout
1712
1713 \begin_layout Standard
1714 现在将光标定位至文档中要引用该文献的地方,选择 
1715 \family sans
1716 Insert\SpecialChar \menuseparator
1717 Citation 或工具栏按钮 
1718 \family default
1719
1720 \begin_inset Graphics
1721         filename ../../images/dialog-show-new-inset_citation.png
1722         scale 50
1723         groupId In line
1724
1725 \end_inset
1726
1727 ,将出现引用对话框(
1728 \family sans
1729 Citation
1730 \family default
1731  dialog)。对话框中左侧
1732 \begin_inset Foot
1733 status collapsed
1734
1735 \begin_layout Plain Layout
1736 原文误写为右侧
1737 \end_layout
1738
1739 \end_inset
1740
1741 面板列出了可用的文献项,选择“lyxtutorial”并点击添加按钮(Add)指定将引用的文献(可指定多个),最后点击确定或应用按钮插入文献引用(原文中少了这一
1742 步操作)。查看输出文件,你会看到方括号中以编号或标签的形式引用了文档末尾的参考文献项。
1743 \end_layout
1744
1745 \begin_layout Standard
1746 引用对话框中的注释字段会在方括号中引用文献后边添加一个注释,用以说明引用的是哪一页或哪一章。要想引用文献的标签而不是编号的话,在参考文献项对话框(
1747 \family sans
1748 Bibliography
1749 \begin_inset space ~
1750 \end_inset
1751
1752 item
1753 \family default
1754  dialog)中设定标签值即可。更多信息参见 
1755 \emph on
1756 User's Guide
1757 \emph default
1758
1759 \end_layout
1760
1761 \begin_layout Standard
1762 练习:修正 
1763 \family typewriter
1764 example_raw.lyx
1765 \family default
1766  中的参考文献项和引用。
1767 \end_layout
1768
1769 \begin_layout Section
1770 目录(Table of Contents)
1771 \end_layout
1772
1773 \begin_layout Standard
1774 用 LyX 在文档开始添加目录非常简单:在文档标题后敲回车,选择 
1775 \family sans
1776 Insert\SpecialChar \menuseparator
1777 List
1778 \begin_inset space ~
1779 \end_inset
1780
1781 /
1782 \begin_inset space ~
1783 \end_inset
1784
1785 TOC\SpecialChar \menuseparator
1786 Table
1787 \begin_inset space ~
1788 \end_inset
1789
1790 of
1791 \begin_inset space ~
1792 \end_inset
1793
1794 Contents 就可插入目录了。这时文字“
1795 \family default
1796 Table of Contents
1797 \family sans
1798 ”以按钮的形式出现在文档的第一行。
1799 \end_layout
1800
1801 \begin_layout Standard
1802 输出文档后,你会发现目录已经生成了,它列出了文档中的章节标题。修改文档的章节后,重新输出文档,目录也会随之改变。
1803 \end_layout
1804
1805 \begin_layout Standard
1806 为了保证文档的可读性,LyX 的编辑窗口中并不显示目录内容。选择 
1807 \family sans
1808 Document\SpecialChar \menuseparator
1809 Outline 或工具栏按钮 
1810 \family default
1811
1812 \begin_inset Graphics
1813         filename ../../images/dialog-toggle_toc.png
1814         scale 50
1815         groupId In line
1816
1817 \end_inset
1818
1819 ,将在一个新开的提纲窗口(
1820 \family sans
1821 Outline
1822 \family default
1823  window)中显示目录内容。就算你没在文档中插入目录,这一操作依然有效。当你需要在文档各部分间快速切换时,这一工具会变得相当有用。在提纲窗口中点击某一章节标
1824 题将会高亮显示该行,并在编辑窗口中定位至该章节。你也可以使用方向键在目录中移动
1825 \begin_inset Foot
1826 status collapsed
1827
1828 \begin_layout Plain Layout
1829 本人测试无效,原因不明。
1830 \end_layout
1831
1832 \end_inset
1833
1834 。编辑文档时开着提纲窗口将会很方便。导航菜单(
1835 \family sans
1836 Navigate
1837 \family default
1838 )也能提供类似功能。
1839 \end_layout
1840
1841 \begin_layout Standard
1842 删掉 Table of Contents 按钮就能删掉目录了。
1843 \end_layout
1844
1845 \begin_layout Standard
1846 练习:修正 
1847 \family typewriter
1848 example_raw.lyx
1849 \family default
1850  中的目录。
1851 \end_layout
1852
1853 \begin_layout Chapter
1854 数学公式
1855 \end_layout
1856
1857 \begin_layout Standard
1858 不少科学家使用 LaTeX,这是因为它能够输出漂亮的公式,还不用使用其它字处理软件的控制字和它们的公式编辑器。但这些科学家中有不少人觉得 LaTeX
1859  很难用,因为它用起来不像是在写文章,而像是在编程。LyX 能够很好的解决这个问题,它对公式能够实现所见即所想。如果熟悉 LaTeX 的话,你会发现以前常用的
1860  LaTeX 的数学命令都能被 LyX 正确识别,而且能够显示成最后输出时的样子。如果不会使用 LaTeX的话,你照样能通过数学面板简单快速的输入漂亮的数学公式
1861
1862 \end_layout
1863
1864 \begin_layout Section
1865 数学模式
1866 \end_layout
1867
1868 \begin_layout Standard
1869 在你的文档中输入:
1870 \end_layout
1871
1872 \begin_layout LyX-Code
1873 I like what Einstein said, E=mc^2, because it's so simple.
1874  
1875 \end_layout
1876
1877 \begin_layout Standard
1878 现在你的公式并不能被正确显示,因为 LyX 并不知道你是在输入公式,所以它按照常规文本来处理输入的公式。
1879 \end_layout
1880
1881 \begin_layout Standard
1882 要输入公式,只要点击工具栏上的按钮 
1883 \begin_inset Graphics
1884         filename ../../images/math-mode.png
1885         scale 50
1886         groupId In line
1887
1888 \end_inset
1889
1890  或使用菜单 
1891 \family sans
1892 Insert\SpecialChar \menuseparator
1893 Math\SpecialChar \menuseparator
1894 Inline
1895 \begin_inset space ~
1896 \end_inset
1897
1898 Formula,LyX 就会插入一个蓝色方框,这就是一个空的公式。现在再输入 
1899 \family typewriter
1900 E=mc^2 就行了。在公式中输入字符后,蓝色方框会消失。按下 Esc 退出公式输入状态,公式四角的紫色标记会消失并将光标定位在公式右边。再输入文字时,LyX
1901  会按照常规字符来处理它们的。
1902 \end_layout
1903
1904 \begin_layout Standard
1905 将文档输出后,你会看到公式已经被正确排版了。等号两边都留有间距,数字“2”也被放到了上标的位置。在数学模式下数字就被看作数字处理,英文字符被视为变量并使用斜体排
1906 版。
1907 \end_layout
1908
1909 \begin_layout Standard
1910 LyX 的公式编辑器是所见即所得哲学的又一个例子。LaTeX 中用文本和命令输入公式,如:
1911 \backslash
1912 sqrt{2},将文档输出后才能看到公式的真正样子,在编辑状态下,一般人是很难发现所输入公式的错误的。虽然 LyX 并没有试着让公式在编辑状态下就显示的非常完美
1913 ,但它的确让人看到了所输入公式的样子。输出时 LaTeX 再接手对公式进行专业的排版。
1914 \begin_inset Foot
1915 status collapsed
1916
1917 \begin_layout Plain Layout
1918 译注:如果你设置了即时预览,LyX 在公式退出编辑状态后就会将公式显示为文档输出后的样子!
1919 \end_layout
1920
1921 \end_inset
1922
1923
1924 \end_layout
1925
1926 \begin_layout Section
1927 在公式中导航
1928 \end_layout
1929
1930 \begin_layout Standard
1931 现在把 
1932 \begin_inset Formula $E=mc^{2}$
1933 \end_inset
1934
1935  改为 
1936 \begin_inset Formula $E=1+mc^{2}$
1937 \end_inset
1938
1939 。使用方向键将光标移入公式中,公式四角会出现紫色标记告诉你现在正在编辑公式。按下方向键将光标定位在等号后边,输入“1+”。使用方向键将光标移出公式或使用
1940  Esc 退出公式编辑状态。
1941 \end_layout
1942
1943 \begin_layout Standard
1944 在公式中的编辑操作和常规文字的编辑没有区别,不再详述。
1945 \end_layout
1946
1947 \begin_layout Standard
1948 如果想把 
1949 \begin_inset Formula $E=mc^{2}$
1950 \end_inset
1951
1952  改为 
1953 \begin_inset Formula $E=mc^{2.5}+1$
1954 \end_inset
1955
1956 ,你需要将光标定位至公式相应的位置上修改即可。要注意的是上下标的编辑方式,如果使用鼠标进行定位的话,公式正文和上下标的位置是不容易区分的。你可用方向键将光标定位
1957 到字母“c”后边、数字“2”前边,按下方向键“上”后你就可以修改上标了。完成后再按方向键“下”或空格回到公式正文编辑状态。
1958 \end_layout
1959
1960 \begin_layout Section
1961 指数与上下标
1962 \end_layout
1963
1964 \begin_layout Standard
1965 输入指数时,你可以使用界面下方的工具栏或直接输入“^”,LyX 会在上标位置放置一个蓝色方框,接下来输入的字符会被视为上标。上标输入完成后按空格回到公式正文编辑
1966 状态。类似指数的输入,输入下标只需键入“_”。
1967 \end_layout
1968
1969 \begin_layout Standard
1970 练习:将 
1971 \family typewriter
1972 example_raw.lyx
1973 \family default
1974  中的公式 1 改为数学模式。
1975 \end_layout
1976
1977 \begin_layout Section
1978 数学工具栏
1979 \end_layout
1980
1981 \begin_layout Standard
1982 使用数学工具栏可以输入各种符号和复杂的公式。虽然使用键盘和菜单也能实现这些功能,但现在我们只讨论如何使用数学工具栏。以后你可以从其它手册中学到如何使用快捷键输入
1983
1984 \end_layout
1985
1986 \begin_layout Standard
1987 进入公式编辑状态后,数学工具栏会自动出现在界面下方。你也可以使用菜单 
1988 \family sans
1989 View\SpecialChar \menuseparator
1990 Toolbars\SpecialChar \menuseparator
1991 Math 将其永久调出。
1992 \end_layout
1993
1994 \begin_layout Subsection
1995 希腊字母与符号
1996 \end_layout
1997
1998 \begin_layout Standard
1999 使用数学工具栏你可以输入很多数学符号,包括:各种箭头、关系、运算符、求和求积符号。求和、求积的上下限可以使用上下标实现。
2000 \end_layout
2001
2002 \begin_layout Standard
2003 在这里你无所不能。
2004 \end_layout
2005
2006 \begin_layout Subsection
2007 根号、重音与定界符
2008 \end_layout
2009
2010 \begin_layout Standard
2011 点击按钮 
2012 \begin_inset Graphics
2013         filename ../../images/math/sqrt.png
2014         scale 50
2015
2016 \end_inset
2017
2018 ,LyX 会插入根号并将光标定位在根号下的蓝色方框中。你可以在里边输入任何公式符号,LyX 会自动缩放根号大小以适应输入的公式。
2019 \end_layout
2020
2021 \begin_layout Standard
2022 可以使用重音修饰单个字符(
2023 \begin_inset Formula $\overrightarrow{v}$
2024 \end_inset
2025
2026 )或一组字符(
2027 \begin_inset Formula $\overrightarrow{a+b}$
2028 \end_inset
2029
2030 ),方法都是相同的。点击按钮 
2031 \begin_inset Graphics
2032         filename ../../images/math/hat.png
2033         scale 50
2034         groupId In line
2035
2036 \end_inset
2037
2038 ,LyX 将插入该修饰并附带一个输入点,在这里输入字符即可。有两种修饰类型:一个是自动缩放的;另一个是固定尺寸的。固定尺寸的适合修饰单个字符。
2039 \end_layout
2040
2041 \begin_layout Standard
2042 定界符(小括号、中括号、大括号)的用法都差不多,点击按钮 
2043 \begin_inset Graphics
2044         filename ../../images/dialog-show_mathdelimiter.png
2045         scale 50
2046         groupId In line
2047
2048 \end_inset
2049
2050  出现一个对话框,在里边选择你需要的即可。默认时,两边的定界符是匹配的,取消“keep matched”复选框后也可以把两边的定界符设置成不同的。例如:
2051 \begin_inset Formula $a=\left\langle 7\right.$
2052 \end_inset
2053
2054 ,“7”的右边就没有使用定界符。
2055 \end_layout
2056
2057 \begin_layout Standard
2058 觉得麻烦的话也可以直接用键盘输入括号,不过这样输入的括号和常规文本一样都是固定大小的。如果括号中有大个的分式或矩阵的话,公式就会很难看,看了下边的公式你就明白了
2059
2060 \begin_inset Formula 
2061 \[
2062 (\frac{\frac{1}{2}}{\frac{2}{\frac{1}{3}}+\sqrt{2}})=\left(\frac{\frac{1}{2}}{\frac{2}{\frac{1}{3}}+\sqrt{2}}\right)
2063 \]
2064
2065 \end_inset
2066
2067
2068 \end_layout
2069
2070 \begin_layout Standard
2071 选定公式的一部分后再从面板插入根号、重音或定界符,看看发生了什么?
2072 \end_layout
2073
2074 \begin_layout Standard
2075 练习:把 
2076 \begin_inset Formula $f=ma$
2077 \end_inset
2078
2079  变为 
2080 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
2081 \end_inset
2082
2083
2084 \end_layout
2085
2086 \begin_layout Subsection
2087 分式
2088 \end_layout
2089
2090 \begin_layout Standard
2091 使用数学工具栏按钮 
2092 \begin_inset Graphics
2093         filename ../../images/math/frac.png
2094         scale 50
2095         groupId In line
2096
2097 \end_inset
2098
2099  插入分式,LyX 将在分式上创建两个输入点,并将焦点定位在上边的输入点上,你可以使用方向键或鼠标在这两个输入点间切换
2100 \begin_inset Foot
2101 status collapsed
2102
2103 \begin_layout Plain Layout
2104 译注:当焦点在上边时,按下“Tab”可以切换到下边的输入点。
2105 \end_layout
2106
2107 \end_inset
2108
2109 。在这两个输入点上输入公式,就能得到所需的分式了。
2110 \end_layout
2111
2112 \begin_layout Standard
2113 练习:修正 
2114 \family typewriter
2115 example_raw.lyx
2116 \family default
2117  中的公式 2。
2118 \end_layout
2119
2120 \begin_layout Subsection
2121 TeX 模式:lim、log、sin与其它
2122 \end_layout
2123
2124 \begin_layout Standard
2125 由于公式中的字符都被视为变量,所以输入的“sin”会被看作是三个变量 
2126 \begin_inset Formula $s$
2127 \end_inset
2128
2129
2130 \begin_inset Formula $i$
2131 \end_inset
2132
2133
2134 \begin_inset Formula $n$
2135 \end_inset
2136
2137  的乘积,并使用 Roman 斜体显示,而且在 sin 和 变量 x 之间也没有额外的间距。应该如何得到 
2138 \begin_inset Formula $\sin\left(x\right)$
2139 \end_inset
2140
2141  而不是 
2142 \begin_inset Formula $sin(x)$
2143 \end_inset
2144
2145  呢?
2146 \end_layout
2147
2148 \begin_layout Standard
2149 点击数学工具栏上的按钮 
2150 \begin_inset Graphics
2151         filename ../../images/math/functions.png
2152         scale 50
2153         groupId In line
2154
2155 \end_inset
2156
2157  并选择“sin”,LyX 将输入“sin”并将其设为黑色 Roman 正体。“sin”这三个字符被视为一个整体,删除也是一起删除。然后再输入“(x)”,它们将
2158 被显示为蓝色斜体。在输出文件中,公式将会被正确排版。
2159 \end_layout
2160
2161 \begin_layout Standard
2162 在按钮 
2163 \begin_inset Graphics
2164         filename ../../images/math/functions.png
2165         scale 50
2166         groupId In line
2167
2168 \end_inset
2169
2170  的函数列表中还有其它三角函数及其反函数、双曲函数、对数、极限等。这些函数都可以接受上下标,如:“
2171 \begin_inset Formula $\cos^{2}\theta$
2172 \end_inset
2173
2174 ” 和 “
2175 \begin_inset Formula $\lim_{n\rightarrow\infty}$
2176 \end_inset
2177
2178 ”。
2179 \end_layout
2180
2181 \begin_layout Standard
2182 练习:修正 
2183 \family typewriter
2184 example_raw.lyx
2185 \family default
2186  中的公式 3。
2187 \end_layout
2188
2189 \begin_layout Subsection
2190 矩阵
2191 \end_layout
2192
2193 \begin_layout Standard
2194 点击数字工具栏按钮 
2195 \begin_inset Graphics
2196         filename ../../images/dialog-show_mathmatrix.png
2197         scale 50
2198         groupId In line
2199
2200 \end_inset
2201
2202 ,出现的对话框将允许你设置要输入的矩阵的行数和列数,现在分别将其设为 2 和 3。LyX 将会插入一个 
2203 \begin_inset Formula $2\times3$
2204 \end_inset
2205
2206  的矩阵,你可以在其中的 6 个输入点上输入任何公式,当然将它们留空也是可以的。
2207 \end_layout
2208
2209 \begin_layout Standard
2210 可以使用 Tab 键或方向键在矩阵各元素的输入点之间切换,赶快去试试它们的功能吧。
2211 \end_layout
2212
2213 \begin_layout Standard
2214 你还可以使用菜单 
2215 \family sans
2216 Edit\SpecialChar \menuseparator
2217 Rows
2218 \begin_inset space \thinspace{}
2219 \end_inset
2220
2221 &
2222 \begin_inset space \thinspace{}
2223 \end_inset
2224
2225 Columns 或数学工具栏按钮 
2226 \family default
2227
2228 \begin_inset Graphics
2229         filename ../../images/tabular-feature_append-row.png
2230         scale 50
2231         groupId In line
2232
2233 \end_inset
2234
2235
2236 \begin_inset Graphics
2237         filename ../../images/tabular-feature_delete-row.png
2238         scale 50
2239         groupId In line
2240
2241 \end_inset
2242
2243
2244 \begin_inset Graphics
2245         filename ../../images/tabular-feature_append-column.png
2246         scale 50
2247         groupId In line
2248
2249 \end_inset
2250
2251  和 
2252 \begin_inset Graphics
2253         filename ../../images/tabular-feature_delete-column.png
2254         scale 50
2255         groupId In line
2256
2257 \end_inset
2258
2259  改变矩阵的维数。
2260 \end_layout
2261
2262 \begin_layout Standard
2263 有关矩阵各列的水平对齐方式和整个矩阵的垂直对齐方式的更多信息请看 
2264 \emph on
2265 User's Guide。
2266 \shape italic
2267 注意:想要输入一个包含文字的表格时,请使用 LyX 强大的表格功能,而不要使用矩阵。
2268 \end_layout
2269
2270 \begin_layout Subsection
2271 显示模式
2272 \end_layout
2273
2274 \begin_layout Standard
2275 LyX 中公式的显示方式有两种,一种是行内公式,一种是单行公式。行内公式适合于较简短的公式,单行公式适合于较庞大的公式或是你想把它单独显示。另外,多行公式必需是
2276 单行公式,而且只有单行公式才能加标签和编号(参见 
2277 \emph on
2278 User's Guide
2279 \emph default
2280 )。
2281 \end_layout
2282
2283 \begin_layout Standard
2284 点击按钮 
2285 \begin_inset Graphics
2286         filename ../../images/math-display.png
2287         scale 50
2288         groupId In line
2289
2290 \end_inset
2291
2292  会插入一个单行公式,该公式新起一行并居中显示。按钮 
2293 \begin_inset Graphics
2294         filename ../../images/math-display.png
2295         scale 50
2296         groupId In line
2297
2298 \end_inset
2299
2300  其实是一个切换开关,点击它你会在公式的两种显示模式间切换。
2301 \end_layout
2302
2303 \begin_layout Standard
2304 单行公式和行内公式在显示上大致是相同的,你需要注意以下几点不同:
2305 \end_layout
2306
2307 \begin_layout Itemize
2308 几个符号的默认字体变大,如:
2309 \begin_inset Formula $\sum$
2310 \end_inset
2311
2312  和 
2313 \begin_inset Formula $\int$
2314 \end_inset
2315
2316  。
2317 \end_layout
2318
2319 \begin_layout Itemize
2320 极限和求和的上下标被放在了符号的顶部和底部。
2321 \end_layout
2322
2323 \begin_layout Itemize
2324 公式居中对齐。
2325 \end_layout
2326
2327 \begin_layout Standard
2328 关于单行公式最后一个需要注意的问题是排版问题。你需要确切的知道,单行公式和其前后的文字是不是在同一段中。如果你在单行公式后敲回车,那么它后边的文字将是新的一段,
2329 而新起一段是有段间距和缩进的。如果你不想新起一段,那么直接在单行公式后边输入文字就好了。
2330 \end_layout
2331
2332 \begin_layout Standard
2333 练习:将 
2334 \family typewriter
2335 example_raw.lyx
2336 \family default
2337  中的公式改为单行公式,看看有什么不同。
2338 \end_layout
2339
2340 \begin_layout Standard
2341 练习:使用本节学到的知识输入下边公式
2342 \begin_inset Foot
2343 status collapsed
2344
2345 \begin_layout Plain Layout
2346 完成后试试菜单 
2347 \family sans
2348 Insert\SpecialChar \menuseparator
2349 Math\SpecialChar \menuseparator
2350 Cases
2351 \begin_inset space ~
2352 \end_inset
2353
2354 Environment。
2355 \end_layout
2356
2357 \end_inset
2358
2359
2360 \begin_inset Formula 
2361 \[
2362 f(x)=\left\{ \begin{array}{cc}
2363 \log_{8}x & x>0\\
2364 0 & x=0\\
2365 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
2366 \end{array}\right.
2367 \]
2368
2369 \end_inset
2370
2371
2372 \end_layout
2373
2374 \begin_layout Section
2375 继续学习
2376 \end_layout
2377
2378 \begin_layout Standard
2379 LyX 的公式编辑器能做很多事情,现在你只是刚刚熟悉了最基本的。继续阅读
2380 \emph on
2381  User's Guide
2382 \emph default
2383 ,你可以学到:
2384 \end_layout
2385
2386 \begin_layout Itemize
2387 给公式添加标签、编号。
2388 \end_layout
2389
2390 \begin_layout Itemize
2391 多行公式。
2392 \end_layout
2393
2394 \begin_layout Itemize
2395 改变字型。
2396 \end_layout
2397
2398 \begin_layout Itemize
2399 细调字体大小与间距(草稿的最后阶段再考虑这些事)。
2400 \end_layout
2401
2402 \begin_layout Itemize
2403 编辑宏。在文档开头处编写好后,文档中任何地方都可以使用。
2404 \end_layout
2405
2406 \begin_layout Itemize
2407 其它。
2408 \end_layout
2409
2410 \begin_layout Chapter
2411 杂项
2412 \end_layout
2413
2414 \begin_layout Section
2415 LyX 的其它重要特性
2416 \end_layout
2417
2418 \begin_layout Standard
2419 我们并没有把 LyX 的所有都说全,也没有这样的打算。你可以查看 
2420 \emph on
2421 User's Guide
2422 \emph default
2423  和 
2424 \emph on
2425 Embedded
2426 \begin_inset space ~
2427 \end_inset
2428
2429 Objects
2430 \emph default
2431  获得更多信息。这里我们将提到几个 LyX 的重要特性:
2432 \end_layout
2433
2434 \begin_layout Itemize
2435 LyX 具有所见即所想的表格支持。使用菜单 
2436 \family sans
2437 Insert\SpecialChar \menuseparator
2438 Table 或 按钮 
2439 \family default
2440
2441 \begin_inset Graphics
2442         filename ../../images/tabular-insert.png
2443         scale 50
2444         groupId In line
2445
2446 \end_inset
2447
2448  可以插入表格。在表格上单击右键,在右键菜单中选择表格设置对话框可以编辑表格的更多属性。
2449 \end_layout
2450
2451 \begin_layout Itemize
2452 LyX 可以支持各种格式的图片。点击菜单 
2453 \family sans
2454 Insert\SpecialChar \menuseparator
2455 Graphics 或工具栏按钮 
2456 \family default
2457
2458 \begin_inset Graphics
2459         filename ../../images/dialog-show-new-inset_graphics.png
2460         scale 50
2461         groupId In line
2462
2463 \end_inset
2464
2465 ,选择图片文件,你还可以对它旋转、缩放。你还可以对图表使用标题,LyX 还能自动产生图表的列表。
2466 \end_layout
2467
2468 \begin_layout Itemize
2469 LyX 有很强的可定制性,从界面外观到文档的输出方式都可以通过几种方式来定制。大多的定制可以通过菜单 
2470 \family sans
2471 Tools\SpecialChar \menuseparator
2472 Preferences 来实现。更多信息参见菜单 Help\SpecialChar \menuseparator
2473 Customization。
2474 \end_layout
2475
2476 \begin_layout Itemize
2477 LyX 开发组成员来自五大洲,所以 LyX 能比其它字处理软件更好的支持非英语(如荷兰语、德语、法语、希腊语、捷克语、土耳其语)。从右到左的语言:阿拉伯语、波斯
2478 语、希伯来语;亚洲语言:中文、日语、韩语等都能得到支持。你可以使用其它的语言写文档,也可以将 LyX 的界面和错误信息定义成其它的语言。
2479 \end_layout
2480
2481 \begin_layout Itemize
2482 LyX 的菜单支持快捷键绑定。你既可以通过 
2483 \family sans
2484 Alt+F O 实现菜单 File\SpecialChar \menuseparator
2485 Open 的点击效果,也可以通过快捷键来实现(默认是 Ctrl+O)。快捷键绑定也是可以自定义的,更多信息参见菜单
2486  Help\SpecialChar \menuseparator
2487 Customization。
2488 \end_layout
2489
2490 \begin_layout Itemize
2491 LyX 可以读取 LaTeX 文档。参见 
2492 \begin_inset CommandInset ref
2493 LatexCommand ref
2494 reference "sub:tex2lyx"
2495
2496 \end_inset
2497
2498
2499 \end_layout
2500
2501 \begin_layout Itemize
2502 LyX 支持拼写检查、同义词典和字数统计。
2503 \end_layout
2504
2505 \begin_layout Itemize
2506 LyX 支持附录和集注。
2507 \end_layout
2508
2509 \begin_layout Section
2510 LaTeX 用户必读
2511 \begin_inset CommandInset label
2512 LatexCommand label
2513 name "sec:LaTeX-用户必读"
2514
2515 \end_inset
2516
2517
2518 \end_layout
2519
2520 \begin_layout Standard
2521 如果你对 LaTeX 一无所知,那么你可以跳过这一节。如果你想了解一点 LaTeX 相关的东西,那就继续读下去吧。很多使用 LyX 的人都对 LaTeX
2522  比较熟悉,如果你也是这种人的话,你可能会有个疑问:LyX 真的能做到所有 LaTeX 能做的事情吗?LyX 的确能够通过这样或那样的方式做到
2523  LaTeX 能做的所有事情,而且 LyX 还能大大简化编辑 LaTeX 文档的工作量。
2524 \end_layout
2525
2526 \begin_layout Standard
2527 由于本教程仅仅是一个入门指南,所以我们只将注意力集中在新手们关心的地方。为了缩短篇幅,我们只给出了最少的信息。在 
2528 \emph on
2529 Additional
2530 \begin_inset space ~
2531 \end_inset
2532
2533 Features
2534 \emph default
2535  和 
2536 \emph on
2537 Embedded
2538 \begin_inset space ~
2539 \end_inset
2540
2541 Objects
2542 \emph default
2543  中有 LyX 和 LaTeX 区别的大量信息,那里还将教你如何在 LyX 中玩各种 LaTeX 的花活儿。
2544 \end_layout
2545
2546 \begin_layout Subsection
2547 TeX 模式
2548 \end_layout
2549
2550 \begin_layout Standard
2551 选择菜单 
2552 \family sans
2553 Insert\SpecialChar \menuseparator
2554 TeX
2555 \begin_inset space ~
2556 \end_inset
2557
2558 Code 或工具栏按钮 
2559 \family default
2560
2561 \begin_inset Graphics
2562         filename ../../images/ert-insert.png
2563         scale 50
2564         groupId In line
2565
2566 \end_inset
2567
2568  进入 TeX 模式。在 TeX 模式下输入的所有东西都会用红色显示,并直接送给 LaTeX 编译处理。
2569 \end_layout
2570
2571 \begin_layout Standard
2572 数学公式中 TeX 模式处理起来稍有不同,这里键入“
2573 \backslash
2574 ”进入 TeX 模式,输入空格或非字母字符(如:数字、下划线、脱字号或括号)退出 TeX 模式。退出 TeX 模式时,如果 LyX 认识你输入的
2575  TeX 命令,它就会将之转化为编译后的样子。如果你输入了“
2576 \family typewriter
2577
2578 \backslash
2579 gamma
2580 \family default
2581 ”并按下空格,LyX 会把它转化为蓝色的“
2582 \begin_inset Formula $\gamma$
2583 \end_inset
2584
2585 ”。对于不复杂的数学宏命令,LyX 都能转化成功的。对于熟练的 LaTeX 用户来说,直接输入 TeX 命令的方式会比使用数学工具栏速度快。
2586 \end_layout
2587
2588 \begin_layout Standard
2589 如果在 TeX 模式下输入“{”,LyX 将输入左右两个括号、退出 TeX 模式并将光标定位在两个括号中间等待输入。这使输入带参数的命令非常方便。
2590 \end_layout
2591
2592 \begin_layout Standard
2593 LyX 不能支持所有的 LaTeX 功能。有些根本就不支持,有些能够支持但不能实现所见即所想。TeX 模式使用户能够得到全部 LaTeX 的强大功能,而且还能使
2594 用 LyX 的方便特性(如:所见即所想的数学公式、表格和编辑方式)。LyX 永远也不会支持所有的 LaTeX 包,但你可以在序言加入 
2595 \family typewriter
2596
2597 \backslash
2598 usepackage{foo}
2599 \family default
2600 (见 
2601 \begin_inset CommandInset ref
2602 LatexCommand ref
2603 reference "sub:其它序言"
2604
2605 \end_inset
2606
2607 ),这样你就可以使用所有 LaTeX 包了。当然这些包并没有所见即所想支持。
2608 \end_layout
2609
2610 \begin_layout Subsection
2611 导入 LaTeX 文档── tex2lyx
2612 \begin_inset CommandInset label
2613 LatexCommand label
2614 name "sub:tex2lyx"
2615
2616 \end_inset
2617
2618
2619 \end_layout
2620
2621 \begin_layout Standard
2622 使用菜单 
2623 \family sans
2624 File\SpecialChar \menuseparator
2625 Import\SpecialChar \menuseparator
2626 LaTeX
2627 \begin_inset space ~
2628 \end_inset
2629
2630 (plain) 导入 LaTeX 文档,程序将执行 
2631 \family typewriter
2632 tex2lyx
2633 \family sans
2634 ,从 
2635 \family typewriter
2636 foo.tex
2637 \family sans
2638  创建 
2639 \family typewriter
2640 foo.lyx
2641 \family sans
2642 ,然后打开它。如果转换不成功,你可以试试在命令行加参数执行 
2643 \family typewriter
2644 tex2lyx
2645 \family sans
2646  命令。
2647 \end_layout
2648
2649 \begin_layout Standard
2650
2651 \family typewriter
2652 tex2lyx
2653 \family default
2654  能够转换大部份 LaTeX 文档,但不是所有东西都转换。它会把不懂的部分保留为 TeX 形式,所以你需要再进行手动修改。
2655 \end_layout
2656
2657 \begin_layout Standard
2658
2659 \family typewriter
2660 tex2lyx
2661 \family default
2662  有自己的 manpage。阅读它找到不能被支持的命令、bugs 及其解决方法还有如何使用命令选项。
2663 \end_layout
2664
2665 \begin_layout Subsection
2666 将 LyX 文档转化为 LaTeX 文档
2667 \end_layout
2668
2669 \begin_layout Standard
2670 选择菜单 
2671 \family sans
2672 File\SpecialChar \menuseparator
2673 Export\SpecialChar \menuseparator
2674 LaTeX 将你正在编辑的文档 
2675 \family typewriter
2676 whatever.lyx
2677 \family default
2678  输出为 
2679 \family typewriter
2680 whatever.tex
2681 \family default
2682
2683 \end_layout
2684
2685 \begin_layout Subsection
2686 LaTeX 序言
2687 \end_layout
2688
2689 \begin_layout Subsubsection
2690 文档类
2691 \end_layout
2692
2693 \begin_layout Standard
2694
2695 \family sans
2696 Document\SpecialChar \menuseparator
2697 Settings 对话框中的 
2698 \family default
2699 Document Class 页面能够处理很多 
2700 \family typewriter
2701
2702 \backslash
2703 documentclass
2704 \family default
2705  命令选项。这里你能够修改文档类、默认字体、页面大小,还可以在 Class options 区域中输入额外的选项
2706 \begin_inset Foot
2707 status collapsed
2708
2709 \begin_layout Plain Layout
2710 原文写的是 
2711 \family sans
2712 E
2713 \bar under
2714 x
2715 \bar default
2716 tra
2717 \begin_inset space ~
2718 \end_inset
2719
2720 Options,在 LyX 1.6.4 中没找到。
2721 \end_layout
2722
2723 \end_inset
2724
2725
2726 \end_layout
2727
2728 \begin_layout Subsubsection
2729 其它序言
2730 \begin_inset CommandInset label
2731 LatexCommand label
2732 name "sub:其它序言"
2733
2734 \end_inset
2735
2736
2737 \end_layout
2738
2739 \begin_layout Standard
2740 在 LaTeX 文档中输入的特殊命令在 LyX 当然也能使用。选择 
2741 \family sans
2742 Document\SpecialChar \menuseparator
2743 Settings\SpecialChar \menuseparator
2744 LaTeX
2745 \begin_inset space ~
2746 \end_inset
2747
2748 Preamble,在对话框中输入命令即可,输入的任何东西都会直接传给 LaTeX 编译处理。
2749 \end_layout
2750
2751 \begin_layout Subsection
2752 BibTeX
2753 \end_layout
2754
2755 \begin_layout Standard
2756 使用 BibTeX 可以创建供多文档使用的文献数据库……没错,LyX 能够支持 BibTeX。选择 
2757 \family sans
2758 Insert\SpecialChar \menuseparator
2759 List
2760 \begin_inset space ~
2761 \end_inset
2762
2763 /
2764 \begin_inset space ~
2765 \end_inset
2766
2767 TOC\SpecialChar \menuseparator
2768 BibTeX
2769 \begin_inset space ~
2770 \end_inset
2771
2772 Bibliography 加入一个 
2773 \family typewriter
2774 BibTeX
2775 \family sans
2776  文件,在数据库字段填入 
2777 \family default
2778 BibTeX 文件名,在样式字段填入 BibTeX 样式文件名。
2779 \end_layout
2780
2781 \begin_layout Standard
2782 这时你就可以引用参考文献了(见 
2783 \begin_inset CommandInset ref
2784 LatexCommand ref
2785 reference "sec:参考文献"
2786
2787 \end_inset
2788
2789 )。LyX 会自动管理 BibTeX 的运行。引用对话框中将会显示你 
2790 \family typewriter
2791 BibTeX
2792 \family default
2793  文件中所有可用的引用项列表。
2794 \end_layout
2795
2796 \begin_layout Section
2797 错误!
2798 \end_layout
2799
2800 \begin_layout Standard
2801 编译文档时,如果有 LyX 或 LaTeX 不能识别的东西,LyX 将会报错。这时会出现 LaTeX 错误对话框,点击某个错误将会定位到 LyX
2802  文档中发生错误的地方,并显示详细 LaTeX 错误信息。
2803 \end_layout
2804
2805 \begin_layout Standard
2806 \begin_inset ERT
2807 status open
2808
2809 \begin_layout Plain Layout
2810
2811
2812 \backslash
2813 clearpage
2814 \end_layout
2815
2816 \end_inset
2817
2818
2819 \end_layout
2820
2821 \end_body
2822 \end_document