⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 htmstyle.htm

📁 GhostScript的源代码
💻 HTM
📖 第 1 页 / 共 2 页
字号:

<p>
Define unindented paragraphs with <b><tt>&lt;p&gt;</tt></b>, never with
explicit line breaks <b><tt>&lt;br&gt;</tt></b>, and make them
ragged-right, not right-filled or centered.  Put the paragraph tag
<b><tt>&lt;p&gt;</tt></b> on a line alone, except when it is
<a href="#Anchor_placement">followed immediately by an anchor</a>.
Don't place the anchor before the paragraph tag.

<h3><a name="Blockquote"></a>Indented paragraphs: <b><tt>&lt;blockquote&gt;</tt></b></h3>

<p>
Define indented paragraphs with <b><tt>&lt;blockquote&gt;</tt></b>.  Avoid
elaborate nested indentation -- that is, more than two levels.  It is
generally a poor idea to try to make indentation carry too much weight of
meaning for text, so use indentation simply to separate visual elements for
easier reading.

<h3><a name="Line_breaks"></a>Explicit line breaks: <b><tt>&lt;br&gt;</tt></b></h3>

<p>
Use explicit line breaks <b><tt>&lt;br&gt;</tt></b> sparingly, and never as
a substitute for paragraph tags.  Do use them in

<ul>
<li>multi-line addresses
<li>formatted coding examples
<li>table entries, sparingly
</ul>

<h3><a name="Preformatted_text"></a>Preformatted text: <b><tt>&lt;pre&gt;</tt></b></h3>

<p>
Use preformatted text <b><tt>&lt;pre&gt;</tt></b> exclusively for material
that must be presented with exact spacing in a monospaced font, such as
extended coding examples.  Where extended preformatted text seems likely to
be wider than a typical browser window, reduce the font size:

<blockquote>
<b><tt>&lt;font size="-1"&gt;&lt;pre&gt;</tt></b><br>
<b><em>...&nbsp;Wide preformatted text&nbsp;...</em></b><br>
<b><tt>&lt;/pre&gt;&lt;/font&gt;</tt></b>
</blockquote>

<h2><a name="Use_of_fonts"></a>The use of different font faces</h2>

<p>
Do not use named fonts.  Use only standard markup to specify fonts, as
shown in this table.

<blockquote><table cellpadding=0 cellspacing=0>
<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Use of fonts</font><hr>
<tr valign=bottom>
	<th align=left>Tag
	<td>&nbsp;&nbsp;&nbsp;
	<th align=left>Used for
<tr>	<td colspan=3><hr>
<tr valign=top>	<td><b><tt>&lt;address&gt;</tt></b>
	<td>&nbsp;
	<td>Addresses in running text
<tr valign=top>	<td><b><tt>&lt;b&gt;</tt></b>
	<td>&nbsp;
	<td>Emphasis everywhere
<tr valign=top>	<td><b><tt>&lt;em&gt;</tt></b>
	<td>&nbsp;
	<td>Emphasis, usually in running text; with <b><tt>&lt;b&gt;</tt></b>, strong emphasis
<tr valign=top>	<td><b><tt>&lt;font size=</tt></b><b><em>N</em></b><b><tt>&gt;</tt></b>
	<td>&nbsp;
	<td>Table headings, extended <b><tt>&lt;pre&gt;</tt></b> examples
<tr valign=top>	<td><b><tt>&lt;pre&gt;</tt></b>
	<td>&nbsp;
	<td>Preformatted text (to control spacing)
<tr valign=top>	<td><b><tt>&lt;small&gt;</tt></b>
	<td>&nbsp;
	<td>Superscripts (smaller than <b><tt>&lt;font size="-1"&gt;</tt></b>)
<tr valign=top>	<td><b><tt>&lt;sup&gt;</tt></b>
	<td>&nbsp;
	<td>Superscripts
