typography.xml 6.5 KB

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