dTS .ds TS dTE .ds TE
S2LATEX(1-local) manual page
Table of Contents
s2latex - convert Scribe input files to TeX/Latex
input files
s2latex [ -k ] [ -q ] [ -s symfile ] file ...
S2latex reads the files and produces a Latex input file on the
standard output. If no files are given, s2latex reads standard input.
- -k
- outputs every unrecognized Scribe keyword to stderr. Default translation
rules are applied to unrecognized keywords (i.e., @keyword(...) -> \keyword{...} and
@begin(env) -> \begin{env}). This option can be used to call your attention
to keywords that should use other translation rules.
- -q
- changes the processing
of double quotes. Normally, double quotes are converted to directed single
quotes (i.e., "..." -> `...'). This flag leaves the double quotes (they are printed
from the "tt" font).
- -s
- gives the name of a file containing additional or
replacement translation rules for Scribe keywords or environments. Each
line of this file should have the format:
word rule replacement
word is the keyword or environment name (a keyword name is distinguished
by a leading "@"). This name should be given in lower case . Rule is the
name of the translation rule (see below). It can be in either case and
only the first character is significant. Replacement is replacement text
for the keyword. It must be given even if not required by the rule.
S2latex
has 9 translation rules (read "->" as "is converted to"):
- replace:
- @kw(...)
-> \rep{...}
@begin(env)...@end(env) -> \begin{rep}...\end{rep}
I.e., the keyword or environment name is simply replaced by a new name.
- delete:
- @kw(...) -> ...
@begin(env)...@end(env) -> ...
I.e., the keyword or environment is deleted but the enclosed text is left.
- font:
- @kw(...) -> {\rep ...}
@begin(env)...@end(env) -> {\rep ...}
This is the appropriate translation for a TeX font; i.e., @i(xyz) to {\it
xyz}.
- environment:
- @kw(...) -> \begin{rep}...\end{rep}
@begin(env)...@end(env) -> \rep{...}
I.e., a keyword is converted to an environment or an environment to a keyword.
- itemize:
- @kw(...) -> \begin{rep}...\end{rep}
@begin(env)...@end(env) -> \begin{rep}...\end{rep}
In addition, the start of each new paragraph in the enclosed text will
be preceded by a "\item ".
- tag:
- (aka, "description"). Like itemize but the
start of each new paragraph is preceded by "\item[" and the first tab in
the paragraph is replaced by "] ". I.e., this is the Latex "description" environment.
- comment:
- The keyword or environment and all of the text enclosed are output
preceded by "%" (the TeX comment character). I.e., this "comments out" a
keyword or environment.
- alignment:
- @kw(...) -> \begin{rep}...\end{rep} @begin(env)...@end(env)
-> \begin{rep}...\end{rep}
Each Scribe tab in the enclosed text is replaced with " & " (the TeX alignment
tab) and each newline is preceded by "\\".
- nop:
- @kw(...) -> \rep{...}
Like replace but has the side effect of saying this keyword generates no
text. (This is used when s2latex is trying to identify the "tag" portion
of a paragraph in a @description environment).
S2latex starts with the following
translation rules. The user can augment or redefine any of these rules
via the '-s' command line option.
w0] .nr 3w0 03w0]>?(03aw0]+2n)
w1] .nr 3w1 03w1]>?(03aw1]+2n)
w2] .nr 3w2 03w2]>?(03aw2]+2n)
!.3rmk "3rt0"
!.3rvpt "0"
!.3rvpt "1"
flag] {.di
!.3rvpt "1"
!.3rmk "3rt1"
!.3rvpt "0"
!.3rvpt "1"
flag] {.di
!.3rvpt "1"
!.3rmk "3rt2"
!.3rvpt "0"
!.3rvpt "1"
flag] {.di
!.3rmk "3rt3"
!.3rvpt "0"
!.3rvpt "1"
flag] {.di
!.3rmk "3rt4"
!.3rvpt "0"
!.3rvpt "1"
flag] {.di
!.3rmk "3rt5"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt6"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt7"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt8"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt9"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt10"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt11"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt12"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt13"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt14"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt15"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt16"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt17"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt18"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt19"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt20"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt21"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt22"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt23"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt24"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt25"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt26"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt27"
!.3rvpt "0"
!.3rvpt "1"
!.3rmk "3rt28"
!.3rvpt "0"
!.3rvpt "1"
See Alsotex(1), latex(1) AuthorVan Jacobson, Lawrence Berkeley Laboratory
(van@lbl-csam.arpa) with thanks to Richard Furuta for much help decoding
Scribe. BugsThe program isn't intended to do a 100% conversion. It usually
gets about 90% right on the first pass. With the addition of a few translation
rules & some judicious editting of the Scribe input file, it can get you
99% of the way to a document that Latex will accept. This may still be
a long way from a document that you'll accept but such are the joys of typesetting.
The "parse error at line xxx" message isn't all that helpful. Start by looking
in the input file around the line number given. Errors are usually caused
by:
a Scribe macro or environment definition. Delete it from the input file
& try again. some interesting new way to do "descriptions" or "formats".
If it's a description, either fix things so s2latex can find the tag or
put in a dummy tag so that the rest of the description environment doesn't
get screwed up. If it's a format, either the fixup will be obvious or you
should change to format keyword to something unrecognized & fix things later
in the output file. The following two character control sequences probably
should be converted to something but aren't: @!, @$, @:, @/, @|, @&, @), @#
and @].
In a format environment, all Scribe tab commands (@\, @=, @>, @^) get
converted to the TeX alignment tab (&).
A lot better job could be done on
formats and macro definitions.