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