DtoTex - D-file to TeX conversion.

[ English | Japanese ]

[visit D-home]

SYNOPSIS

DtoTex [ -b field-list ] [ -n field-list ] [ -r macro-name ] [ input-file.. ]

DESCRIPTION

DtoTex converts D-records in the input-files into TeX source file. Each field becomes

\fieldnamevalue

line. If the field is in -b field-list, the value is enclosed with {} as:

\fieldname{value}

At each end of D-record, DtoTex output a null line (a line with length zero). But, when -r macro-name option is given, end of a D-record is converted to the given macro. You have to give valid TeX macro name in the -r option.

TeX special characters in the value part are converted on the output, to be printed as the original character. They are:

\$\backslash$
$\$
&\&
#\#
^\char94
~\char126
%\%
<$<$
>$>$
|$|$
{$\{$
}$\}$

These conversions are not in effect in the fields listed in the -n option.

DtoTex is used to get quality printing of your D-files. As field names become TeX macro names, you are responsible to feed proper TeX macro definitions for them.

OPTIONS

-b field- list
values of these fields are output with {}.
-n field-format-list
values of these fields are output as they are without special character escaping. This is used when the value includes TeX notations.
-r macro-name
at each end of D-record, specified TeX macro is output.
-D [i/o]datautf=8|16|32
UTF I/O feature (see manual page of UTF I/O feature.)

ENVIRONMENT

Ddatautf, Didatautf, Dodatautf
for UTF I/O feature.

EXAMPLES

Table Print Out by LaTeX

Assuming file "ex1.d" has three fields "aa", "bb" and "cc" in this order. Field "aa" and "bb" have short text value, the field "cc" has long text.

Contents of macro file "ex1.tex" is as follows:

\documentstyle{article}
\def\aa#1{#1 &}
\def\bb#1{#1 &}
\def\cc#1{\vtop{\hsize 64pt #1}\\}
\begin{document}
\begin{tabular}{lrl}
\input tmp.tex
\end{tabular}
\end{document}

Then, next commands produce a formatted table output (ex1.dvi file to be output by proper command).

DtoTex -b aa,bb,cc ex1.d > tmp.tex
latex ex1.tex

Table Print Out by TeX

Assuming file "ex2.d" has three fields "aa", "bb" and "cc" in this order. All fields are short text data.

Contents of macro file "ex2.tex" is as follows:

\def\aa{}
\def\bb{&}
\def\cc{&}
\def\endofrecord{\cr}
\halign{#\hfil&#\hfil&#\hfil\cr
\input tmp.tex
}
\bye

Then, next commands produce a formatted table output (ex2.dvi file to be output by proper command).

DtoTex -r endofrecord ex2.d > tmp.tex tex ex2.tex

DIAGNOSTICS

See the manual of D_msg.

SEE ALSO

Dintro, DtoLine, Dpr, D_msg.

AUTHOR

MIYAZAWA Akira


miyazawa@nii.ac.jp
2003