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