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