<tr valign=top>	<td><b><tt>&lt;tt&gt;</tt></b>
	<td>&nbsp;
	<td>With <b><tt>&lt;b&gt;</tt></b>, used for specific names of
	code, programs, and data in running text, and in short examples
</table></blockquote>

<hr>

<h1><a name="Lists"></a>Lists: <b><tt>&lt;ul&gt;, &lt;ol&gt;, &lt;dl&gt;</tt></b></h1>

<p>
Don't over-use lists: instead simply use clear wording in running text
wherever possible.  Use a list where the special formatting improves the
material's clarity and readability.

<p>
Most simple lists should be unordered (bulleted) lists
<b><tt>&lt;ul&gt;</tt></b>.  Use an ordered (numbered or alphabetized) list
<b><tt>&lt;ol&gt;</tt></b> only where the exact ordering or an exact count
is important.

<p>
Where entries in a descriptive list <b><tt>&lt;dl&gt;</tt></b> contain
extended descriptions <b><tt>&lt;dd&gt;</tt></b> -- especially if the
descriptions contain paragraph breaks or tables -- improve the spacing
between entries by making each entry a separate list.  That is, enclose
each entry in a separate list to give it more readable spacing, rather than
putting many <b><tt>&lt;dt&gt;...&lt;dd&gt;...</tt></b> entries in a single
list:

<blockquote><table cellpadding=0 cellspacing=0>
<tr valign=bottom>
	<th align=left>Use this form
	<td>&nbsp;&nbsp;&nbsp;&nbsp;
	<th align=left>... <b><em>NOT</em></b> this form
<tr>	<td colspan=3><hr>
<tr>	<td valign=top>
	    <b><tt>&lt;dl&gt;</tt></b><br>
	    <b><tt>&lt;dt&gt;</tt></b>Term<br>
	    <b><tt>&lt;dd&gt;</tt></b>Description<br>
	    <b><tt>&lt;p&gt;</tt></b>Another paragraph of description<br>
	    <b><tt>&lt;/dl&gt;</tt></b><br>
	    &nbsp;<br>
	    <b><tt>&lt;dl&gt;</tt></b><br>
	    <b><tt>&lt;dt&gt;</tt></b>Another term<br>
	    <b><tt>&lt;dd&gt;</tt></b>Another description<br>
	    <b><tt>&lt;/dl&gt;</tt></b><br>
	    ...<br>
	<td>&nbsp;
	<td valign=top>
	    <b><tt>&lt;dl&gt;</tt></b><br>
	    <b><tt>&lt;dt&gt;</tt></b>Term<br>
	    <b><tt>&lt;dd&gt;</tt></b>Description<br>
	    <b><tt>&lt;p&gt;</tt></b>Another paragraph of description<br>
	    <b><tt>&lt;dt&gt;</tt></b>Another term<br>
	    <b><tt>&lt;dd&gt;</tt></b>Another description<br>
	    ...<br>
	    <b><tt>&lt;/dl&gt;</tt></b>
</table></blockquote>

<p>
This may be more work for the HTML writer, but the results for the reader
are often much better.

<hr>

<h1><a name="Tables"></a>Tables: <b><tt>&lt;table&gt;</tt></b></h1>

<h2><a name="Readability"></a>Readability for the user and the HTML writer</h2>

<p>
Format tables to be as readable as possible both with a browser and when
converted to plain text.  Browsers and converters of all kinds handle
tables idiosyncratically, so there seems to be more art than science to
reaching this end, which accounts for all the detail in the guidelines for
tables: it is the reason for all the uses of background color
<b><tt>bgcolor</tt></b>, horizontal rules <b><tt>&lt;hr&gt;</tt></b>, and
explicit spacing.

<p>
Secondarily, arrange HTML source code for tables to be readable by the
writer and developer.

<h2><a name="Table_guidelines"></a>Specific guidelines for coding tables</h2>

