📄 users_guide.html
字号:
because we leave that up to the HTML client. No nesting is allowed - (see thediscussion on nested styles). No text is deleted. Every paragraph using thismarkup will also generate a level-1 table of contents entry.<pre>"Normal","","\n","\t","\t","<p>\n",1,0,0,0</pre>Thisis the default for normal text. Regular text in HTML has no required start andend-tags. The "\n" in the end-tag field forces a newline in the HTML markup.Since newlines are ignored in HTML (except in <pre>) it's only effect isto make the HTML output more readable. There is no difference between the firsttab and any other. They both translate to a tab mark. Paragraph marks generate"<p>" followed by a newline (just for looks). Text markup (like<b>) is allowed within Normal text. No nesting is allowed - (see thediscussion on nested styles). No text is deleted.<pre>"ul","<ul>\n<li>","</ul>","\t","\t","\n<li>",1,1,0,0</pre>Thisis the entry for unordered lists. This generates a "<ul>\n<li>" atthe start of the list and "</ul>/n" at the end. There is no differencebetween the first tab and any other. They both translate to a tab mark.Paragraph marks generate "<li>" preceded by a newline (just for looks).Text markup (like <b>) is allowed, and this entry may be nested - and itallows others to be nested within it. This allows nested lists. No text isdeleted.<p><pre>"ul-d","<ul>\n<li>","</ul>","\t","\t","\n<li>",1,1,1,0</pre>Thisentry is identical to the previous except that the DeleteCol1 field is set to1. This is used to remove bullets (which really appear in the RTF) because wedon't want to see them in the HTML.<p><h3><a name="RTFToC14">.TTagTable</a></h3>Each entry in the .TTag table describes an HTML text markup. The format is: <p>.TTag<p>"name","starttag","endtag"<dl><dt><b>name</b><dd>A unique name for this entry. These names are referenced in the .PMatchtable.<dt><b>starttag</b><dd>This string will be output once at the beginning of any text for thismarkup.<dt><b>endtag</b><dd>This string will be output once at the end of any text for thismarkup.</dl>Note that unlike the .PTag table, no text markup should appear morethan once. (Of course there is no good reason that it should appear.) If youhave two entries with <b></b> start and end tags, it would bepossible to get HTML of the form <b><b> text</b></b>. Idon't know if this is invalid markup, but it sure is ugly.<p><h3><a name="RTFToC15">.PMatchTable</a></h3>Each entry in the .PMatch correlates a paragraph style name to some entry inthe .PTag table. The format is: <p>.PMatch<p>"Paragraph Style",nesting_level,"PTagName"<dl><dt><b>Paragraph Style</b><dd>The paragraph style name that appears in the RTF input.<dt><b>nesting_level</b><dd>The nesting level. This should be zero except for nested list entries.<dt><b>PTagName</b><dd>The name of the .PTag entry that should be used for paragraphs with thisparagraph style. </dl><p><h4><a name="RTFToC16">Sample.PMatch Entries</a></h4><pre>"heading 1",0,"h1"</pre>Thisis a level 1 heading. Any paragraphs with this paragraph style will be mappedto the entry in the .PTag table named "h1".<pre>"numbered list",0,"ol-d"</pre>Thisis used for numbered lists. Any paragraphs with this paragraph style will bemapped to the entry in the .PTag table named "ol-d". <pre>"numbered list 2",2,"ol-d"</pre>Thisis an entry for a nested paragraph style. The nesting level of two is used toindicate that this paragraph should appear in the HTML nested within two levelsof paragraph markups. The paragraph marked with this style may only appearafter a paragraph style that has a nesting level of 1 or greater.<pre></pre><h3><a name="RTFToC17">.TMatchTable</a></h3>Each entry in the .TMatch table describes processing for text styles. Theformat is: <p>.TMatch<pre>"Font",FontSize,Match,Mask,"TextStyleName"</pre><dl><dt><b>Font</b><dd>The name of a Font, or "" if all fonts match this entry.<dt><b>FontSize</b><dd>The point-size of the font, or 0 if all point sizes match this entry.,<dt><b>Match</b><dd>A bit-mask, where each bit represents a text attribute. These bits arecompared to the attributes of the style being output. They must match for thisentry to be matched. One in a bit position means that the text style is set, azero is not set.<dt><b>Mask</b><dd>A bit-mask, where each bit represents a text attribute. In comparing thestyle of the text being processed, to the Match bit-mask, this field is used toselect the bits that matter. If a zero appears in a bit-position, then thatstyle attribute is ignored (for the purpose of matching this entry.) Only 1bits are used in the above comparision.<dt><b>TextStyleName</b><dd>This is either the name of an entry in the .TTag table indicating the HTMLmarkup to use, or it is one of "_Discard", "_Name", "_HRef", "_Hot", or"_Literal".</dl><pre>The order of bits in the Match and Mask bit-maps are:# v^bDWUHACSOTIB - Bold# v^bDWUHACSOTI - Italic# v^bDWUHACSOT - StrikeThrough# v^bDWUHACSO - Outline# v^bDWUHACS - Shadow# v^bDWUHAC - SmallCaps# v^bDWUHA - AllCaps# v^bDWUH - Hidden# v^bDWU - Underline# v^bDW - Word Underline# v^bD - Dotted Underline# v^b - Double Underline# v^ - SuperScript# v - SubScript</pre><p><h4><a name="RTFToC18">Sample.PTag Entries</a></h4><pre># double-underline/not hidden -> hot text# double-underline/hidden -> href# v^bDWUHACSOTIB,v^bDWUHACSOTIB"",0,00100000000000,00100010000000,"_Hot""",0,00100010000000,00100010000000,"_HRef"</pre>Thefirst entry will match any text formatted with double underline EXCEPT if it ishidden text. This is accomplished by using those two bits to compare (the MASKfield) and having a 1 in the double underline bit and a zero for the hiddentext bit. The second entry will match any text formatted with BOTH doubleunderline and hidden text. Any text that matches the first will be treated asthe hot text of a link. Any text that matches the second will be taken as thehref itself. (The filter requires that the HRef text immediately precede theHot text.) <p><pre># Regular matches - You can have multiple of these active# monospace fonts -> tt"Courier",0,00000000000000,00000000000000,"tt"</pre>Thiswill match any text that uses the Courier font and mark it using the HTML textmarkup appearing in the .TTag table with the entry name "tt".<p><pre># bold -> bold# v^bDWUIACSOTIB,v^bDWUIACSOTIB"",0,00000000000001,00000000000001,"b"</pre>Thiswill match any text that has bold attributes and will mark it using the HTMLtext markup appearing in the .TTag table with the entry name "b". Note thatbold text using the Courier font would match both this entry and the previous.This will yeild markup of the form <b><tt>hi</tt><b>.Note that "b" is the name of an entry in the .TTag table, not the HTML markupthat is used! <p><h2><a name="RTFToC19">AddingParagraph Styles</a></h2>To add a new paragraph style, simply go to the .PMatch table and add an entryto the end. Put the name of the paragraph style (quoted), the nesting level(usually zero) and the name of the .PTag entry that should be used. <h1><a name="RTFToC20">CommandLine Options</a></h1>The syntax of the rtftohtml command is as follows:<pre>rtftohtml [-i] [ -V] [-o filename] [-P extension] [-T] [-G][file]</pre><dl><dt><b>-i</b><dd>Indicates that imbedded graphics should be linked into the main documentusing an IMG tag. The default is to use an HREF style link.<dt><b>-V</b><dd>Prints the current Version to stderr.<dt><b>-o filename</b><dd>Indicates that the output file name should be "filename". If any otherfiles are created (such as for graphics,) the basename of the other files willbe "filename" without ".rtf" if it is present in the name.<dt><b>-P extension</b><dd>Use "extension" as the extension for any links to graphics files. Thedefault for this is "gif".<dt><b>-T</b><dd>Indicates that no table of contents file is to be generated.<dt><b>-G</b><dd>Indicates that no graphics files should be written. The hypertext links tothe graphics files will still be generated. This is a performance feature forwhen you are re-translating a document and the graphics have not changed.<dt><b>"file"</b><dd>The file name to be processed. If no file is given, standard input is used.If standard input is used, the body of the document will be written to standardoutput (unless overridden by the -o option.) If a file name appears, the outputis written to "filename" with ".html" as an extension. (If ".rtf" appears as anextension on the original input file, it is stripped before appending the".html") </dl><h1><a name="RTFToC21">NestedLists</a></h1>Nested lists can be made from an RTF document by using a different style foreach level of indentation. The styles "bullet list 1" "numbered list 2" ...represent different levels of nesting. The only rule for use is that no levelsof nesting are skipped. For example, a "ol 3" paragraph must not appearimmediately after a "Normal" paragraph. It must follow a paragraph with anesting level of 2 or higher. For examples of nesting see <a href="sample_styles.html">the sample style sheet.</a> .rtf<ol><li></ol></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -