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