<ul>
<li>Large tables have heads with the same background color as the page's
<a href="#Headline">headline</a>.  (Color is used only in tables and only
this way, and it is the same color everywhere.  In consideration of
differences of color vision, the color is chosen so that normal black text
contrasts with a brighter background, and the color itself against white.)

<li>Do not use borders for tables; they almost invariably only clutter the
appearance without adding to clarity, and they don't convert well to plain
text.  For visual spacing prefer white space.

<li>Set cell padding and spacing to 0.  Use explicit white space for
readability, not implicit white space.

<li>Begin the code for a new row <b><tt>&lt;tr&gt;</tt></b> on a new line.
Generally use <b><tt>valign=top</tt></b> to control the placement of text
in a row for readability with a browser or as plain text.

<li>Code the first column of a row beginning on the same line as the
beginning of the row, and then begin every other column on a separate line.
Always precede <b><tt>&lt;td&gt;</tt></b> by a tab character.

<li>Separate two columns of substantive material by a visually empty column
of nonbreaking spaces for readability.  Specify the width of this empty
column in the first row, and in all other rows give that column a single
nonbreaking space.

<li>Use horizontal rules and visually empty rows for clarity, but
sparingly.  Be consistent with the existing tables.

<li>Give every cell some contents: put a nonbreaking space in a visually
empty cell as a placeholder.
</ul>

<h2><a name="Typical_table"></a>HTML code for typical tables</h2>

<p>
The HTML source code for a typical large table should look like this:

<blockquote><font size="-1"><b>
<pre>&lt;table cellpadding=0 cellspacing=0&gt;
&lt;tr&gt;&lt;th colspan=5 bgcolor="#CCCC00"&gt;&lt;hr&gt;&lt;font size="+1"&gt;Large&nbsp;table&lt;/font&gt;&lt;hr&gt;
&lt;tr&gt;    &lt;th align=left&gt;...
        &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
        &lt;th align=left&gt;...
        &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
        &lt;th align=left&gt;...
&lt;tr&gt;    &lt;td&gt;...
        &lt;td&gt;&amp;nbsp;&amp;nbsp;
        &lt;td&gt;...
        &lt;td&gt;&amp;nbsp;
        &lt;td&gt;...
...
&lt;/table&gt;
</pre></b></font></blockquote>

<p>
The HTML source code for a typical small table should look like this:

<blockquote><font size="-1"><b>
<pre>&lt;table cellpadding=0 cellspacing=0&gt;
&lt;tr&gt;    &lt;td&gt;...
        &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
        &lt;td&gt;...
&lt;tr&gt;    &lt;td&gt;...
        &lt;td&gt;&amp;nbsp;
        &lt;td&gt;...
...
&lt;/table&gt;
</pre></b></font></blockquote>

<hr>

<h1><a name="Unused_tags"></a>Tags not used</h1>

<p>
Don't use optional tags (ones not required by the HTML standard).  These
include <b><tt>&lt;/dd&gt;</tt></b>, <b><tt>&lt;/dt&gt;</tt></b>,
<b><tt>&lt;/li&gt;</tt></b>, <b><tt>&lt;/p&gt;</tt></b>,
<b><tt>&lt;/tr&gt;</tt></b>, <b><tt>&lt;/th&gt;</tt></b>, and
<b><tt>&lt;/td&gt;</tt></b>.

<hr>

<h1><a name="New_document"></a>Creating a new document</h1>

<h2><a name="File_name"></a>Name the new document in 8+3 format</h2>

<p>
If you create a new Ghostscript HTML document, choose for it a name in 8+3
format for cross-platform compabitility:

<blockquote>
<b><em>Name</em></b><b><tt>.htm</tt></b>
</blockquote>

<p>
where "<b><em>Name</em></b>" is no more than eight characters.

<p>
Begin the new file name with an upper-case letter like the existing names,
which are in mixed case beginning with upper-case letters.  Use spelling,
not case, to distinguish between names: that is, don't create a new file
whose name differs from an existing one only by the difference between
upper and lower case, because some platforms can't store two such files.

