123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="pre-typography">
- <?dbhtml filename="typography.html"?>
- <title>排版约定</title>
- <!--para>To make things easier to follow, there are a few typographical
- conventions used throughout this book. This section contains some
- examples of the typographical format found throughout Linux From
- Scratch.</para-->
- <para>为了您能更容易地跟上进度,首先说明本书的排版惯例。
- 本节包含本书中若干排版格式的示例。</para>
- <screen role="nodump"><userinput>./configure --prefix=/usr</userinput></screen>
- <!--para>This form of text is designed to be typed exactly as seen unless
- otherwise noted in the surrounding text. It is also used in the explanation
- sections to identify which of the commands is being referenced.</para-->
- <para>类似上面这样排版的文本应该被绝对准确地输入,除非上下文另有说明。
- 在解释命令的含义时,我们也用这种格式引用被解释的命令。</para>
- <!--para>In some cases, a logical line is extended to two or more physical lines
- with a backslash at the end of the line.</para-->
- <para>某些情况下,我们会将逻辑上的一行文本拆分成两行或多行,
- 此时行末会添加一个反斜线。</para>
- <screen role="nodump"><userinput>CC="gcc -B/usr/bin/" ../binutils-2.18/configure \
- --prefix=/tools --disable-nls --disable-werror</userinput></screen>
- <!--para>Note that the backslash must be followed by an immediate return. Other
- whitespace characters like spaces or tab characters will create incorrect
- results.</para-->
- <para>注意反斜线后面必须紧跟回车。反斜线后如果存在空格和制表符之类的空白字符,
- 将会得到不正确的结果。</para>
- <screen><computeroutput>install-info: unknown option '--dir-file=/mnt/lfs/usr/info/dir'</computeroutput></screen>
- <!--para>This form of text (fixed-width text) shows screen output, usually as
- the result of commands issued. This format is also used to show filenames,
- such as <filename>/etc/ld.so.conf</filename>.</para-->
- <para>以上文本(等宽字体)展示屏幕输出,一般是某个命令运行的结果。
- 等宽字体也被用于显示文件名,例如 <filename>/etc/ld.so.conf</filename>。</para>
- <para><emphasis>强调文本</emphasis></para>
- <!--para>This form of text is used for several purposes in the book. Its main
- purpose is to emphasize important points or items.</para-->
- <para>这样的文本在书中有一些不同目的。主要目的是强调重点。</para>
- <para><ulink url="&lfs-root;"/></para>
- <!--para>This format is used for hyperlinks both within the LFS community and to
- external pages. It includes HOWTOs, download locations, and websites.</para-->
- <para>以上格式被用于超链接,无论是链接到 LFS 社区内还是社区外。
- 链接可能指向教程、下载链接或其他网站。</para>
- <screen role="nodump"><userinput>cat > $LFS/etc/group << "EOF"
- <literal>root:x:0:
- bin:x:1:
- ......</literal>
- EOF</userinput></screen>
- <!--para>This format is used when creating configuration files. The first command
- tells the system to create the file <filename>$LFS/etc/group</filename> from
- whatever is typed on the following lines until the sequence End Of File (EOF)
- is encountered. Therefore, this entire section is generally typed as
- seen.</para-->
- <para>以上格式被用于创建配置文件。第一行指令告诉系统,创建文件
- <filename>$LFS/etc/group</filename> 并把用户输入的所有东西写入文件内容,
- 直到用户输入文件结束符 (EOF) 。因此,这些文本一般按原状输入。</para>
- <para><replaceable><需要替换的文本></replaceable></para>
- <!--para>This format is used to encapsulate text that is not to be typed
- as seen or for copy-and-paste operations.</para-->
- <para>尖括号包含的文本不应该直接输入,而应该替换成合适内容。
- 在复制粘贴到命令行时要注意替换。</para>
- <para><replaceable>[可选的文本]</replaceable></para>
- <para>方括号包含的文本是可选的,根据您的需要决定是否输入。</para>
- <para><filename>passwd(5)</filename></para>
- <!--para>This format is used to refer to a specific manual (man) page. The number inside parentheses
- indicates a specific section inside the manuals. For example,
- <command>passwd</command> has two man pages. Per LFS installation instructions,
- those two man pages will be located at
- <filename>/usr/share/man/man1/passwd.1</filename> and
- <filename>/usr/share/man/man5/passwd.5</filename>. When the book uses <filename>passwd(5)</filename> it is
- specifically referring to <filename>/usr/share/man/man5/passwd.5</filename>.
- <command>man passwd</command> will print the first man page it finds that
- matches <quote>passwd</quote>, which will be
- <filename>/usr/share/man/man1/passwd.1</filename>. For this example, you will
- need to run <command>man 5 passwd</command> in order to read the specific page
- being referred to. It should be noted that most man pages do not have duplicate
- page names in different sections. Therefore, <command>man <replaceable><program
- name></replaceable></command> is generally sufficient.</para-->
- <para> 以上格式被用于引用特定的手册 (man) 页面。数字表明系统手册中的某一节。例如,
- <command>passwd</command> 有两个 man 页面。LFS 安装命令将会把它们安装在
- <filename>/usr/share/man/man1/passwd.1</filename>和
- <filename>/usr/share/man/man5/passwd.5</filename>。当本书使用
- <filename>passwd(5)</filename> 时,我们特指
- <filename>/usr/share/man/man5/passwd.5</filename>。
- <command>man passwd</command> 会显示它找到的第一个匹配<quote>passwd</quote>
- 的 man 页面,即 <filename>/usr/share/man/man1/passwd.1</filename>。
- 对于本例,您需要执行 <command>man 5 passwd</command> 才能阅读指定的 man 页面。
- 多数 man 页面在各个章节中并不存在重名,因此
- <command>man <replaceable><program name></replaceable></command>
- 一般是足够的。</para>
- <note><title>译注</title>
- <para>这是一个译注,就是原文中并不存在,由译者添加的额外说明。
- 注意原文有时也使用这种框,
- 只有标题是<quote>译注</quote>的框才是译注。</para>
- </note>
- </sect1>
|