tex2sdoc

Version 0.2.4
2001/4/23

What is tex2sdoc

This program translates a document in LaTeX into the SmartDoc format. A document has structural or major commands, should be operated correctly.

I'm sure this program is not enough to satisfy all the latex-documents, so please download the source code and hack it.

Environment

more than Java2 SDK1.2, SDK1.3

SmartDoc more than 0.7

Download

All the code are distributed under the GPL license.

tex2sdoc.tar.gz

Usage

In the console, input like follows,

% java -jar tex2sdoc.jar [options] (TeX sources...)

-encoding : Output encoding ( the default is "Shift_JIS" )
-lang     : Output language ( the default is "ja")
-exmacro : expand tex macro ( if your latex-document has some macro codes, you need this option )

If your document includes BibTeX file, you also need "SmartDoc.jar". Then input like following,

% java -cp "tex2sdoc.jar;SmartDoc.jar" \
  jp.gr.java_conf.ccs2.tool.tex2sdoc.TeX2Sdoc [options] (TeX source...)

This program has a experimental function that translates a BibTeX file into SmartBib file (XML).

% java -cp "tex2sdoc.jar;SmartDoc.jar" \
  jp.gr.java_conf.ccs2.tool.tex2sdoc.bibtex.BibTeX2SBib \
  (BibTeX file) (output filename)

Supported command and environment

You can use following commands in your latex-document. Sometimes (maybe many times), you will meet the translation error or the runtime error. Please tell me the situation or hack the code.
*Meta command
maketitle,(title,author,date,abstract)
# You can use only a text in the abstract field.

*Structural command
part,chapter,section,subsection,subsubsection,appendix
# The title of these commands has only a text.

*Font command
bf,bfseries,textbf,sffamily
it,itshape,slshape,textit
tt,ttfamily,texttt
em,emph
large,Large,LARGE,huge,Huge
small,footnotesize,scriptsize,tiny

*Reference
footnote,cite,ref,eqref
# You can use the cite command like "\cite{foo1,foo2}".

*Environment
equation,eqnarray,itemiza,enumerate,quote
figure(includegraphics,caption),description,tabular,tabbing
center,flushright,flushleft,thebibliography(bibitem)

*label
# You can use the label command just after the structural command and the emvironment command.
Ex: \section{abc}\label{abc},  \begin{equation}\label{foo}

Sample

You can translate a latex-document "sdoctext.tex" that has some math expressions, like following,

% java -jar tex2sdoc.jar -encoding UTF-8 -lang en -exmacro sdoctest.tex

And after translation by SmartDoc, You can read the HTML document with the amaya.

% sdoc -html4.encoding:UTF-8 sdoctest.sdoc

TeX2MathML

Evaluation applet that translates a math expression in LaTeX into the presentation markup of the MathML.

TeX2MathML test


SAKURAI, Masashi E-mail : m.sakurai@cmt.phys.kyushu-u.ac.jp
Web page : http://www.cmt.phys.kyushu-u.ac.jp/~M.Sakurai/index-e.html