<h2><a name="Plagiarize"></a>Use an existing document as a model</h2>

<p>
To create an entirely new Ghostscript document, plagiarize this one for the
<a href="#Structuring_comments">structuring comments</a> and other useful
parts.  Then, using the <a href="#Structuring_comments">structuring
comments</a> as a guide to the sections of the document (in a text editor,
search for "<b><tt>&lt;!--&nbsp;[</tt></b>"):

<ul>
<li>insert your own HTML title and <a href="#Headline">headline</a> (they
should ordinarily be the same text) in place of the old ones;

<li>insert your own RCS <b><tt>$Id</tt></b> in place of the old one in the
<a href="#Structure_head">HTML header</a>;

<li>delete the old entries in the <a href="#Table_of_contents">table of
contents</a>;

<li>keep the hint paragraph;

<li>delete the entire contents section between the structuring comments;
and

<li>in the trailer, update the version number and date.
</ul>

<p>
You now have a template document ready for new contents.

<h2><a name="Readme_material"></a>Write new references to go in <b><tt>Readme.htm</tt></b></h2>

<p>
Write material to go in <a href="Readme.htm"><b><tt>Readme.htm</tt></b></a>
that describes the new document, and links to it from two sections:

<ul>
<li>the <a href="Readme.htm#Theme_roadmap">thematic section</a> and

<li>the descriptions of documentation
<a href="Readme.htm#Ordered_roadmap">arranged by file name</a>.
</ul>

<h2><a name="New_doc_other"></a>Other considerations</h2>

<p>
Follow the other guidelines here, including which elements of the
document should go in which section according to the structuring comments,
and <a href="#Headers">anchoring every <b><tt>&lt;Hn&gt;</tt></b>
header</a>.  As you create text and headers, you will want to rebuild the
<a href="#Table_of_contents">table of contents</a> from the headers
occasionally.

<p>
Pete Kaiser &lt;<a href="mailto:kaiser@acm.org">kaiser@acm.org</a>&gt;
wrote a package of GNU emacs functions specifically to handle Ghostscript
HTML documentation, including functions to build a table of contents from
headers in an HTML document, and to build and maintain tables and
other structures built along the guidelines in this document.

<hr>

<h1><a name="Miscellany"></a>Miscellany</h1>

<p>
Use <b><tt>&lt;&gt;</tt></b> to bracket links to visible email addresses
(<b><tt>mailto</tt></b>) in running text.  This makes it easy for a user to
cut and paste the entire name and address into another document or mailer,
for instance

<blockquote>
Free Software Foundation &lt;<a href="mailto:gnu@gnu.org">gnu@gnu.org</a>&gt;
</blockquote>

<p>
For exponentiation use "<b><tt>^</tt></b>" (not "**" or "exp()") plus
writing the exponent as a superscript in <b><tt>&lt;small&gt;</tt></b>
size:

<blockquote>
Something<b><tt>^&lt;sup&gt;</tt></b><b><tt>&lt;small&gt;</tt></b>exponent<b><tt>&lt;/small&gt;&lt;/sup&gt;</tt></b>.
</blockquote>

<p>
to look like this:

<blockquote>
Something<b><tt>^</tt></b><sup><small>exponent</small></sup>
</blockquote>

<p>
This is intended for readability both in a browser and as plain text.

<!-- [2.0 end contents] ---------------------------------------------------- -->

<!-- [3.0 begin visible trailer] ------------------------------------------- -->
<hr>

<font size=2>

<p>Copyright &copy; 1996, 1997, 1998 Aladdin Enterprises.  All rights reserved.

<p>This file is part of Aladdin Ghostscript.  See the
<a href="Public.htm">Aladdin Free Public License</a> (the "License") for
full details of the terms of using, copying, modifying, and redistributing
Aladdin Ghostscript.

<p>
Ghostscript version 5.50, 16 September 1998

</font>

<!-- [3.0 end visible trailer] --------------------------------------------- -->

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -