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