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