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