pkg://html2sgml-0.3-1.i386.rpm:11900/
usr/
doc/
html2sgml-0.3/html2sgml.txt
info downloads
html2sgml documentation
Peter Antman
Tue Aug 26 12:26:46 MET DST 1997
11.. RREEAADDMMEE
html2sgml is a program wich converts html to sgml accroding to
linuxdoc.sgml. With a file in linuxdoc.dtd format you can create nice
typset books, well structured html-documents and so forth.
linuxdoc.dtd is the format used in Linux HOWTOS, for example.
html2sgml i tuned to work well with Applix HTML, and will convert any
footnotes apearent in the applix word-file that was used to produce
the html.
To use html2sgml you need Perl. To use the image converting routines
you also need: giftopnm, ppmtopgm and pnmtops
To do something usefull with the resulting file you also need
linuxdoc-sgml or the follow up sgml-tools
http://www.xs4all.nl/~cg/sgmltools/.
11..11.. GGeettttiinngg hhttmmll22ssggmmll
The homepage of html2sgml is
http://www.abc.se/~m9339/prog/html2sgml.html It is possible to ftp it
from ftp://ftp.mc.hik.se/pub/users/mia95anp/html2sgml/. It has also
been upploded to ftp://ftp.redhat.com and
ftp://sunsite.unc.edu/pub/linux/.
11..22.. IInnssttaallllaattiioonn
To install html2sgml unpack the tarfile and cd into the disrtibution.
Type
make install
It will install the programs html2sgml and mkbook, som files in the
specified documentdirectory, including _e_x_t_r_a_s a couple of script that
shows some examples of how you can merg severall html-files into one
to use with html2sgml. A manual page will be installed too.
Edit the makefile to change where to install and where Perl is on your
system. The default is /usr/bin/perl and prefix = /usr/local
11..33.. UUssaaggee
See the manual page
22.. MMaannuuaall ppaaggee
22..11.. NNAAMMEE
html2sgml -- convert html to sgml according to linuxdoc.dtd
22..22.. SSYYNNOOPPSSIISS
html2sgml _f_i_l_e_._h_t_m_l
22..33.. DDEESSCCRRIIPPTTIIOONN
_h_t_m_l_2_s_g_m_l is a fileconverter that converts html-files to sgml-files
according to linuxdoc.dtd. It will ouput a file with the same name as
the specified file but with the ending html changed to sgml.
It will not work on every html-file because of the free format of
html. It is tuned to work well with html produced from _A_p_p_l_i_x _H_T_M_L_-
_e_d_i_t_o_r. If it finds a applix word file in the same directory and with
the same name as the specified file, it will include any _f_o_o_t_n_o_t_e_s
from the aw-file in the produced sgml-file.
_h_t_m_l_2_s_g_m_l will also try to convert all included images of type gif to
postscript.
By default html2sgml produces a ducument of type _a_r_t_i_c_l_e. To change to
_b_o_o_k you can use the script _m_k_b_o_o_k. It also fills in a dummy name. If
there is a title tag in the html-file it will use that as a title for
the sgml-file. To change this you have to hand edit the sgml-file.
If there are more than one _H_1 tag these are used as the toplevel
section. Everything marked H1 will become a _s_e_c_t in sgml, and _H_2 will
become sect1 and so forth. If there is only one ore no H1, H2 will be
used instead. If there is no H* tags, then the document i broken by
design :-)
The resulting sgml-file can then be used by _s_g_m_l_-_t_o_o_l_s _(_w_a_s _l_i_n_u_x_d_o_c_-
_s_g_m_l_) to produce various new fileformats, eg latex, info, rtf.
22..44.. TTIIPPSS
_h_t_m_l_2_s_g_m_l should work fine with straight html, that is, when no
special layout formating has been done. For example: it can handle
html table tags, but it can not handle them well if they are used to
produce layout.
The best working thing is to use it with _A_p_p_l_i_x _h_t_m_l. You can both
write directly in Applix Word or import document to applix word. Try
to use predefined styles for your document. You can create heading1,
heading2, pre, quote and so forth. Open Applix HTML and use
_F_i_l_e_-_>_I_m_p_o_r_t _w_o_r_d_s _d_o_c_u_m_e_n_t. You will then get the chance to tell
Applix wich html-tags your defined styles should match, eg heading1 ->
html_h1. Then use _F_o_r_m_a_t _-_> _H_T_M_L _d_o_c_u_m_e_n_t _s_e_t_t_i_n_g where you can fill
in the title; here you can also fill in the alternative to export
Applix images as gif files. This is good to do because html2sgml can
convert the gif files to ps-files wich can be used when/if converting
to latex.
22..55.. BBUUGGSS AANNDD FFEEAATTUURREESS
_h_t_m_l_2_s_g_m_l is still under development and will most probably contain
bugs. It also contain som features. All possible HTML and sgml tags
are not implemented. Unimplemented HTML tags will show up in the sgml
file where you have to hand edit them away. Some tags in sgml are also
unsupported. More specific: no math tags is implemented. You can check
the resulting sgml file with the command _s_g_m_l_c_h_e_c_k to discover any
leftover tags.
I have concentrated on making it work in english and in swedish. This
means that there are a lot of characters that probably not will work
OK, specialy when converting Applix footnotes. Look in the source and
try to put in the missing characters if you have any problems. And
pleas send the new improved version to mee.
22..66.. AAUUTTHHOORR
Peter Antman (peter.antman@abc.se)
22..77.. SSEEEE AALLSSOO
sgml2latex(1), sgml2html(1), sgml2txt(1), sgml2info(1), sgml2rtf,
sgml2lyx(1)