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