# $Id$
#
# >>Copyright::
# Copyright (c) 1992-1996, Ian Clatworthy (ianc@mincom.com).
# You may distribute under the terms specified in the LICENSE file.
#
# >>History::
# -----------------------------------------------------------------------
# Date      Who     Change
# 29-Feb-96 ianc    SDF 2.000
# -----------------------------------------------------------------------
#

H1: Generating outputs

H2: Overview

The {{CMD:sdf}} command is used to convert SDF to other formats.
The general syntax is:

E:   sdf [options] file ...

If an extension is not given (and a file is not found with that name),
an extension of {{sdf}} is assumed.

H2: Generating HTML

To convert {{FILE:mydoc.sdf}} to HTML, the command is:

E:   sdf -2html mydoc

This creates a file called {{FILE:mydoc.html}}.

H2: Generating a set of HTML topics

To convert {{FILE:mydoc.sdf}} to a set of HTML topics, the command is:

E:   sdf -2topics mydoc

This creates the following files:

* {{mydoc.html}} - the table of contents
* {{mydoc_1.html}} - the first topic
* {{mydoc_2.html}} - the second topic.

H2: Generating PostScript on Unix

To convert {{FILE:mydoc.sdf}} to PostScript on Unix, the command is:

E:   sdf -2ps mydoc

This creates a file called {{FILE:mydoc.ps}} by:

^ Generating a MIF (Maker Interchange Format) file called {{mydoc.out}}.
+ Using the {{fmbatch}} program to convert this file to {{mydoc.out.ps}}.
+ Renaming {{mydoc.out.ps}} to {{mydoc.ps}}.
+ Deleting {{mydoc.out}}.

H2: Generating PostScript on Windows

To convert {{FILE:mydoc.sdf}} to PostScript on Windows, the command is:

E:   sdf -2mif mydoc

This creates a file called {{FILE:mydoc.mif}} which can be
opened in FrameMaker and printed to a PostScript file.

H2: Generating PDF

To generate a PDF file, the steps are:

^ Generate a PostScript document (see above)
+ Open the PostScript document using {{Adobe Distiller}}.
+ Generate the PDF file.

Note: The PostScript document generated by SDF includes the
information needed by the PDF distiller to generate a table
of contents.

H2: Generating plain text

To convert {{FILE:mydoc.sdf}} to plain text, the command is:

E:   sdf -2txt mydoc

This creates a file called {{FILE:mydoc.txt}}.

H2: Generating Windows help

To convert {{FILE:mydoc.sdf}} to Windows help, the command is:

E:   sdf -2hlp mydoc

This creates the following files:

* {{mydoc.hpj}} - a help project file
* {{mydoc.rtf}} - an RTF document with embedded help codes

These need to be compiled using a help compiler (e.g. hcp.exe).
For example:

E:   hcp mydoc

This creates a file called {{mydoc.hlp}} (provided no errors are
encountered).
