Rdb: Ruby-Nachbau der MWC /rdb-Werkzeuge
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
.TH tabletom4 "" "" "/rdb Command"
|
||||
.PC "Convert a table to m4 define-file format"
|
||||
\fBtabletom4 < \fItable \fB> \fIdefinefile\fR
|
||||
.PP
|
||||
.II "table^convert to m4"
|
||||
.II m4
|
||||
The command
|
||||
.B tabletom4
|
||||
converts a two-column table into a file of
|
||||
define statements that can be input to the COHERENT macro processor
|
||||
.BR m4 .
|
||||
Define macros are in the form
|
||||
.I define(old,new).
|
||||
.PP
|
||||
.B m4
|
||||
can do many things, including word-for-word substitution.
|
||||
It can be used for language translation (in a stiff, inflexible way)
|
||||
and for other conversions of data bases.
|
||||
.PP
|
||||
The
|
||||
.I definefile
|
||||
that
|
||||
.B tabletom4
|
||||
produces is required by the
|
||||
.B /rdb
|
||||
command
|
||||
.BR translate .
|
||||
Only words that have a corresponding translation in the second
|
||||
column will be put into
|
||||
.IR definefile .
|
||||
In this way, you can
|
||||
use the file before you have all of the translations entered.
|
||||
.SH Example
|
||||
Consider the simple translation table
|
||||
.BR ed.t :
|
||||
.DM
|
||||
English Deutch
|
||||
------- -------
|
||||
I Ich
|
||||
love liebe
|
||||
you dich
|
||||
widgit
|
||||
.DE
|
||||
.PP
|
||||
The following command converts
|
||||
.B ed.t
|
||||
to m4 format and writes its output into file
|
||||
.BR ed :
|
||||
.DM
|
||||
tabletom4 < ed.t > ed
|
||||
.DE
|
||||
.PP
|
||||
.B ed
|
||||
now contains the following:
|
||||
.DM
|
||||
define(I,Ich)
|
||||
define(love,liebe)
|
||||
define(you,dich)
|
||||
.DE
|
||||
.PP
|
||||
Note that
|
||||
.B widgit
|
||||
was not converted because it did not have
|
||||
a translation string in the second column of the table.
|
||||
.B ed
|
||||
can now be used by
|
||||
.B m4
|
||||
or
|
||||
.BR translate .
|
||||
For example, if file
|
||||
.B text
|
||||
contains the following:
|
||||
.DM
|
||||
I love you.
|
||||
.DE
|
||||
.PP
|
||||
The command
|
||||
.DM
|
||||
m4 ed text
|
||||
.DE
|
||||
.PP
|
||||
writes
|
||||
.DM
|
||||
Ich liebe dich.
|
||||
.DE
|
||||
.PP
|
||||
onto the standard output.
|
||||
.SH "See Also"
|
||||
.B
|
||||
translate
|
||||
.R
|
||||
.br
|
||||
COHERENT Tutorials:
|
||||
.B
|
||||
Introduction to the m4 Macro Processor
|
||||
.R
|
||||
.br
|
||||
COHERENT Lexicon:
|
||||
.B
|
||||
m4
|
||||
.R
|
||||
Reference in New Issue
Block a user