Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 1efa0e430d87d29888f7bec1d7cd13be > files > 33

linuxdoc-tools-0.9.66-9.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.66">
 <TITLE>LinuxDoc-Tools User's Guide: Formatting SGML Documents</TITLE>
 <LINK HREF="guide-5.html" REL=next>
 <LINK HREF="guide-3.html" REL=previous>
 <LINK HREF="guide.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="guide-5.html"><IMG SRC="next.png" ALT="Next"></A>
<A HREF="guide-3.html"><IMG SRC="prev.png" ALT="Previous"></A>
<A HREF="guide.html#toc4"><IMG SRC="toc.png" ALT="Contents"></A>
<HR>
<H2><A NAME="s4">4.</A> <A HREF="guide.html#toc4">Formatting SGML Documents</A></H2>

<P>Let's say you have the SGML document <CODE>foo.sgml</CODE>, which you want to format.
Here is a general overview of formatting the document for different output.
For a complete list of options, consult the man pages.</P>

<H2><A NAME="ss4.1">4.1</A> <A HREF="guide.html#toc4.1">Checking SGML Syntax</A>
</H2>

<P>If you just want to capture your errors from the SGML conversion,
use the ``<CODE>linuxdoc -B check</CODE>''.  For example.</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B check foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>If you see no output from this check run other than the
``Processing...'' message, that's good.  It means there were no errors.</P>

<H2><A NAME="ss4.2">4.2</A> <A HREF="guide.html#toc4.2">Creating Plain Text Output</A>
</H2>

<P>If you want to produce plain text, use the command:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B txt foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>You can also create groff source for man pages, which can be formatted with
<CODE>groff -man</CODE>.  To do this, do the following:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B txt --man foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H2><A NAME="ss4.3">4.3</A> <A HREF="guide.html#toc4.3">Creating LaTeX, DVI, PostScript or PDF Output </A>
</H2>

<P>To create a LaTeX documents from the SGML source file, simply run:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B latex foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>

<P>If you want to produce PostScript output (via <CODE>dvips</CODE>), use the 
``<CODE>-o</CODE>'' option:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B latex --output=ps foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>

<P>Or you can produce a DVI file:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B latex --output=dvi foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>

<P>Also, you can produce a PDF file:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B latex --output=pdf foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>


<H2><A NAME="ss4.4">4.4</A> <A HREF="guide.html#toc4.4">Creating HTML Output</A>
</H2>

<P>If you want to produce HTML output, do this:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B html --imagebuttons foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>This will produce <CODE>foo.html</CODE>, as well as <CODE>foo-1.html</CODE>,
<CODE>foo-2.html</CODE>, and so on -- one file for each section of the
document.  Run your WWW browser on <CODE>foo.html</CODE>, which is the top
level file.  You must make sure that all of the HTML files generated
from your document are all installed in the directory, as they
reference each other with local URLs.</P>
<P>The ``<CODE>--imagebuttons</CODE>'' option tells html backend driver 
to use graphic arrows as navigation buttons.  The names of these 
icons are ``next.png'', ``prev.png'', and ``toc.png'', and 
the LinuxDoc-Tools system supplies appropriate PNGs in its library
directory.</P>
<P>If you use ``<CODE>linuxdoc -B html</CODE>'' without the ``<CODE>-img</CODE>''
flag, HTML documents will by default have the English labels
``Previous'', ``Next'', and ``Table of Contents'' for navigation.
If you specify one of the accepted language codes in 
a ``<CODE>--language</CODE>'' option, however, the labels will be given
in that language.</P>

<H2><A NAME="ss4.5">4.5</A> <A HREF="guide.html#toc4.5">Creating GNU Info Output</A>
</H2>

<P>If you want to format your file for the GNU info browser, just run the
following command:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B info foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H2><A NAME="ss4.6">4.6</A> <A HREF="guide.html#toc4.6">Creating LyX Output</A>
</H2>

<P>For LyX output, use the the command:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B lyx foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H2><A NAME="ss4.7">4.7</A> <A HREF="guide.html#toc4.7">Creating RTF Output</A>
</H2>

<P>If you want to produce RTF output, run the command:
<BLOCKQUOTE><CODE>
<PRE>
% linuxdoc -B rtf foo.sgml 
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>This will produce <CODE>foo.rtf</CODE>, as well as <CODE>foo-1.rtf</CODE>,
<CODE>foo-2.rtf</CODE>, and so on; one file for each section of the document.</P>

<HR>
<A HREF="guide-5.html"><IMG SRC="next.png" ALT="Next"></A>
<A HREF="guide-3.html"><IMG SRC="prev.png" ALT="Previous"></A>
<A HREF="guide.html#toc4"><IMG SRC="toc.png" ALT="Contents"></A>
</BODY>
</HTML>