"Fossies" - the Fresh Open Source Software Archive

Member "html2sgml-0.3/doc/html2sgml.sgml" (26 Aug 1997, 5483 Bytes) of package /linux/misc/old/html2sgml-0.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!doctype linuxdoc system>
    2 <article>
    3 <title>html2sgml documentation
    4 <author>Peter Antman
    5 <date>Tue Aug 26 12:26:46 MET DST 1997
    6 <sect>README
    7 <p>
    8 html2sgml is a program wich converts html to sgml accroding to linuxdoc.sgml.
    9 With a file in linuxdoc.dtd format you can create nice typset books, well
   10 structured html-documents and so forth. linuxdoc.dtd is the format used in Linux
   11 HOWTOS, for example.
   12 
   13 html2sgml i tuned to work well with Applix HTML, and will convert any
   14 footnotes apearent in the applix word-file that was used to produce the
   15 html.
   16 
   17 To use html2sgml you need Perl. To use the image converting routines you also
   18 need: giftopnm, ppmtopgm and pnmtops
   19 
   20 To do something usefull with the resulting file you also need linuxdoc-sgml or
   21 the follow up sgml-tools <htmlurl url="http://www.xs4all.nl/~cg/sgmltools/"
   22 name="http://www.xs4all.nl/~cg/sgmltools/">.
   23 
   24 <sect1> Getting html2sgml
   25 <p>
   26 The homepage of html2sgml is <htmlurl
   27 url="http://www.abc.se/~m9339/prog/html2sgml.html"
   28 name="http://www.abc.se/~m9339/prog/html2sgml.html">
   29 It is possible to ftp it from <htmlurl
   30 url="ftp://ftp.mc.hik.se/pub/users/mia95anp/html2sgml/"
   31 name="ftp://ftp.mc.hik.se/pub/users/mia95anp/html2sgml/">.
   32 It has also been upploded to <htmlurl url="ftp://ftp.redhat.com"
   33 name="ftp://ftp.redhat.com"> and <htmlurl url="ftp://sunsite.unc.edu/pub/linux/"
   34 name="ftp://sunsite.unc.edu/pub/linux/">.
   35 <sect1> Installation
   36 <p>
   37 To install html2sgml unpack the tarfile and cd into the disrtibution. Type
   38 <verb>
   39 make install
   40 </verb>
   41 It will install the programs html2sgml and mkbook, som files in the specified
   42 documentdirectory, including <em>extras</em> a couple of script that shows some
   43 examples of how you can merg severall html-files into one to use with html2sgml. A
   44 manual page will be installed too.
   45 
   46 Edit the makefile to change where to install and where Perl is on your system.
   47 The default is /usr/bin/perl and prefix = /usr/local
   48 
   49 <sect1> Usage
   50 <p>
   51 See the manual page
   52 
   53 <sect> Manual page
   54 <p>
   55 <sect1> NAME
   56 <p>
   57 html2sgml &mdash convert html to sgml according to linuxdoc.dtd
   58 
   59 <sect1> SYNOPSIS
   60 <p>
   61 html2sgml <em>file.html</em>
   62 
   63 <sect1> DESCRIPTION
   64 <p>
   65 <em>html2sgml</em> is a fileconverter that converts html-files to sgml-files 
   66 according to linuxdoc.dtd. It will ouput a file with the same name
   67 as the specified file but with the ending html changed to sgml.
   68 <p>
   69 It will not work on every html-file because of the
   70 free format of html. It is tuned to work well with html produced from 
   71 <em>Applix HTML-editor</em>. If it finds a applix word file in the same directory
   72 and with the same name as the specified file, it will include any
   73 <em>footnotes</em>
   74 from the aw-file in the produced sgml-file.
   75 <p>
   76 <em>html2sgml</em> will also try to convert all included images of type gif to
   77 postscript.
   78 <p>
   79 By default html2sgml produces a ducument of type <em>article</em>. To change
   80 to <em>book</em> you can use the script <em>mkbook</em>. It also fills
   81 in a dummy name. If there is a title tag in the html-file it will use that
   82 as a title for the sgml-file. To change this you have to hand edit the
   83 sgml-file. 
   84 <p>
   85 If there are more than one <em>H1</em> tag these are used as the toplevel section.
   86 Everything marked H1 will become a <em>sect</em> in sgml, and <em>H2</em>
   87 will become sect1 and so forth. If there is only one ore no H1, H2 will 
   88 be used instead. If there is no H* tags, then the document i broken by 
   89 design :-)
   90 <p>
   91 The resulting sgml-file can then be used by <em>sgml-tools (was linuxdoc-sgml)</em> to produce
   92 various new fileformats, eg latex, info, rtf.
   93 
   94 <sect1> TIPS
   95 <p>
   96 <em>html2sgml</em> should work fine with straight html, that is, when no special
   97 layout formating has been done. For example: it can handle html table tags, but it can
   98 not handle them well if they are used to produce layout.
   99 <p>
  100 The best working thing is to use it with <em>Applix html</em>. You can both
  101 write directly in Applix Word or import document to applix word. Try to use 
  102 predefined styles for your document. You can create heading1, heading2, pre,
  103 quote and so forth. Open Applix HTML and use <em>File->Import words document
  104 </em>. You will then get the chance to tell Applix wich html-tags your defined
  105 styles should match, eg heading1 -> html_h1. Then use <em>Format -> HTML document
  106 setting</em> where you can fill in the title; here you can also fill in the
  107 alternative to export Applix images as gif files. This is good to do because
  108 html2sgml can convert the gif files to ps-files wich can be used when/if
  109 converting to latex.
  110 
  111 <sect1> BUGS AND FEATURES
  112 <p>
  113 <em>html2sgml</em> is still under development and will most probably contain
  114 bugs. It also contain som features. All possible HTML and sgml tags are not
  115 implemented. Unimplemented HTML tags will show up in the sgml file where you
  116 have to hand edit them away. Some tags in sgml are also unsupported. More specific:
  117 no math tags is implemented. You can check the resulting sgml file with the command 
  118 <em>sgmlcheck</em> to discover any leftover tags.
  119 <p>
  120 I have concentrated on making it work in english and in swedish. This means that
  121 there are a lot of characters that probably not will work OK, specialy when
  122 converting Applix footnotes. Look in the source and try to put in the missing
  123 characters if you have any problems. And pleas send the new improved
  124 version to mee.
  125 
  126 <sect1> AUTHOR
  127 <p>
  128 Peter Antman (peter.antman@abc.se)
  129 
  130 <sect1> SEE ALSO
  131 <p>
  132 sgml2latex(1), sgml2html(1), sgml2txt(1), sgml2info(1), sgml2rtf, sgml2lyx(1)
  133 </article>