# This is a -*- Tcl -*- script.
#
# translate.tcl --- Document Translation
#
# Copyright (C) 1998 Stefan Hornburg
#
# Author: Stefan Hornburg <racke@gundel.han.de>
# Maintainer: Stefan Hornburg <racke@gundel.han.de>
# Version: 0.0.6
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
# 
# This file is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this file; see the file COPYING.  If not, write to the Free
# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

manual "Document Translation"
stamp "Mon Dec 21 21:50:29 1998 MET"
makeindex cp

include common.tcl

text "InfoPrism provides the following translators: "
dl {
	dt [code [withindex cp sgml2html]]
	dd "Generates [withindex cp HTML] documents
	from SGML source files or scripts."
	dt [code [withindex cp sgml2texi]]
	dd "Generates [withindex cp Texinfo] documents
	from SGML source files or scripts. The output may be passed to
	[code [withindex cp makeinfo]] to produce GNU
	[code [withindex cp Info]] files."
	dt [code [withindex cp sgml2plain]]
	dd "Generates [withindex cp {plain text}] documents from SGML source
	files or scripts."
	dt [code [withindex cp sgml2latex]]
	dd "Generates [withindex cp LaTeX] documents
	from SGML source files or scripts."
}
text "The document to be translated can be passed on the command line,
or in case of SGML scripts, provided by the
[withindex cp [code --script] option]:"
example {
% sgml2html hello.sgml
% sgml2html --script=hello.tcl
}
h2 "Common Options"
dl {
	dt "[withindex cp [code -o]] [var FILE],
	[withindex cp [code --output-file]] [var FILE]"
	dd "Use [var FILE] as output file."
	dt "[withindex cp [code -f]] [var FILE],
	[withindex cp [code --rc-file]] [var FILE]"
	dd "Read configuration file [var FILE]."
	dt "[withindex cp [code -l]] [var FILE],
	[withindex cp [code --log-file]] [var FILE]"
	dd "Use [var FILE] as log file."
	dt "[withindex cp [code -h]], [withindex cp [code --help]]"
	dd "Print usage information and exit."
#	dt "[withindex cp [code --lang]] [var LANG]"
#	dd "Selects [var LANG] as document [withindex cp language]."
}
h3 "SGML Options"
dl {
	dt "[withindex cp [code --catalog]] [var FILE]"
	dd "[index cp catalog][index cp SGML catalog]
	Use [var FILE] as SGML catalog."
	dt "[withindex cp [code --dcl-file]] [var FILE]"
	dd "[index cp declaration][index cp SGML declaration]
	Use [var FILE] as SGML declaration."
	dt "[withindex cp [code -s]] [var COMMAND]"
	dd "[index cp parser][index cp SGML parser]
	Use [var COMMAND] as SGML parser."
}
h2 "Options for the SGML-to-HTML translator"
index cp [code sgml2html] options
index cp options [code sgml2html]
dl {
	dt "[withindex cp [code --body]]"
	dd "[index cp header][index cp footer]Discard header and footer."
}
h3 "Debugging InfoPrism"
index cp debug
dl {
	dt [withindex cp [code --dump]]
	dd "Prints [withindex cp {internal representation}] of the SGML document
	after generating it."
	dt "[withindex cp [code -d]] [var FLAGS]],
	[withindex cp [code --debug]] [var FLAGS]]"
	ddwdl "Enable more verbose logging for several events, separated by
	semicolons: " {
		dt [code feature result]
		dd "Results of feature scripts are logged."
		dt [code nodetrans result]
		dd "Translation results for document nodes are logged."
	}
}

h2 "Configuration"
text "All translators read the following configuration files: "
ol {
	li "The default configuration file"
	li "The file [withindex cp [code .infimsrc]] in the user's
	[withindex cp {home directory}] if it exists."
	li "The configuration file given by the [code --rcfile] command line
	option."
}
text "Each [withindex cp instruction] in the configuration file consists of
a list of keys and the value. Enclose the value into braces if it contains
whitespace: "
example {
# Sample configuration file for InfoPrism

# Modifies the extension for HTML output
ext html htm
# Modifies the separator for navigation bars
html navbarsep " * "
}

h3 "Common Configuration Options"
dl {
	dt [code [withindex cp [label FILLCOL fill_column]]]
	dd "Column beyond which automatic [withindex cp line-wrapping] should
	happen. Default is 76."
}

h3 "HTML Translator"
text "Configuration options for [code sgml2html] start with [code html] as
first key."
dl {
	dt [code [withindex cp navbarsep]]
	dd "[index cp separator {navigation bar}]Modifies navigation bar
	separator. Default is \"[code { - }]\"." 
}
h3 "Texinfo Translator"
text "Configuration options for [code sgml2texi] start with [code texinfo]
as first key."
dl {
	dt [code [withindex cp indexsubsep]]
	dd "[index cp separator subindices]Modifies separator for subindices.
	Default is \"[code {, }]\"."
}
h3 "Plain Translator"
text "Configuration options for [code sgml2plain] start with [code plain] as
first key."
dl {
	dt [code [withindex cp secchars]]
	dd "Describes characters used to compose the [withindex cp underline]
	from."
	dt [code [withindex cp secstyle]]
	ddwdl "[index cp style {section headings}]
	[index cp {section headings} style]
	Specifies other style for section headings." {
		dt [code [withindex cp caps]]
		dd "Capitalize titles."
	}
}
text "The defaults are: "
pre {
	plain secchars **=-.
}
h2 "Index"
insertindex cp

