📄 htmstyle.htm
字号:
<html>
<head>
<title>HTML coding and style guidelines for Ghostscript documentation</title>
<!-- $Id: Htmstyle.htm $ -->
</head>
<body>
<!-- [1.0 begin visible header] -------------------------------------------- -->
<!-- [1.1 begin headline] -------------------------------------------------- -->
<p><table width="100%" border="0">
<tr><th align="center" bgcolor="#CCCC00"><font size=6>
HTML coding and style guidelines for Ghostscript documentation
</font>
</table>
<!-- [1.1 end headline] ---------------------------------------------------- -->
<!-- [1.2 begin table of contents] ----------------------------------------- -->
<h2>Table of contents</h2>
<blockquote><ul>
<li><a href="#Introduction">Introduction</a>
<li><a href="#Appearance">Appearance and contents</a>
<ul>
<li><a href="#Page_structure">Page structure</a>
<li><a href="#Links_outside">Links to outside the Ghostscript documentation</a>
<li><a href="#Images">Images and graphics</a>
<li><a href="#index.html"><b><tt>index.html</tt></b></a>
</ul>
<li><a href="#Large_structure">HTML large structure</a>
<ul>
<li><a href="#HTML_head">HTML <b><tt><head></tt></b></a>
<li><a href="#HTML_body">HTML <b><tt><body></tt></b></a>
</ul>
<li><a href="#Inner_structure">HTML inner structure</a>
<ul>
<li><a href="#Structuring_comments">Structuring comments</a>
<li><a href="#Headers">Headers: <b><tt><Hn></tt></b></a>
<li><a href="#Anchors">Anchors: <b><tt><a name="..."></tt></b></a>
</ul>
<li><a href="#Text">The presentation of text</a>
<ul>
<li><a href="#Text_sections">Sections of text</a>
<ul>
<li><a href="#Paragraphs">Paragraphs: <b><tt><p></tt></b></a>
<li><a href="#Blockquote">Indented paragraphs: <b><tt><blockquote></tt></b></a>
<li><a href="#Line_breaks">Explicit line breaks: <b><tt><br></tt></b></a>
<li><a href="#Preformatted_text">Preformatted text: <b><tt><pre></tt></b></a>
</ul>
<li><a href="#Use_of_fonts">The use of different font faces</a>
</ul>
<li><a href="#Lists">Lists: <b><tt><ul>, <ol>, <dl></tt></b></a>
<li><a href="#Tables">Tables: <b><tt><table></tt></b></a>
<ul>
<li><a href="#Readability">Readability for the user and the HTML writer</a>
<li><a href="#Table_guidelines">Specific guidelines for coding tables</a>
<li><a href="#Typical_table">HTML code for typical tables</a>
</ul>
<li><a href="#Unused_tags">Tags not used</a>
<li><a href="#New_document">Creating a new document</a>
<ul>
<li><a href="#File_name">Name the new document in 8+3 format</a>
<li><a href="#Plagiarize">Use an existing document as a model</a>
<li><a href="#Readme_material">Write new references to go in <b><tt>Readme.htm</tt></b></a>
<li><a href="#New_doc_other">Other considerations</a>
</ul>
<li><a href="#Miscellany">Miscellany</a>
</ul></blockquote>
<!-- [1.2 end table of contents] ------------------------------------------- -->
<!-- [1.3 begin hint] ------------------------------------------------------ -->
<p>For other information, see the <a href="Readme.htm">Ghostscript
overview</a>.
<!-- [1.3 end hint] -------------------------------------------------------- -->
<hr>
<!-- [1.0 end visible header] ---------------------------------------------- -->
<!-- [2.0 begin contents] -------------------------------------------------- -->
<h1><a name="Introduction"></a>Introduction</h1>
<p>
The most important intention in casting Ghostscript's documentation into
Hypertext Markup Language (HTML) from simple text form is to improve its
usefulness greatly to those who use, install, and build Ghostscript:
everything else is details. The wide spread of World Wide Web browsers now
makes it possible to distribute documents which are not only readable as
text, but also richly cross-linked as hypertext. Using hypertext through a
browser can reduce the effort required to find and use the information
people often need in order to use Ghostscript.
<p>
The remainder of this document expresses the guidelines used to create the
HTML form of the Ghostscript documentation. The guidelines are intended to
encourage
<ul>
<li>documents that are easy to read and understand in all of the most-used
forms: on screen with a browser, printed by a browser, or as plain text;
<li>correct HTML that conforms to prevailing standards;
<li>consistent HTML coding among all Ghostscript's documents; and
<li>HTML documents that are as simple as possible in light of their
contents; free of difficult, little-used, or proprietary constructs; and
easy to understand and modify.
</ul>
<p>
Here are those guidelines.
<hr>
<h1><a name="Appearance"></a>Appearance and contents</h1>
<p>
What the user sees browsing the documentation, and what a document
developer or editor sees working with it, are different. This section is
about what the user sees.
<h2><a name="Page_structure"></a>Page structure</h2>
<p>
A Ghostscript document in HTML form should consist of
<ol>
<li>a visual header containing
<ol type=a>
<li>a conspicuous highlighted headline;
<li>a table of contents;
<li>"hints": references to other useful documents, always including
<a href="Readme.htm">Readme.htm</a>;
</ol>
<li>the substantive contents;
<li>a visual trailer consisting entirely of
<ol type=a>
<li>standard copyright and licensing text;
<li>the Ghostscript version number; and
<li>the date when the document was last modified.
</ol>
</ol>
<p>
This document is an example of this standard visible structure. Also see
below about "<a href="#Structuring_comments">Structuring comments</a>" in
HTML source code.
<p>
Where it makes sense to modify the standard structure to make the document
more usable, do that. See
<a href="Readme.htm"><b><tt>Readme.htm</tt></b></a> for an example: the
introductory material at the beginning of the visible header, before the
table of contents.
<h2><a name="Links_outside"></a>Links to outside the Ghostscript documentation</h2>
<p>
Avoid gratuitous commercial links; for instance, link the title of a book
to its publisher, not to one particular on-line bookseller. See
<a href="Language.htm#Capabilities"><b><tt>Language.htm</tt></b></a> for an
example, the reference to the <em>PostScript Language Reference
Manual</em>.
<p>
Similarly, where you have a choice, refer to free software rather than
commercial products. See
<a href="Make.htm#Third-party_libraries">Make.htm</a> for an example, the
reference to <a href="Make.htm#Third-party_libraries">InfoZip
<b><tt>unzip</tt></b></a> (where many commercial products provide similar
functions).
<h2><a name="Images"></a>Images and graphics</h2>
<p>
Use no graphics or images. The documents are text-only, so nothing is lost
when a document is converted into ASCII text. This is an explicit initial
design goal of the HTML documentation.
<h2><a name="index.html"></a><b><tt>index.html</tt></b></h2>
<p>
<b><tt>index.html</tt></b> is not a part of the visible Ghostscript
documentation itself, but when it is placed with all the
<b><tt>*.htm</tt></b> files in a directory and a browser refers to the
directory name alone, most servers are configured to deliver a file named
<b><tt>index.html</tt></b> by default. This one does nothing except
immediately to open the introductory Ghostscript document
<a href="index.html"><b><tt>Readme.htm</tt></b></a>. This is intended to
make life easier for both webmasters and users.
<hr>
<h1><a name="Large_structure"></a>HTML large structure</h1>
<h2><a name="HTML_head"></a>HTML <b><tt><head></tt></b></h2>
<p>
Besides the essential HTML structure elements, Ghostscript HTML document's
<b><tt><head></tt></b> consists of three elements in this order:
<ol>
<li>A <b><tt><title></tt></b>, usually the same text as the
<a href="#Headline">headline</a>
<li>An RCS identification line giving the name of the file in an HTML
comment:
<blockquote>
<b><tt><!-- $Id: </tt></b><b><em>{file name}</em></b><b><tt>.htm $ --></tt></b>
</blockquote>
<li>For documents converted from another form, an HTML comment line giving
the name of the original file before it was edited and converted to HTML:
<blockquote>
<b><tt><!-- Originally: </tt></b><b><em>{file name}</em></b><b><tt> --></tt></b>
</blockquote>
</ol>
<h2><a name="HTML_body"></a>HTML <b><tt><body></tt></b></h2>
<p>
A Ghostscript HTML document's <b><tt><body></tt></b> consists of five
elements in this order:
<ol>
<li><a name="Headline"></a>The <b><em>headline</em></b> is conspicuous text
at the top of the page, usually the same as the
<a href="#Structure_head"><b><tt><title></tt></b></a> text. It is
always in a table whose purpose is to provide a colored background using
<b><tt>bgcolor</tt></b>, going the full width of the page:
<blockquote>
<b><tt><p><table width="100%" border="0"><br>
<tr><th align="center" bgcolor="#CCCC00"><font size=6></tt></b><br>
<b><em>{Text}</em></b><br>
<b><tt></font><br>
</table></tt></b>
</blockquote>
<li><a name="Table_of_contents"></a>
The <b><em>table of contents</em></b> consists of nested unordered
lists <b><tt><ul></tt></b>, in most documents assembled strictly from
the <b><tt><Hn></tt></b> headers. The levels of nesting in the table
of contents correspond to the level numbers of the headers.
<li>The <b><em>hint</em></b> is a short section suggesting where to look
for other related information. With very few exceptions this always
includes a reference and link to
<a href="Readme.htm"><b><tt>Readme.htm</tt></b></a>, but may include other
suggestions and references.
<li>The substance of the document.
<li>The <b><em>trailer</em></b> contains, in a small font size,
<ol type=a>
<li>the <b><em>copyright notice</em></b> and other legal boilerplate text
<li>the <b><em>version number</em></b> of Ghostscript and the
<b><em>date</em></b> when the file was last modified.
</ol>
</ol>
<p>
This document for an example of that structure.
<hr>
<h1><a name="Inner_structure"></a>HTML inner structure</h1>
<h2><a name="Structuring_comments"></a>Structuring comments</h2>
<p>
Special comment lines within the HTML files mark internally the visible
sections of the document. They make it easy for both document developers
and programs to handle the HTML code. Each of these comments is exactly 80
characters wide, and each important section of a document is bracketed by a
unique beginning and ending pair. View the source code of this document
for an example of these structuring comments. The sections they mark are:
<ol>
<li>the <b><em>visible header</em></b>
<ol type=a>
<li>the <a href="#Headline"><b><em>headline</em></b></a>
<li>the <b><em>table of contents</em></b>
<li>the "see also" <b><em>hints</em></b>
</ol>
<li>the <b><em>body</em></b>
<li>the <b><em>trailer</em></b>
</ol>
<h2><a name="Headers"></a>Headers: <b><tt><Hn></tt></b></h2>
<p>
Give a header <b><tt><Hn></tt></b> this structure:
<blockquote><b><tt>
<h1><a name="Head_anchor"></a>Header text</h1>
</tt></b></blockquote>
<p>
That is, the opening header tag, an anchor, the header text, and the
closing tag.
<p>
Represent every header in the table of contents, linked
<b><tt><a href="#..."></tt></b>...<b><tt></a></tt></b> to
the header. Of course, the headers are also convenient linkage points for
references from other documents.
<h2><a name="Anchors"></a>Anchors: <b><tt><a name="..."></tt></b></h2>
<p>
Give an anchor a name consisting only of letters, digits, dots
("<b><tt>.</tt></b>"), hyphens ("<b><tt>-</tt></b>"), and underscores
("<b><tt>_</tt></b>"), but not white space or other punctuation marks.
This ensures that the name is readable and that an entire name always
appears on a single line of HTML source both where it's defined and
everywhere it's used, making it simple to find anchors by text search in
the HTML source code.
<p>
Choose anchor names to be readable and meaningful in the HTML source code.
For instance:
<blockquote><table cellpadding=0 cellspacing=0>
<tr valign=bottom>
<th align=left>Use this form
<td>
<th align=left>... <b><em>NOT</em></b> this form
<tr> <td colspan=3><hr>
<tr valign=top> <td><b><tt><a name="Image_formats"></a></tt></b>
<td>
<td><b><tt><a name="Imgfts"></a></tt></b>
</table></blockquote>
<p>
Anchors should be empty, that is
<blockquote><table cellpadding=0 cellspacing=0>
<tr valign=bottom>
<th align=left>Use this form
<td>
<th align=left>... <b><em>NOT</em></b> this form
<tr> <td colspan=3><hr>
<tr valign=top> <td><b><tt><a name="..."></a></tt></b>
<td>
<td><b><tt><a name="..."></tt></b><b><em>anything</em></b><b><tt></a></tt></b>
</table></blockquote>
<p>
<a name="Anchor_placement"></a>Place an anchor within a paragraph (indented
paragraph, list item, head, etc.) and at its beginning.
<blockquote><table cellpadding=0 cellspacing=0>
<tr valign=bottom>
<th align=left>Use this form
<td>
<th align=left>... <b><em>NOT</em></b> this form
<tr> <td colspan=3><hr>
<tr valign=top> <td><b><tt><p><a name="..."></a></tt></b>
<td>
<td><b><tt><p></tt></b><b><em> ...text... </em></b><b><tt><a name="..."></a></tt></b>
<tr valign=top> <td><b><tt><p><a name="..."></a></tt></b>
<td>
<td><b><tt><a name="..."></a><p></tt></b>
<tr valign=top> <td><b><tt><li><a name="..."></a></tt></b>
<td>
<td><b><tt><a name="..."></a><li></tt></b>
</table></blockquote>
<hr>
<h1><a name="Text"></a>The presentation of text</h1>
<h2><a name="Text_sections"></a>Sections of text</h2>
<h3><a name="Paragraphs"></a>Paragraphs: <b><tt><p></tt></b></h3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -