summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-05-10 00:34:52 +0000
committerKarl Berry <karl@freefriends.org>2008-05-10 00:34:52 +0000
commit3faea455168abd154168997d2b79fe677fb2afa0 (patch)
tree8a2f7cc789389ed17d28d6a45053fb36db4c7b0b
parent3affd633834494c279f96078e95831935ea51ca7 (diff)
missed new executables
git-svn-id: svn://tug.org/texlive/trunk@8001 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/tex4htk/dbmxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/dbmxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/dbxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/dbxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/escontext7
-rwxr-xr-xBuild/source/texk/tex4htk/eslatex9
-rwxr-xr-xBuild/source/texk/tex4htk/esmex9
-rwxr-xr-xBuild/source/texk/tex4htk/estex9
-rwxr-xr-xBuild/source/texk/tex4htk/estexi10
-rwxr-xr-xBuild/source/texk/tex4htk/esxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/esxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/htxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/htxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/java/GroupMn.java77
-rwxr-xr-xBuild/source/texk/tex4htk/java/HtJsml.java351
-rwxr-xr-xBuild/source/texk/tex4htk/java/HtSpk.java211
-rwxr-xr-xBuild/source/texk/tex4htk/java/JsmlFilter.java49
-rwxr-xr-xBuild/source/texk/tex4htk/java/JsmlMathBreak.java51
-rwxr-xr-xBuild/source/texk/tex4htk/java/OoFilter.java60
-rwxr-xr-xBuild/source/texk/tex4htk/java/OoUtilities.java243
-rwxr-xr-xBuild/source/texk/tex4htk/java/OomFilter.java62
-rwxr-xr-xBuild/source/texk/tex4htk/java/README1
-rwxr-xr-xBuild/source/texk/tex4htk/java/xtpipes.java7
-rwxr-xr-xBuild/source/texk/tex4htk/java/xtpipes/FileInfo.java170
-rwxr-xr-xBuild/source/texk/tex4htk/java/xtpipes/InputObject.java323
-rwxr-xr-xBuild/source/texk/tex4htk/java/xtpipes/Xtpipes.java1472
-rwxr-xr-xBuild/source/texk/tex4htk/java/xtpipes/XtpipesUni.java41
-rwxr-xr-xBuild/source/texk/tex4htk/java/xtpipes/util/ScriptsManager.java196
-rwxr-xr-xBuild/source/texk/tex4htk/java/xtpipes/util/ScriptsManagerLH.java26
-rwxr-xr-xBuild/source/texk/tex4htk/jh1context7
-rwxr-xr-xBuild/source/texk/tex4htk/jh1latex9
-rwxr-xr-xBuild/source/texk/tex4htk/jh1mex9
-rwxr-xr-xBuild/source/texk/tex4htk/jh1tex9
-rwxr-xr-xBuild/source/texk/tex4htk/jh1texi10
-rwxr-xr-xBuild/source/texk/tex4htk/jh1xelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/jh1xetex9
-rwxr-xr-xBuild/source/texk/tex4htk/jhcontext7
-rwxr-xr-xBuild/source/texk/tex4htk/jhlatex9
-rwxr-xr-xBuild/source/texk/tex4htk/jhmex9
-rwxr-xr-xBuild/source/texk/tex4htk/jhtex9
-rwxr-xr-xBuild/source/texk/tex4htk/jhtexi10
-rwxr-xr-xBuild/source/texk/tex4htk/jhxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/jhxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/jmcontext7
-rwxr-xr-xBuild/source/texk/tex4htk/jmlatex9
-rwxr-xr-xBuild/source/texk/tex4htk/jmmex9
-rwxr-xr-xBuild/source/texk/tex4htk/jmtex9
-rwxr-xr-xBuild/source/texk/tex4htk/jmtexi10
-rwxr-xr-xBuild/source/texk/tex4htk/jmxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/jmxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/jscontext7
-rwxr-xr-xBuild/source/texk/tex4htk/jslatex9
-rwxr-xr-xBuild/source/texk/tex4htk/jsmex9
-rwxr-xr-xBuild/source/texk/tex4htk/jstex9
-rwxr-xr-xBuild/source/texk/tex4htk/jstexi10
-rwxr-xr-xBuild/source/texk/tex4htk/jsxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/jsxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/mzxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/mzxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/ooxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/ooxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/teimxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/teimxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/teixelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/teixetex9
-rwxr-xr-xBuild/source/texk/tex4htk/uxhxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/uxhxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/wxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/wxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/xhmxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/xhmxetex9
-rwxr-xr-xBuild/source/texk/tex4htk/xhxelatex9
-rwxr-xr-xBuild/source/texk/tex4htk/xhxetex9
73 files changed, 3848 insertions, 0 deletions
diff --git a/Build/source/texk/tex4htk/dbmxelatex b/Build/source/texk/tex4htk/dbmxelatex
new file mode 100755
index 00000000000..115988cc473
--- /dev/null
+++ b/Build/source/texk/tex4htk/dbmxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,docbook-mml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook-mml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,docbook-mml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook-mml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,docbook-mml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook-mml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cdocbk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/dbmxetex b/Build/source/texk/tex4htk/dbmxetex
new file mode 100755
index 00000000000..de91087c075
--- /dev/null
+++ b/Build/source/texk/tex4htk/dbmxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook-mml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook-mml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook-mml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cdocbk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/dbxelatex b/Build/source/texk/tex4htk/dbxelatex
new file mode 100755
index 00000000000..7808aa4da31
--- /dev/null
+++ b/Build/source/texk/tex4htk/dbxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,docbook]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,docbook]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,docbook]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate -cdocbk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/dbxetex b/Build/source/texk/tex4htk/dbxetex
new file mode 100755
index 00000000000..0487bb2c431
--- /dev/null
+++ b/Build/source/texk/tex4htk/dbxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,docbook}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate -cdocbk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/escontext b/Build/source/texk/tex4htk/escontext
new file mode 100755
index 00000000000..25c1421c9be
--- /dev/null
+++ b/Build/source/texk/tex4htk/escontext
@@ -0,0 +1,7 @@
+#!/bin/sh
+ texexec --arg="ht-1=$2" --use=tex4ht --dvi --nobackend $5 $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cemspkhtf -s4es
+ t4ht -f/$1 $4 -cemspk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/eslatex b/Build/source/texk/tex4htk/eslatex
new file mode 100755
index 00000000000..82c26086563
--- /dev/null
+++ b/Build/source/texk/tex4htk/eslatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,emspk]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,emspk]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,emspk]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cemspkhtf -s4es
+ t4ht -f/$1 $4 -cemspk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/esmex b/Build/source/texk/tex4htk/esmex
new file mode 100755
index 00000000000..b3ce722414f
--- /dev/null
+++ b/Build/source/texk/tex4htk/esmex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cemspkhtf -s4es
+ t4ht -f/$1 $4 -cemspk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/estex b/Build/source/texk/tex4htk/estex
new file mode 100755
index 00000000000..cc30b1769d0
--- /dev/null
+++ b/Build/source/texk/tex4htk/estex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cemspkhtf -s4es
+ t4ht -f/$1 $4 -cemspk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/estexi b/Build/source/texk/tex4htk/estexi
new file mode 100755
index 00000000000..e86138bf344
--- /dev/null
+++ b/Build/source/texk/tex4htk/estexi
@@ -0,0 +1,10 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cemspkhtf -s4es
+ t4ht -f/$1 $4 -cemspk ## -d~/WWW/temp/ -m644
+# texindex ?
+
+
+
diff --git a/Build/source/texk/tex4htk/esxelatex b/Build/source/texk/tex4htk/esxelatex
new file mode 100755
index 00000000000..78d931ab2ac
--- /dev/null
+++ b/Build/source/texk/tex4htk/esxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,emspk]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,emspk]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,emspk]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cemspkhtf -s4es
+ t4ht -.xdv -f/$1 $4 -cemspk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/esxetex b/Build/source/texk/tex4htk/esxetex
new file mode 100755
index 00000000000..61ddf33bc33
--- /dev/null
+++ b/Build/source/texk/tex4htk/esxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,emspk}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cemspkhtf -s4es
+ t4ht -.xdv -f/$1 $4 -cemspk ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/htxelatex b/Build/source/texk/tex4htk/htxelatex
new file mode 100755
index 00000000000..5d0a57d9e67
--- /dev/null
+++ b/Build/source/texk/tex4htk/htxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
+ t4ht -.xdv -f/$1 $4 ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/htxetex b/Build/source/texk/tex4htk/htxetex
new file mode 100755
index 00000000000..3386f1e0be4
--- /dev/null
+++ b/Build/source/texk/tex4htk/htxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
+ t4ht -.xdv -f/$1 $4 ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/java/GroupMn.java b/Build/source/texk/tex4htk/java/GroupMn.java
new file mode 100755
index 00000000000..c54d051c0eb
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/GroupMn.java
@@ -0,0 +1,77 @@
+package tex4ht;
+import org.xml.sax.helpers.*;
+import org.xml.sax.*;
+import java.io.PrintWriter;
+
+public class GroupMn extends XMLFilterImpl {
+ PrintWriter out = null;
+ boolean inMn = false;
+ String ns;
+ int level = -1;
+ public GroupMn( PrintWriter out, PrintWriter log, boolean trace){
+ this.out = out;
+ }
+ public void startElement(String ns, String sName,
+ String qName, Attributes attr) {
+ level++;
+ try{
+ if( inMn ){
+ if( level == 0 ){ if( !qName.equals( "mn" ) ){
+ if( qName.equals( "mo" ) ){
+ String cls = attr.getValue( "class" );
+ if( (cls == null) || !cls.equals("MathClass-punc") ){
+ inMn = false;
+ super.endElement(ns, "mn-group", "mn-group");
+ }
+ } else {
+ inMn = false;
+ super.endElement(ns, "mn-group", "mn-group");
+} }
+ }
+ } else { if( qName.equals( "mn" ) ){
+ inMn = true; level = 0;
+ Attributes att = new AttributesImpl();
+ super.startElement(ns, "mn-group", "mn-group", att);
+ this.ns = ns;
+} else if( qName.equals( "mo" ) ){
+ String cls = attr.getValue( "class" );
+ if( (cls != null) && cls.equals("MathClass-punc") ){
+ inMn = true; level = 0;
+ Attributes att = new AttributesImpl();
+ super.startElement(ns, "mn-group", "mn-group", att);
+ this.ns = ns;
+} }
+ }
+ super.startElement(ns, sName, qName, attr);
+ } catch( Exception e ){
+ System.out.println( "--- GroupMn Error 1 --- " + e);
+ }
+ }
+ public void endElement(String ns, String sName, String qName){
+ try{
+ if( level < 0) {
+ if( inMn ){
+ inMn = false;
+ super.endElement(ns, "mn-group", "mn-group");
+}
+
+ }
+ super.endElement(ns, sName, qName);
+ } catch( Exception e ){
+ System.out.println( "--- GroupMn Error 2 --- " + e);
+ }
+ level--;
+ }
+ public void characters(char[] ch, int start, int length){
+ try{
+ if ( inMn && (level < 0) ) {
+ String s = new String(ch, start, length);
+ if (!s.trim().equals("")) {
+ inMn = false;
+ super.endElement(ns, "mn-group", "mn-group");
+ } }
+ super.characters(ch, start, length);
+ } catch( Exception e ){
+ System.out.println( "--- GroupMn Error 3 --- " + e);
+} } }
+
diff --git a/Build/source/texk/tex4htk/java/HtJsml.java b/Build/source/texk/tex4htk/java/HtJsml.java
new file mode 100755
index 00000000000..188cdee85f5
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/HtJsml.java
@@ -0,0 +1,351 @@
+package tex4ht;
+import org.w3c.dom.*;
+public class HtJsml {
+ private static void insertLevelPrefix(Node node, int level){
+ if( level == 0 ){ return; }
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ if( node.getNodeName().equals( "level" ) ){
+ Node attr = node.getAttributes().getNamedItem("prefix");
+if( attr != null ){
+ String prefix = attr.getNodeValue();
+ String s = "";
+ for(int j=0; j<level; j++){
+ s += prefix + " ";
+ }
+ ((org.w3c.dom.Element) node).setAttribute( "depth", ""+level);
+ Node child = node.getFirstChild();
+ if( child != null ){
+ node.insertBefore( dom.createTextNode(s), child );
+} }
+
+ } else {
+ NodeList children = node.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ insertLevelPrefix(child, level);
+} } } }
+private static void setContinuedNote(Node node){
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ if( node.getNodeName().equals( "level" ) ){
+ Node attr = node.getAttributes().getNamedItem("continued");
+if (attr != null) {
+ node = node.getFirstChild();
+ if( node != null ){
+ ((org.w3c.dom.Text) node).setData( attr.getNodeValue() );
+} }
+
+ } else {
+ NodeList children = node.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ setContinuedNote(child);
+} } } }
+
+ private static Document dom;
+public static void mnGroup(Node d) {
+ dom = (Document) d;
+ setMnGroup(dom.getFirstChild());
+}
+private static void setMnGroup(Node node) {
+ if( node.getNodeName().equals( "mn-group" ) ){
+ boolean bool = false;
+ NodeList children = node.getChildNodes();
+int n = children.getLength();
+char [] digit = new char[n];
+for (int i = 0; i < n; i++) {
+ Node child = children.item(i).getFirstChild();
+ if( child == null ){
+ digit[i] = 'x';
+ } else if( child.getNodeType() != Node.TEXT_NODE ){
+ digit[i] = 'x';
+ } else {
+ String s = child.getNodeValue();
+ if( s.length() != 1 ){
+ digit[i] = 'x';
+ } else {
+ char ch = s.charAt(0);
+ if( (ch >= '0') && (ch <= '9') ){
+ digit[i] = '0'; bool = true;
+ } else if( (ch == '.') || (ch == ',') ){ digit[i] = ch; }
+ else { digit[i] = 'x';}
+} } }
+
+ if( bool ){
+ bool = false;
+for (int i = 0; i < n; i++) {
+ if( digit[i] == '.' ){
+ for (; i < n; i++) {
+ if( digit[i] == ',' ){
+ bool = true; break;
+ } }
+ break;
+} }
+
+ if( !bool ){
+ for (int i = 0; i < n; i++) {
+ if( digit[i] == ',' ){
+ if( ( ((i+3) >= n)
+ || (digit[i+1] != '0')
+ || (digit[i+2] != '0')
+ || (digit[i+3] != '0')
+ )
+ ||
+ (
+ ((i+4) < n) && (digit[i+4] == '0')
+ )
+ ||
+ (
+ (i>3) && (digit[i-4] == '0')
+ )
+ ){ bool = true; break;
+ } else { i += 3; }
+} } }
+
+ if( bool ){
+ for (int i = 0; i < n; i++) {
+ if( digit[i] == ',' ){ digit[i] = 'x'; }
+} }
+
+ bool = false;
+for (int i = 0; i < n; i++) {
+ if( (digit[i] == 'x')
+ || (digit[i] == ',') ){ bool = false; }
+ else if( digit[i] == '.' ){
+ if( bool ){
+ for (int j = 0; j < n; j++) {
+ if( (digit[j] == '.') || (digit[j] == ',') ){
+ digit[j] = 'x';
+ } }
+ break;
+ }
+ bool = true;
+} }
+
+ if( digit[n-1] == '.' ){ digit[n-1] = 'x'; }
+
+ }
+ Node parent = node.getParentNode();
+Element g = dom.createElement( "mn-group-s" );
+Element cur = dom.createElement( "mn-group" );
+for(int i=0; i<n; i++ ){
+ Node child = node.getFirstChild();
+ node.removeChild( child );
+ if( digit[i] == 'x' ){
+ if( cur.hasChildNodes() ){ g.appendChild( cur ); }
+ g.appendChild( child );
+ cur = dom.createElement( "mn-group" );
+ } else {
+ cur.appendChild( child );
+} }
+if( cur.hasChildNodes() ){ g.appendChild( cur ); }
+parent.replaceChild( g, node );
+
+ } else if (node.hasChildNodes()) {
+ NodeList children = node.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ setMnGroup(child);
+} } } }
+
+ public static void fracLevel(Node d) {
+ dom = (Document) d;
+ setFracLevel(dom.getFirstChild(), 0);
+}
+private static int setFracLevel(Node node, int cont) {
+ int level = 0;
+ if (node.hasChildNodes()) {
+ String ndName = node.getNodeName();
+ int prevCont = cont;
+ String clValue = null;
+ if (ndName.equals("mfrac")) {
+ if (node.hasAttributes()) {
+ Node cl = node.getAttributes().getNamedItem("class");
+ if (cl != null) { clValue = cl.getNodeValue(); }
+}
+
+ if( (clValue != null)
+ && clValue.equals("continued-mfrac") ) {
+ cont = 2;
+} else { cont--; }
+
+ }
+ NodeList children = node.getChildNodes();
+int max = 0;
+for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ int d = setFracLevel(child,
+ cont
+);
+ if (d > max) { max = d; }
+} }
+level += max;
+
+ if( ndName.equals("msub")
+ || ndName.equals("msup")
+ || ndName.equals("msubsup")
+) {
+ return 0;
+}
+
+ if (ndName.equals("mfrac")) {
+ if( (clValue != null) && clValue.equals("word-frac")
+) {
+ return 0;
+}
+
+ if( cont > 0 ){
+ if ( prevCont == 0 ){
+ Node child = node.getFirstChild();
+if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes() .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if ( clsName.equals("begin-end")) {
+ setContinuedNote(child);
+} } }
+
+ }
+ Node child = node.getLastChild();
+if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes() .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if ( clsName.equals("begin-end")) {
+ node.removeChild( child );
+} } }
+
+ level = 0;
+ } else if ( prevCont > 0 ){
+ Node child = node.getLastChild();
+if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes() .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if ( clsName.equals("begin-end")) {
+ setContinuedNote(child);
+} } }
+
+ level = 0;
+ } else
+ if( level > 0 ){
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes()
+ .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if (clsName.equals("begin-end")) {
+ insertLevelPrefix(child, level);
+} } } }
+
+ }
+ level++;
+ } }
+ return level;
+}
+
+ public static void scriptLevel(Node dom) {
+ setScriptLevel(dom.getFirstChild(), "");
+}
+private static void setScriptLevel(Node node, String prefix) {
+ String clName = null;
+ if (node.hasChildNodes()) {
+ if (node.hasAttributes()) {
+ Node cl = node.getAttributes().getNamedItem("class");
+ if (cl != null) {
+ clName = cl.getNodeValue();
+ if( clName.equals("mrow-sub")
+ ||
+ clName.equals("mrow-super")
+ ){
+ if( !prefix.equals("") ){
+ Node child = node.getFirstChild();
+if( (child.getNodeType() == Node.ELEMENT_NODE)
+ &&
+ child.hasAttributes()
+){
+ Node cls = child.getAttributes().getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if ( clsName.equals("begin-script")
+ ||
+ clsName.equals("mid-script")
+ ) {
+ child = child.getFirstChild();
+ String s = child.getNodeValue();
+ ((org.w3c.dom.Text) child).setData( prefix + s );
+} } }
+
+}
+if( clName.equals( "mrow-sub" ) ){
+ prefix += " sub ";
+} else if( clName.equals( "mrow-super" ) ){
+ prefix += " super ";
+}
+
+ } } }
+ String ndName = node.getNodeName();
+ if(
+ ndName.equals("msqrt")
+ ||
+ ndName.equals("mroot")
+ ){ prefix = ""; }
+ NodeList children = node.getChildNodes();
+for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ setScriptLevel(child, prefix);
+} }
+
+} }
+
+ public static void rootLevel(Node d) {
+ dom = (Document) d;
+ setRootLevel(d.getFirstChild());
+}
+private static int setRootLevel( Node node ){
+ int level = 0;
+// String clName = null;
+ if (node.hasChildNodes()) {
+ NodeList children = node.getChildNodes();
+int max = 0;
+for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ int d = setRootLevel(child);
+ if( d > max ){ max = d; }
+} }
+level += max;
+
+ String ndName = node.getNodeName();
+ if( ndName.equals("msub") || ndName.equals("msup") ||
+ ndName.equals("msubsup")
+) {
+ return 0;
+}
+
+ if( ndName.equals("msqrt") || ndName.equals("mroot") ){
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes()
+ .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if( clsName.equals("begin-root")
+ || clsName.equals("mid-root")
+ || clsName.equals("end-root")
+ ){
+ insertLevelPrefix(child, level);
+} } } }
+
+ level++;
+ } }
+ return level;
+}
+
+}
+
diff --git a/Build/source/texk/tex4htk/java/HtSpk.java b/Build/source/texk/tex4htk/java/HtSpk.java
new file mode 100755
index 00000000000..1f0e9c0a0bd
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/HtSpk.java
@@ -0,0 +1,211 @@
+package tex4ht;
+import org.w3c.dom.*;
+public class HtSpk {
+ public static void fracLevel(Node dom) {
+ setFracLevel(dom.getFirstChild(), 0);
+}
+private static int setFracLevel(Node node, int cont) {
+ int level = 0;
+ String clName = null;
+ if (node.hasChildNodes()) {
+ if (node.hasAttributes()) {
+ Node cl = node.getAttributes().getNamedItem("class");
+ if (cl != null) { clName = cl.getNodeValue(); }
+ }
+ NodeList children = node.getChildNodes();
+int max = 0;
+for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ int d = setFracLevel(child,
+ (clName != null) &&
+ clName.equals("continuous-mfrac")?
+ 2 :
+ ((clName != null) &&
+ clName.equals("continuous-mfrac")?
+ (cont-1) : cont)
+ );
+ if (d > max) { max = d; }
+} }
+level += max;
+
+ if( clName != null ){
+ if( clName.equals("msub") || clName.equals("msup") ||
+ clName.equals("msubsup")
+) {
+ return 0;
+}
+
+ if( clName.equals("continuous-mfrac") ) {
+ if( cont > 0 ){
+ Node child = node.getLastChild();
+if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes() .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if ( clsName.equals("begin-end")) {
+ node.removeChild( child );
+} } }
+
+ } else { for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes()
+ .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if ( clsName.equals("begin-end")) {
+ child = child.getFirstChild();
+ String s = child.getNodeValue();
+ s = s.replaceFirst("begin", "begin continued");
+ s = s.replaceFirst("end", "end continued");
+ ((org.w3c.dom.Text) child).setData(s);
+} } } }
+ }
+ return 0;
+}
+
+ if (clName.equals("mfrac")) {
+ if( cont > 0 ){
+ Node child = node.getLastChild();
+if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes() .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if ( clsName.equals("begin-end")) {
+ node.removeChild( child );
+} } }
+
+ } else if( level > 0 ){
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes()
+ .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if (clsName.equals("begin-end")) {
+ child = child.getFirstChild();
+ String s = child.getNodeValue();
+ String bg = "", ov = "", en = "";
+ for(int j=0; j<level; j++){
+ bg += " begin "; ov += " over "; en += " end ";
+ }
+ s = s.replaceFirst("begin", bg + "begin");
+ s = s.replaceFirst("over", ov + "over");
+ s = s.replaceFirst("end", en + "end");
+ ((org.w3c.dom.Text) child).setData(s);
+} } } }
+
+ }
+ level++;
+ } } }
+ return level;
+}
+
+ public static void scriptLevel(Node dom) {
+ setScriptLevel(dom.getFirstChild(), "");
+}
+private static void setScriptLevel(Node node, String prefix) {
+ String clName = null;
+ if (node.hasChildNodes()) {
+ if (node.hasAttributes()) {
+ Node cl = node.getAttributes().getNamedItem("class");
+ if (cl != null) {
+ clName = cl.getNodeValue();
+ if( clName.equals("mrow-sub")
+ ||
+ clName.equals("mrow-super")
+ ){
+ if( !prefix.equals("") ){
+ Node child = node.getFirstChild();
+if( (child.getNodeType() == Node.ELEMENT_NODE)
+ &&
+ child.hasAttributes()
+){
+ Node cls = child.getAttributes().getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if ( clsName.equals("begin-script")
+ ||
+ clsName.equals("mid-script")
+ ) {
+ child = child.getFirstChild();
+ String s = child.getNodeValue();
+ ((org.w3c.dom.Text) child).setData( prefix + s );
+} } }
+
+}
+if( clName.equals( "mrow-sub" ) ){ prefix += " sub "; }
+else
+if( clName.equals( "mrow-super" ) ){ prefix += " super "; }
+
+ } else if(
+ clName.equals("msqrt")
+ ){ prefix = ""; }
+ } }
+ NodeList children = node.getChildNodes();
+for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ setScriptLevel(child, prefix);
+} }
+
+} }
+
+ public static void rootLevel(Node dom) {
+ setRootLevel(dom.getFirstChild());
+}
+private static int setRootLevel( Node node ){
+ int level = 0;
+ String clName = null;
+ if (node.hasChildNodes()) {
+ if (node.hasAttributes()) {
+ Node cl = node.getAttributes().getNamedItem("class");
+ if (cl != null) { clName = cl.getNodeValue(); }
+ }
+ NodeList children = node.getChildNodes();
+int max = 0;
+for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ int d = setRootLevel(child);
+ if( d > max ){ max = d; }
+} }
+level += max;
+
+ if( clName != null ){
+ if( clName.equals("msub") || clName.equals("msup") ||
+ clName.equals("msubsup")
+) {
+ return 0;
+}
+
+ if( clName.equals("msqrt") || clName.equals("root") ){
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE) {
+ Node cls = child.getAttributes()
+ .getNamedItem("class");
+ if (cls != null) {
+ String clsName = cls.getNodeValue();
+ if( clsName.equals("begin-root")
+ || clsName.equals("mid-root")
+ || clsName.equals("end-root")
+ ){
+ child = child.getFirstChild();
+ String s = child.getNodeValue();
+ String nested = "";
+ for(int j=0; j<level; j++){
+ nested += " nested ";
+ }
+ ((org.w3c.dom.Text) child).setData( nested + s);
+} } } }
+
+ level++;
+ } } }
+ return level;
+}
+
+}
+
diff --git a/Build/source/texk/tex4htk/java/JsmlFilter.java b/Build/source/texk/tex4htk/java/JsmlFilter.java
new file mode 100755
index 00000000000..16cbf4fbad4
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/JsmlFilter.java
@@ -0,0 +1,49 @@
+package tex4ht;
+import org.xml.sax.helpers.*;
+import org.xml.sax.*;
+import java.io.PrintWriter;
+
+public class JsmlFilter extends XMLFilterImpl {
+ PrintWriter out = null;
+ public JsmlFilter( PrintWriter out, PrintWriter log, boolean trace ){
+ this.out = out;
+ }
+ public void startElement(String ns, String sName,
+ String qName, Attributes attr) {
+ try{
+ if( qName.equals( "p" )
+|| qName.equals( "h2" )
+|| qName.equals( "h3" )
+|| qName.equals( "h4" )
+|| qName.equals( "ul" )
+|| qName.equals( "ol" )
+|| qName.equals( "li" )
+|| qName.equals( "dd" )
+|| qName.equals( "dl" )
+ ){
+ Attributes att = new AttributesImpl();
+ super.startElement(ns, "PARA", "PARA", att);
+ }
+ super.startElement(ns, sName, qName, attr);
+ } catch( Exception e ){
+ System.out.println( "--- JsmlFilter Error 1 --- " + e);
+ } }
+ public void endElement(String ns, String sName, String qName){
+ try{
+ super.endElement(ns, sName, qName);
+ if( qName.equals( "p" )
+|| qName.equals( "h2" )
+|| qName.equals( "h3" )
+|| qName.equals( "h4" )
+|| qName.equals( "ul" )
+|| qName.equals( "ol" )
+|| qName.equals( "li" )
+|| qName.equals( "dd" )
+|| qName.equals( "dl" )
+ ){
+ super.endElement(ns, "PARA", "PARA");
+ }
+ } catch( Exception e ){
+ System.out.println( "--- JsmlFilter Error 2 --- " + e);
+} } }
+
diff --git a/Build/source/texk/tex4htk/java/JsmlMathBreak.java b/Build/source/texk/tex4htk/java/JsmlMathBreak.java
new file mode 100755
index 00000000000..d0a241b97f3
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/JsmlMathBreak.java
@@ -0,0 +1,51 @@
+package tex4ht;
+/*
+JsmlMathBreak.java (2007-09-01-14:10)
+
+*/
+import xtpipes.XtpipesUni;
+import org.xml.sax.*;
+import org.xml.sax.helpers.DefaultHandler;
+import java.io.*;
+import java.lang.reflect.*;
+import java.util.HashMap;
+
+public class JsmlMathBreak extends DefaultHandler {
+ PrintWriter out = null;
+ boolean delete = false;
+ public JsmlMathBreak(PrintWriter out,
+ HashMap<String,Object> scripts,
+ Method method, PrintWriter log, boolean trace) {
+ this.out = out;
+ }
+ public void characters(char[] ch, int start, int length) {
+ String s = XtpipesUni.toUni(ch, start, length, "<>&");
+ out.print( s );
+ if( !s.trim().equals("") ){
+ delete = false;
+ } }
+ public void startElement(String ns, String sName,
+ String qName,
+ Attributes atts) {
+ if( !( delete && qName.equals("BREAK") ) ){
+ String s = "<" + qName + "\n";
+ for (int i = 0; i < atts.getLength(); i++) {
+ String name = atts.getQName(i);
+ if (name != "xmlns") {
+ s += (" " + name + "=\""
+ + XtpipesUni.toUni(atts.getValue(i), "<>&\"")
+ + "\"");
+ } }
+ if( qName.equals( "BREAK" ) ){
+ s += "/";
+ delete = true;
+ }
+ s += ">";
+ out.print(s);
+ } }
+ public void endElement(String ns, String sName, String qName) {
+ if( !qName.equals( "BREAK" ) ){
+ String s = "</" + qName + ">";
+ out.print(s);
+} } }
+
diff --git a/Build/source/texk/tex4htk/java/OoFilter.java b/Build/source/texk/tex4htk/java/OoFilter.java
new file mode 100755
index 00000000000..976518eaff4
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/OoFilter.java
@@ -0,0 +1,60 @@
+package tex4ht;
+/**********************************************************/
+/* OoFilterImpl.java 2008-02-20-10:22 */
+/* Copyright (C) 2006--2008 Eitan M. Gurari */
+/* */
+/* This work may be distributed and/or modified under the */
+/* conditions of the LaTeX Project Public License, either */
+/* version 1.3 of this license or (at your option) any */
+/* later version. The latest version of this license is */
+/* in */
+/* http://www.latex-project.org/lppl.txt */
+/* and version 1.3 or later is part of all distributions */
+/* of LaTeX version 2003/12/01 or later. */
+/* */
+/* This work has the LPPL maintenance status "maintained".*/
+/* */
+/* This Current Maintainer of this work */
+/* is Eitan M. Gurari. */
+/* */
+/* gurari@cse.ohio-state.edu */
+/* http://www.cse.ohio-state.edu/~gurari */
+/**********************************************************/
+
+
+import org.xml.sax.helpers.*;
+import org.xml.sax.*;
+import java.io.PrintWriter;
+
+public class OoFilter extends XMLFilterImpl {
+ PrintWriter out = null;
+ public OoFilter( PrintWriter out,
+ PrintWriter log, boolean trace ){
+ this.out = out;
+ }
+ public void startElement(String ns, String sName,
+ String qName, Attributes attr) {
+ if( qName.equals( "draw:frame" ) ){
+ String name = attr.getValue("draw:name");
+ if( (name != null)
+ && (attr.getValue("svg:width") == null)
+ && (attr.getValue("svg:hieght") == null)
+ ){
+ java.awt.Image image = new javax.swing.ImageIcon(name).getImage();
+ int width = image.getWidth(null);
+ int height = image.getHeight(null);
+ if( (width>0) && (height>0) ){
+ org.xml.sax.helpers.AttributesImpl attrs =
+ new org.xml.sax.helpers.AttributesImpl( attr );
+ attrs.addAttribute(null, "svg:width", "svg:width",
+ "String", (width * 72 / 110) + "pt");
+ attrs.addAttribute(null, "svg:width", "svg:height",
+ "String", (height * 72 / 110) + "pt");
+ attr = attrs;
+ } } }
+ try{
+ super.startElement(ns, sName, qName, attr);
+ } catch( Exception e ){
+ System.err.println( "--- OoFilter Error 1 --- " + e);
+} } }
+
diff --git a/Build/source/texk/tex4htk/java/OoUtilities.java b/Build/source/texk/tex4htk/java/OoUtilities.java
new file mode 100755
index 00000000000..63fa8195ccb
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/OoUtilities.java
@@ -0,0 +1,243 @@
+package tex4ht;
+/**********************************************************/
+/* OoUtilities.java 2008-02-20-10:22 */
+/* Copyright (C) 2006--2008 Eitan M. Gurari */
+/* */
+/* This work may be distributed and/or modified under the */
+/* conditions of the LaTeX Project Public License, either */
+/* version 1.3 of this license or (at your option) any */
+/* later version. The latest version of this license is */
+/* in */
+/* http://www.latex-project.org/lppl.txt */
+/* and version 1.3 or later is part of all distributions */
+/* of LaTeX version 2003/12/01 or later. */
+/* */
+/* This work has the LPPL maintenance status "maintained".*/
+/* */
+/* This Current Maintainer of this work */
+/* is Eitan M. Gurari. */
+/* */
+/* gurari@cse.ohio-state.edu */
+/* http://www.cse.ohio-state.edu/~gurari */
+/**********************************************************/
+
+
+import org.w3c.dom.*;
+public class OoUtilities {
+ public static void mtable(Node dom) {
+ Node mtr, mtd, d;
+ int cols = 0;
+ Node node = dom.getFirstChild();
+ if (node.hasChildNodes()) {
+ mtr = node.getLastChild();
+ while( mtr != null){
+ if( mtr.getNodeType() == Node.ELEMENT_NODE ){
+ if (mtr.hasChildNodes()) {
+ mtd = mtr.getLastChild();
+ int count = 0;
+ while( mtd != null){
+ if( mtd.getNodeType() == Node.ELEMENT_NODE ){
+ count++;
+ d = mtd.getFirstChild();
+ if( d != null ){
+ boolean remove = true;
+for(Node i=d; i!=null; i=i.getNextSibling() ){
+ if( (i.getNodeType() == Node.ELEMENT_NODE)
+ && !i.getNodeName().equals("math:mspace") ) {
+ remove = false; break;
+} }
+if( remove ){
+ while( d != null ){
+ mtd.removeChild(d);
+ d = mtd.getFirstChild();
+} }
+
+ }
+ if( d != null ){
+ if(
+ (d.getNodeType() == Node.TEXT_NODE)
+ && d.getNodeValue().trim().equals("")
+){
+ d.getParentNode().removeChild(d);
+ d = null;
+}
+
+ } }
+ d = mtd;
+ mtd = mtd.getPreviousSibling();
+ if(
+ (d.getNodeType() == Node.TEXT_NODE)
+ && d.getNodeValue().trim().equals("")
+){
+ d.getParentNode().removeChild(d);
+ d = null;
+}
+
+ if( (d != null)
+ && (d.getNodeType() == Node.ELEMENT_NODE) ){
+ if( (d.getNextSibling()==null)
+ && (d.getFirstChild()==null) ){
+ d.getParentNode().removeChild(d);
+ d = null;
+}
+
+ if( d == null ){ count--; }
+ } }
+ if( count > cols ){ cols = count; }
+ } }
+ d = mtr;
+ mtr = mtr.getPreviousSibling();
+ if(
+ (d.getNodeType() == Node.TEXT_NODE)
+ && d.getNodeValue().trim().equals("")
+){
+ d.getParentNode().removeChild(d);
+ d = null;
+}
+
+ if( d != null ){
+ if( (d.getNextSibling()==null)
+ && (d.getFirstChild()==null) ){
+ d.getParentNode().removeChild(d);
+ d = null;
+}
+
+} } }
+
+ if (node.hasChildNodes()) {
+ mtr = node.getFirstChild();
+ while( mtr != null){
+ if( mtr.getNodeType() == Node.ELEMENT_NODE ){
+ int count = 0;
+ if (mtr.hasChildNodes()) {
+ mtd = mtr.getFirstChild();
+ while( mtd != null){
+ if( mtd.getNodeType() == Node.ELEMENT_NODE ){
+ mtr.insertBefore( ((Document) dom).createTextNode("\n"), mtd );
+
+ count++;
+ }
+ mtd = mtd.getNextSibling();
+ }
+ }
+ if( count < cols ){
+ for(int i = count; i < cols; i++){
+ mtr.appendChild( ((Document) dom).createElement("math:mtd") );
+}
+
+ } }
+ mtr = mtr.getNextSibling();
+} }
+
+}
+
+ public static void table(Node dom) {
+ Node mtr, mtd, d;
+// int cols = 0;
+ Node node = dom.getFirstChild();
+
+ mtr = node.getLastChild();
+while( (mtr != null)
+ && (mtr.getNodeType() == Node.TEXT_NODE)
+ && mtr.getNodeValue().trim().equals("") ){
+ node.removeChild(mtr);
+ mtr = node.getLastChild();
+}
+
+ if( (mtr != null) && (mtr.getPreviousSibling() != null) ){
+ boolean bool = false;
+if( mtr.getNodeName().equals("table:table-row")
+ && mtr.hasAttributes()
+){
+ NamedNodeMap attributes = mtr.getAttributes();
+ Node styleAttr = attributes.getNamedItem( "table:style-name" );
+ String style = (styleAttr==null)? null
+ : styleAttr.getNodeValue();
+ if( (style != null)
+ && ( style.equals("hline-row")
+ || style.equals("cline-row")
+ )
+ ){
+ bool = true;
+} }
+
+ if( !bool ){
+ mtd = mtr.getFirstChild();
+while( mtd != null){
+ d = mtd.getNextSibling();
+ if( justSpace(mtd) ){ mtr.removeChild(mtd); }
+ mtd = d;
+}
+
+
+ mtd = mtr.getFirstChild();
+ if( (mtd != null)
+ && (mtd.getNextSibling() == null)
+ && justSpace(mtd)
+ ){
+ node.removeChild(mtr);
+ } } }
+ int n = 0;
+mtr = node.getFirstChild();
+while( mtr != null ){
+ if(
+ (mtr.getNodeType() == Node.ELEMENT_NODE)
+ &&
+ mtr.getNodeName().equals("table:table-row")
+ ){
+ int m = 0;
+mtd = mtr.getFirstChild();
+while( mtd != null ){
+ if(
+ (mtd.getNodeType() == Node.ELEMENT_NODE)
+ &&
+ mtd.getNodeName().equals("table:table-cell")
+ ){
+ m++;
+ }
+ mtd = mtd.getNextSibling();
+}
+
+ if( m > n ){ n = m; }
+ }
+ mtr = mtr.getNextSibling();
+}
+
+ mtr = node.getFirstChild();
+while( mtr != null ){
+ d = mtr.getNextSibling();
+ if(
+ (mtr.getNodeType() == Node.ELEMENT_NODE)
+ &&
+ mtr.getNodeName().equals("table:table-column")
+ ){
+ n--;
+ if( n < 0 ){
+ mtr.getParentNode().removeChild(mtr);
+ } }
+ mtr = d;
+}
+
+}
+
+ static boolean justSpace(Node node){
+ if( node == null ){ return true; }
+ if( node.getNodeType() == Node.TEXT_NODE ){
+ if( !node.getNodeValue().trim().equals("") ){ return false; }
+ } else {
+ if( node.getNodeType() == Node.ELEMENT_NODE ){
+ String nm = node.getNodeName();
+ if(
+ !nm.equals("table:table-cell")
+ && !nm.equals("text:p")
+ ){
+ return false;
+ } }
+ }
+ if(!justSpace( node.getNextSibling() )){ return false; }
+ if(!justSpace( node.getFirstChild() )){ return false; }
+ return true;
+}
+
+}
+
diff --git a/Build/source/texk/tex4htk/java/OomFilter.java b/Build/source/texk/tex4htk/java/OomFilter.java
new file mode 100755
index 00000000000..4af1c72e61e
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/OomFilter.java
@@ -0,0 +1,62 @@
+package tex4ht;
+/**********************************************************/
+/* OomFilterImpl.java 2008-02-20-10:22 */
+/* Copyright (C) 2006--2008 Eitan M. Gurari */
+/* */
+/* This work may be distributed and/or modified under the */
+/* conditions of the LaTeX Project Public License, either */
+/* version 1.3 of this license or (at your option) any */
+/* later version. The latest version of this license is */
+/* in */
+/* http://www.latex-project.org/lppl.txt */
+/* and version 1.3 or later is part of all distributions */
+/* of LaTeX version 2003/12/01 or later. */
+/* */
+/* This work has the LPPL maintenance status "maintained".*/
+/* */
+/* This Current Maintainer of this work */
+/* is Eitan M. Gurari. */
+/* */
+/* gurari@cse.ohio-state.edu */
+/* http://www.cse.ohio-state.edu/~gurari */
+/**********************************************************/
+
+
+import org.xml.sax.helpers.*;
+import org.xml.sax.*;
+import java.io.PrintWriter;
+
+public class OomFilter extends XMLFilterImpl {
+ PrintWriter out = null;
+ boolean mtext = false;
+ public OomFilter( PrintWriter out,
+ PrintWriter log, boolean trace ){
+ this.out = out;
+ }
+ public void startElement(String ns, String sName,
+ String qName, Attributes attr) {
+ if( qName.equals( "math:mtext" ) ){ mtext = true; }
+ try{
+ super.startElement(ns, sName, qName, attr);
+ } catch( Exception e ){
+ System.err.println( "--- OomFilter Error 1 --- " + e);
+ }
+ }
+ public void endElement(String ns, String sName, String qName){
+ if( qName.equals( "math:mtext" ) ){ mtext = false; }
+ try{
+ super.endElement(ns, sName, qName);
+ } catch( Exception e ){
+ System.err.println( "--- OomFilter Error 2 --- " + e);
+ } }
+ public void characters(char[] ch, int start, int length){
+ try{
+ if ( mtext ) {
+ for(int i = start; i<start+length; i++){
+ if( ch[i] == 160 ){ ch[i] = ' '; }
+ } }
+ super.characters(ch, start, length);
+ } catch( Exception e ){
+ System.out.println( "--- OomFilter Error 3 --- " + e);
+} } }
+
diff --git a/Build/source/texk/tex4htk/java/README b/Build/source/texk/tex4htk/java/README
new file mode 100755
index 00000000000..4f442c72e38
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/README
@@ -0,0 +1 @@
+compile from within src/java with: javac *.java */*.java */*/*.java -d ../../texmf/tex4ht/bin
diff --git a/Build/source/texk/tex4htk/java/xtpipes.java b/Build/source/texk/tex4htk/java/xtpipes.java
new file mode 100755
index 00000000000..6b37e160027
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/xtpipes.java
@@ -0,0 +1,7 @@
+// 2008-01-26-00:38
+import xtpipes.*;
+public class xtpipes {
+ public static void main(String [] args) throws Exception {
+ Xtpipes.main(args);
+} }
+
diff --git a/Build/source/texk/tex4htk/java/xtpipes/FileInfo.java b/Build/source/texk/tex4htk/java/xtpipes/FileInfo.java
new file mode 100755
index 00000000000..f951ec3bdb8
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/xtpipes/FileInfo.java
@@ -0,0 +1,170 @@
+package xtpipes;
+/*
+FileInfo.java (2008-01-26-00:38)
+*/
+import java.io.File;
+import java.io.PrintWriter;
+
+public class FileInfo{
+ static String [] classPaths = null;
+static String [] scriptPaths = null;
+static java.util.HashMap <String,String> registry =
+ new java.util.HashMap <String,String>();
+static String slash = System.getProperty("file.separator");
+static String ii_scriptDir;
+static PrintWriter log;
+static boolean trace;
+
+ public FileInfo(PrintWriter log, String iii_scriptDir, boolean trace){
+ FileInfo.log = log;
+ FileInfo.ii_scriptDir = iii_scriptDir;
+ FileInfo.trace = trace;
+ classPaths = FileInfo.getPaths( System.getProperty("java.class.path") );
+if( iii_scriptDir != null ){
+ scriptPaths = FileInfo.getPaths( iii_scriptDir );
+}
+
+
+ }
+ public static String searchFile( String file ){
+ String key = ((ii_scriptDir == null)? "" : ii_scriptDir )
+ + "!" + file;
+ String result = (String) registry.get( key );
+ if( result == null ){
+ for(int i=0; i<2; i++){
+ if( trace ){
+ log.println( "Searching: " + file );
+ }
+ if( (new File(file)).exists() ){
+ result = ( file.indexOf(slash) == -1 )?
+ (System.getProperty("user.dir") + slash + file)
+ :
+ file;
+ }
+ else {
+ if( ii_scriptDir != null ){
+ int k = scriptPaths.length;
+while( k>0 ){
+ k--;
+ if( trace ){
+ log.println( "Searching: " + file
+ + ", recursively in directory: " + scriptPaths[k] );
+ }
+ result = searchDirectory( new File(scriptPaths[k]), file);
+ if( result != null ){ break; }
+}
+String s = ii_scriptDir + file;
+if( (new File( s )).exists() ){ result = s; }
+
+ }
+ if( result == null ){
+ int k = classPaths.length;
+String toFile = "xtpipes" + slash + "lib" + slash + file;
+while( k>0 ){
+ k--;
+ String s = classPaths[k] + toFile;
+ if( trace ){ log.println( "Searching: " + s ); }
+ if( new File(s).exists() ){ result = s; break; }
+}
+
+ } }
+ if( result != null ){ break; }
+ file = new File(file).getName();
+ }
+ if( result != null ){
+ result = FileInfo.cleanPath(result);
+ registry.put(key, result);
+ }
+ }
+ if( trace ){
+ if( result == null ){
+ log.println(
+ "Directory paths from xtpipes command line option -i: "
+ + ii_scriptDir );
+ } else { log.println( "Found: " + result + "\n" ); }
+ log.flush();
+ }
+ return result;
+}
+
+ static String [] getPaths( String dirs ){
+ String [] paths = null;
+ paths = dirs.split( System.getProperty("path.separator") );
+ int k = paths.length;
+ while( k>0 ){
+ k--;
+ paths[k] = cleanPath( paths[k] );
+
+ int len = paths[k].length();
+ if( (len>1) && (paths[k].lastIndexOf(slash + ".") == (len-1)) ){
+ paths[k] = paths[k].substring(0,len-1);
+ } else if( (len>0) && ((len-1) != paths[k].lastIndexOf( slash )) ){
+ paths[k] += slash;
+ } }
+ return paths;
+}
+
+ public static String cleanPath( String path ){
+ String slash = System.getProperty("file.separator");
+ String userDir = System.getProperty( "user.dir" );
+ if( (path.length() > 0) && (path.charAt(0) == '~') ){
+ if( (path.length() == 1) || (path.charAt(1) != '~') ){
+ path = System.getProperty( "user.home" )
+ + path.substring(1);
+ } }
+
+ if( path.startsWith("..") ){
+ path = userDir.substring(0,
+ Math.max(0,Math.max(
+ userDir.lastIndexOf("/")
+ ,
+ userDir.lastIndexOf("\\")
+ )))
+ + path.substring(2);
+ }
+ if( path.startsWith(".") ){
+ path = userDir + slash + path.substring(1);
+ }
+
+ int i;
+ while(
+ ((i=path.indexOf("/..")) != -1)
+ ||
+ ((i=path.indexOf("\\..")) != -1)
+ ){
+ String s = path.substring(0,i);
+ int j = Math.max(s.lastIndexOf("/"), s.lastIndexOf("\\"));
+ path = path.substring(0,j) + path.substring(i+3);
+ }
+ while(
+ ((i=path.indexOf("/.")) != -1)
+ ||
+ ((i=path.indexOf("\\.")) != -1)
+ ){
+ String s = path.substring(0,i);
+ int j = Math.max(s.indexOf("/"), s.indexOf("\\"));
+ path = path.substring(0,j) + path.substring(i+2);
+ }
+
+ return path;
+}
+
+ static String searchDirectory(File dir, String file) {
+ String result = null;
+ if( dir.isDirectory() ){
+ String [] children = dir.list();
+ for (int i=0; i<children.length; i++) {
+ result = searchDirectory( new File(dir,children[i]), file);
+ if( result != null ) { break; }
+ }
+ } else {
+ String s = dir.toString();
+ if( s.equals(file) || s.endsWith(slash + file) ){
+ result = s;
+ }
+ }
+ return result;
+}
+
+}
+
diff --git a/Build/source/texk/tex4htk/java/xtpipes/InputObject.java b/Build/source/texk/tex4htk/java/xtpipes/InputObject.java
new file mode 100755
index 00000000000..3fc4edbd68c
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/xtpipes/InputObject.java
@@ -0,0 +1,323 @@
+package xtpipes;
+/*
+InputObject.java (2008-01-26-00:38)
+*/
+import java.io.PrintWriter;
+import java.net.URL;
+import java.net.URLConnection;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+
+
+public class InputObject{
+ InputStream inputStream = null;
+URLConnection connection = null;
+String filename = null;
+static PrintWriter log;
+String dtdRoot = null,
+ publicId = null,
+ systemId = null,
+ xtpipes = null,
+ url = null,
+ metaType = null,
+ contentType = null,
+ root = null;
+
+ public InputObject( String filename, PrintWriter log ){
+ InputObject.log = log;
+ filename = filename.trim();
+ try{
+ inputStream = getInputStream(filename);
+ } catch (Exception exp0){
+ if( !filename.startsWith( "http://" ) ){
+ try{
+ String name = "http://" + filename;
+ inputStream = getInputStream( name );
+ filename = name;
+ } catch (Exception exp1){
+ try{
+ String name = FileInfo.cleanPath(filename);
+ inputStream = getInputStream( name );
+ filename = name;
+ } catch (Exception exp2){ inputStream = null; }
+ } } }
+ this.filename = filename;
+}
+public InputObject( byte [] bytes, PrintWriter log ){
+ InputObject.log = log;
+ inputStream = new ByteArrayInputStream( bytes );
+}
+
+ private java.io.InputStream getInputStream(
+ String filename )
+ throws java.io.IOException{
+ if( filename == null ){ return null; }
+ URL url;
+ java.io.InputStream inputStream = null;
+// String loadingError = "Failed to get requested file.";
+ try {
+ url = new File(filename).toURI().toURL();
+ inputStream = getInputStream( url );
+ } catch (Exception ie) {
+ try {
+ url = new URL(filename);
+ inputStream = getInputStream( url );
+ } catch (java.io.FileNotFoundException ife) {
+ throw new java.io.IOException(
+ "File not found: " + filename);
+ } catch (Exception ife) {
+ throw new java.io.IOException(ife + "\n" + ie);
+ } }
+ return inputStream;
+}
+
+ private java.io.InputStream getInputStream( URL url )
+ throws java.io.FileNotFoundException,
+ java.io.IOException {
+ java.io.InputStream inputStream = null;
+ String errMssg = "";
+ try{
+ connection = null;
+ connection = url.openConnection();
+ connection.setRequestProperty("User-Agent",
+ "["
+ + System.getProperty("os.name")
+ + " / "
+ + System.getProperty("os.arch")
+ + "]"
+ + "["
+ + System.getProperty("java.version")
+ + " - "
+ + System.getProperty("java.vendor")
+ + "]"
+
+ );
+ inputStream = connection.getInputStream();
+ } catch(java.io.FileNotFoundException ve){
+ errMssg = "File not found: " + url;
+ throw new java.io.FileNotFoundException(
+ "--- Ml2xml input error --- " + errMssg );
+ } catch (javax.net.ssl.SSLHandshakeException ve){
+ errMssg = "SSL Handshake Exception: " + ve.getMessage();
+ throw new javax.net.ssl.SSLHandshakeException(
+ "--- Ml2xml input error --- " + errMssg );
+ } catch (java.net.UnknownHostException ve){
+ errMssg = "Unknown Host Exception: " + ve.getMessage();
+ throw new java.net.UnknownHostException(
+ "--- Ml2xml input error --- " + errMssg );
+ }
+ return inputStream;
+}
+
+ public void buildProfile( boolean trace ){
+ if( trace ){
+ log.println(
+ "xtpipes (2008-01-26-00:38)"
+ + "\n java.version: " + System.getProperty("java.version")
+ + "\n java.class.path: " + System.getProperty("java.class.path")
+ + "\n os.name: " + System.getProperty("os.name")
+ + "\n user.home: " + System.getProperty("user.home")
+ + "\n user.dir: " + System.getProperty("user.dir")
+ );
+ }
+ if( connection != null ){
+ contentType = connection . getContentType();
+url = connection . getURL() . toString();
+
+ }
+ int max = 8192;
+int buffSize = 4096;
+byte [] buff = new byte [ buffSize ];
+int m = 0;
+int length = 0;
+int ch;
+int type = 0
+;
+String token = null;
+while( m < max ){
+ try{
+ int k = Math.min( max - m, buffSize );
+ length = inputStream.read( buff, 0, k );
+ if( length == -1 ){ break; }
+ if( length == 0 ){ continue; }
+ } catch (java.io.IOException e){
+ System.err.println( "--- xtpipes error --- : " + e );
+ break;
+ }
+ for(int i = 0 ; i < length; i++ ){
+ switch( ch = buff[i] ){
+ case '<': token = "";
+ type = 1
+;
+ break;
+ case '>': if( token != null ){
+ token = token . replaceAll( "\\s+", " ");
+ if( type == 9
+ ){
+ if( xtpipes == null ){
+ int n = token.length();
+ if( (n > 1) && (token.charAt( n - 1 ) == '?')
+ && (token.startsWith("xtpipes") ) ){
+ String s = token . substring(7,n-1) . replaceAll( "\\s+", "");
+ n = s.length();
+ if( (n>6) && (s.startsWith("file="))
+ && (s.charAt(5) == s.charAt(n-1)) ){
+ xtpipes = s.substring(6,n-1);
+ } } }
+} else if( type == 11
+ ){
+ if( metaType == null ){
+ token = token . replaceAll( "\\s+", "");
+ int k = token.indexOf("http-equiv");
+ int n = token.indexOf("content");
+ if( (k != -1) && (n != -1) ){
+ if( token.length() > (Math.max(k,n)+3) ){
+ if( token.substring(k+12).startsWith("Content-Type") ){
+ token = token.substring(n+9);
+ n = token.indexOf(";");
+ if( n !=-1 ){ metaType = token.substring(0,n); }
+ } } } }
+} else if( (type == 2
+) && (root == null) ){
+ root = token;
+}
+
+ token = null;
+ }
+ break;
+ case '\n':
+ case ' ': if( token != null ){
+ if( type == 2
+ ){
+ if( token.equals("meta") ){
+ if( metaType == null ){
+ type = 11
+;
+ token = " ";
+ } else {
+ token = null;
+ }
+ } else {
+ if( root == null ){
+ root = token;
+ }
+ token = null;
+ }
+} else if( type == 4
+ ){
+ if( token.equals("DOCTYPE") ){
+ type = 5
+;
+ token = " ";
+ } else { token = null; }
+} else if( type == 5
+ ){
+ if( !token.trim().equals("") ){
+ dtdRoot = token.trim();
+ token = " ";
+ type = 6
+;
+ } else { token = null; }
+} else if( type == 6
+ ){
+ if( !token.trim().equals("") ){
+ token = token.trim();
+ if( token.equals("PUBLIC") ){
+ type = 7
+;
+ token = "";
+ } else if( token.equals("SYSTEM") ){
+ type = 8
+;
+ token = "";
+ } else { token = null; }
+ }
+} else { token += ' '; }
+
+ }
+ break;
+ case '"':
+ case '\'': if( token == null ){ break; }
+ if( !token.trim().equals("") ){
+ if( token.trim().charAt(0) == ch ){
+ if( type == 7
+ ){
+ publicId = token.trim().substring(1);
+ type = 8
+;
+ token = "";
+ break;
+ }
+ else if( type == 8
+ ){
+ systemId = token.trim().substring(1);
+ token = null;
+ break;
+ }
+} }
+
+ default: if( token != null ){
+ if( type == 3
+ ){
+ if( ch == 'D' ){
+ type = 4
+;
+ token += (char) ch;
+ } else { token = null; type = 0
+; }
+ }
+ else
+ if( token.equals("") && (type == 1
+) ){
+ switch( ch ){
+ case '!': type = 3
+;
+ break;
+ case '?': type = 9
+ ;
+ break;
+ default: if( Character.isLetter(ch)
+ && ((root == null) || (metaType == null)) ){
+ type = 2
+;
+ token += (char) ch;
+ } else { token = null; }
+}
+
+ } else { token += (char) ch; }
+} }
+
+ m++;
+} }
+
+ if( trace ){
+ log.println(
+ " url = " + url
+ + "\n contentType = " + contentType
+ + "\n publicId = " + publicId
+ + "\n systemId = " + systemId
+ + "\n xtpipes = " + xtpipes
+ + "\n root = " + root
+ + "\n dtdRoot = " + dtdRoot
+ );
+} }
+
+ public InputStream getInputStream(){ return inputStream; }
+ public String getFilename(){
+ return (url == null)?
+ ( (connection == null)? filename
+ :
+ connection . getURL() . toString()
+ )
+ : url;
+ }
+ public String getContentType(){ return contentType; }
+ public String getMetaType(){ return metaType; }
+ public String getPublicId(){ return publicId; }
+ public String getSystemId(){ return systemId; }
+ public String getXtpipes(){ return xtpipes; }
+ public String getRoot(){ return root; }
+ public String getDtdRoot(){ return dtdRoot; }
+}
+
diff --git a/Build/source/texk/tex4htk/java/xtpipes/Xtpipes.java b/Build/source/texk/tex4htk/java/xtpipes/Xtpipes.java
new file mode 100755
index 00000000000..3efc2344c34
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/xtpipes/Xtpipes.java
@@ -0,0 +1,1472 @@
+package xtpipes;
+/*
+Xtpipes.java (2008-01-26-00:38)
+*/
+// import xtpipes.util.InputObject;
+// import xtpipes.util.FileInfo;
+import java.net.URLConnection;
+import java.io.*;
+import java.lang.reflect.*;
+import java.util.HashMap;
+import java.util.Stack;
+import javax.xml.parsers.*;
+import javax.xml.transform.*;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.*;
+import org.w3c.dom.*;
+import org.xml.sax.*;
+import org.xml.sax.helpers.*;
+import java.net.URL;
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+
+class XtpipesPrintWriter extends PrintWriter {
+ public XtpipesPrintWriter() {
+ super(System.out, true);
+ }
+ public XtpipesPrintWriter (PrintStream ps, boolean b){
+ super(ps, b);
+ }
+ public XtpipesPrintWriter (OutputStream ps, boolean b){
+ super(ps, b);
+ }
+ public XtpipesPrintWriter (FileWriter fw){
+ super(fw);
+ }
+ public void print(String str) {
+ super.print( XtpipesUni.toUni(str, "") );
+ }
+ public void println(String str) {
+ super.println( XtpipesUni.toUni(str, "") );
+} }
+
+public class Xtpipes {
+ private static HashMap <String,Object> map;
+private static boolean needScript;
+private static boolean returnDom;
+private static String result;
+static PrintWriter logWriter = new PrintWriter( System.err );
+private static String inFile,
+ inData;
+private static boolean exceptionErrs, messages;
+public static InputObject inputObject;
+private static String outFileName;
+private static PrintWriter outPrintWriter;
+private static boolean returnToFile = false;
+public static String scriptFile;
+private static String scriptMap;
+static String i_scriptDir;
+private static TransformerFactory fc;
+private static Transformer identityTransformer;
+private static SAXParserFactory saxFactory;
+private static DocumentBuilder domBuilder;
+private static Stack <XMLReader> saxReaderStack;
+private static Method method;
+private static String rootName;
+static boolean trace;
+private static String [] ml2xml = null;
+static Class<?> ml2xmlClassObj = null;
+public static String errMssg;
+
+ public static void main(String args[]) throws Exception {
+ map = new HashMap <String,Object> ();
+needScript = true;
+returnDom = false;
+result = null;
+inFile = null;
+inData = null;
+exceptionErrs = false;
+messages = false;
+outFileName = null;
+outPrintWriter = null;
+scriptFile = null;
+i_scriptDir = null;
+scriptMap = null;
+saxReaderStack = new Stack <XMLReader> ();
+rootName = null;
+trace = false;
+
+ mainMethod(args);
+}
+
+ public static void xtpipes(String [] args,
+ OutputStream out,
+ PrintWriter log)
+ throws Exception {
+ map = new HashMap <String,Object> ();
+needScript = true;
+returnDom = false;
+result = null;
+inFile = null;
+inData = null;
+exceptionErrs = false;
+messages = false;
+outFileName = null;
+outPrintWriter = null;
+scriptFile = null;
+i_scriptDir = null;
+scriptMap = null;
+saxReaderStack = new Stack <XMLReader> ();
+rootName = null;
+trace = false;
+
+ outPrintWriter = new XtpipesPrintWriter( out, true );
+ logWriter = (log==null)? (new PrintWriter( System.err )) : log;
+ mainMethod(args);
+ outPrintWriter.flush();
+}
+
+ public static Document getDOM(String args[])
+ throws Exception {
+ map = new HashMap <String,Object> ();
+needScript = true;
+returnDom = false;
+result = null;
+inFile = null;
+inData = null;
+exceptionErrs = false;
+messages = false;
+outFileName = null;
+outPrintWriter = null;
+scriptFile = null;
+i_scriptDir = null;
+scriptMap = null;
+saxReaderStack = new Stack <XMLReader> ();
+rootName = null;
+trace = false;
+
+ returnDom = true;
+ mainMethod(args);
+ Document dom = null;
+ if( result == null ){
+ System.err.println(
+ "--- xtpipes warning --- getDOM without <return name=\"...\"> from 4xt file: "
+ + scriptFile );
+ } else {
+ try{
+ byte [] bytes = result.getBytes("UTF-8");
+ InputStream is = new ByteArrayInputStream( bytes );
+ dom = domBuilder.parse (is);
+ } catch ( org.xml.sax.SAXParseException e ){
+ if( Xtpipes.trace ){
+ Xtpipes.logWriter.println(
+ "\n---------------------------------------------------\n"
+ + result +
+ "\n---------------------------------------------------\n" );
+ }
+ String s = "";
+ for( int n=0; n<args.length; n++ ){
+ if( args[n].charAt(0)!='-' ){
+ s += " input file: " + args[n] + "."; break;
+ }
+ else if( args[n].equals("-s")
+ || args[n].equals("-S")
+ || args[n].equals("-i")
+ || args[n].equals("-o")
+ || args[n].equals("-d") ){ n++; }
+}
+
+ if( scriptFile != null ){ s += " script file: " + scriptFile; }
+ instructionErr( null,
+ "parsing error: " + e.getMessage() +s, 21 );
+ } catch ( Exception e ){
+ instructionErr( null, e.toString(), 5 );
+ }
+ if( ml2xmlClassObj != null ){
+ Class<?> [] argTypes = { };
+ Method m = ml2xmlClassObj.getMethod( "closeFiles", argTypes );
+ Object parmValues[] = new Object[0];
+ m.invoke( null, parmValues );
+}
+
+ }
+ return dom;
+}
+public static Document getDOM(String s, String args[])
+ throws Exception {
+ map = new HashMap <String,Object> ();
+needScript = true;
+returnDom = false;
+result = null;
+inFile = null;
+inData = null;
+exceptionErrs = false;
+messages = false;
+outFileName = null;
+outPrintWriter = null;
+scriptFile = null;
+i_scriptDir = null;
+scriptMap = null;
+saxReaderStack = new Stack <XMLReader> ();
+rootName = null;
+trace = false;
+
+ returnDom = true;
+ inData = s;
+ mainMethod(args);
+ Document dom = null;
+ if( result == null ){
+ System.err.println(
+ "--- xtpipes warning --- getDOM without"
+ + " <return name=\"...\"> from 4xt file: "
+ + scriptFile );
+ } else {
+ try{
+ byte [] bytes = result.getBytes("UTF-8");
+ InputStream is = new ByteArrayInputStream( bytes );
+ dom = domBuilder.parse (is);
+ } catch ( org.xml.sax.SAXParseException e ){
+ instructionErr( null, "improper xml: " + e.getMessage()
+ + "\n code starts with: "
+ + result.substring(0, Math.min(100,result.length()))
+ , 17 );
+ } catch ( Exception e ){
+ instructionErr( null, e.toString(), 6 );
+ }
+ if( ml2xmlClassObj != null ){
+ Class<?> [] argTypes = { };
+ Method m = ml2xmlClassObj.getMethod( "closeFiles", argTypes );
+ Object parmValues[] = new Object[0];
+ m.invoke( null, parmValues );
+}
+
+ }
+ return dom;
+}
+public static Document getDOM(String args[], PrintWriter log)
+ throws Exception {
+ logWriter = (log==null)? new PrintWriter( System.err ) : log;
+ return getDOM(args);
+}
+public static Document getDOM(String s, String args[], PrintWriter log)
+ throws Exception {
+ logWriter = (log==null)? (new PrintWriter( System.err )) : log;
+ return getDOM(s, args);
+}
+
+ private static void mainMethod(String args[]) throws Exception {
+ try{
+ String xtpipes_call =
+ " xtpipes (2008-01-26-00:38)"
+ + "\n Command line options: "
+ + "\n java xtpipes [-trace] [-help] [-m] [-E] [-s script_file]"
+ + " [-S script_map]"
+ + "\n [-i script_dir] [-o out_file] "
+ + "\n [-x...ml2xml_arg...] "
+ + "(-d in_data | in_file)"
+ + "\n -m messages printing mode"
+ + "\n -E error messages into exception calls"
+ + "\n in_data XML data directly into the command line\n"
+;
+
+ boolean help=false;
+for( int n=0; n<args.length; n++ ){
+ if( args[n] == null ){}
+else if( args[n].equals("") ){}
+else if( args[n].charAt(0)!='-' ){ inFile = args[n]; }
+else if( args[n].equals("-m") ){
+ messages = true;
+ logWriter.println(
+ "xtpipes (2008-01-26-00:38)"
+ + "\n java.version: " + System.getProperty("java.version")
+ + "\n java.class.path: " + System.getProperty("java.class.path")
+ + "\n os.name: " + System.getProperty("os.name")
+ + "\n user.home: " + System.getProperty("user.home")
+ + "\n user.dir: " + System.getProperty("user.dir")
+);
+for( int k=0; k<args.length; k++ ){
+ logWriter.println( " " + args[k] );
+}
+
+}
+else if( args[n].equals("-s") ){
+ n++;
+if( n < args.length ){ scriptFile=args[n]; }
+else {
+ System.err.println(
+ "--- Error --- Missing field for -s argument" );
+ inFile = null; inData = null; break;
+}
+
+}
+else if( args[n].equals("-S") ){
+ n++;
+if( n < args.length ){ scriptMap=args[n]; }
+else {
+ System.err.println(
+ "--- Error --- Missing field for -S argument" );
+ inFile = null; inData = null; break;
+}
+
+}
+else if( args[n].equals("-i") ){
+ n++;
+if( n < args.length ){
+ i_scriptDir=args[n];
+} else {
+ System.err.println(
+ "--- Error --- Missing field for -i argument" );
+ inFile = null; inData = null; break;
+}
+
+}
+else if( args[n].equals("-o") ){
+ n++;
+if( n < args.length ){
+ outFileName = args[n];
+} else {
+ System.err.println(
+ "--- Error --- Missing field for -o argument" );
+ inFile = null; inData = null; break;
+}
+
+}
+else if( args[n].startsWith("-x") ){
+ if( args[n].substring(2).equals("") ){
+ if( ml2xml == null ){ ml2xml = new String[0]; }
+} else {
+ if( ml2xml == null ){
+ ml2xml = new String[1];
+ } else {
+ String [] m2x = new String [ml2xml.length + 1];
+ for(int cnt=0; cnt < ml2xml.length; cnt++){
+ m2x[cnt] = ml2xml[cnt];
+ }
+ ml2xml = m2x;
+ }
+ ml2xml[ ml2xml.length - 1 ] = args[n].substring(2);
+}
+
+}
+else if( args[n].equals("-E") ){
+ exceptionErrs = true;
+}
+else if( args[n].equals("-d") ){
+ n++;
+if( n < args.length ){
+ inData = args[n];
+} else {
+ System.err.println(
+ "--- Error --- Missing field for -d argument" );
+ inFile = null; inData = null; break;
+}
+
+}
+else if( args[n].equals("-trace") ){ trace=true; }
+else if( args[n].equals("-help") ){ help=true; }
+else { if( !exceptionErrs ){
+ for(int i=n+1; i<args.length; i++ ){
+ if( args[i].equals("-E") ){ exceptionErrs = true; }
+} }
+instructionErr( null,
+ "Improper argument: " + args[n] + "\n" + xtpipes_call, 26 );
+ }
+
+}
+if( outPrintWriter == null ){
+ outPrintWriter = new XtpipesPrintWriter(System.out,true);
+}
+
+if( !returnDom ){
+ if( help || ((inFile == null) && (inData == null)) ){
+ System.err.println( xtpipes_call );
+
+ if( (inFile == null) && (inData == null) ){
+ System.exit(0);
+} } }
+
+new FileInfo(logWriter, i_scriptDir, trace);
+if( inFile != null ){
+ inputObject = new InputObject( inFile, logWriter );
+ if( inputObject.getInputStream() == null ){
+ instructionErr( null, "Could not find or open file: " + inFile, 28 );
+ }
+ inFile = inputObject.getFilename();
+} else {
+ inputObject = new InputObject( inData.getBytes("UTF-8"), logWriter );
+}
+inputObject.buildProfile( trace );
+
+ } catch (Exception e){
+ instructionErr( null, e.getMessage(), e.getStackTrace(), 31 );
+ }
+ try {
+ DocumentBuilderFactory domFactory =
+ DocumentBuilderFactory.newInstance();
+ domFactory.setValidating(true);
+ DocumentBuilder validatingDomBuilder =
+ domFactory.newDocumentBuilder();
+ validatingDomBuilder.setEntityResolver(new XtpipesEntityResolver()
+);
+ validatingDomBuilder.setErrorHandler(new ErrorHandler() {
+ public void warning(SAXParseException e) throws SAXParseException {
+ showSpecifics("warning",e);
+ }
+ public void error(SAXParseException e) throws SAXParseException {
+ showSpecifics("error",e);
+ }
+ public void fatalError(SAXParseException e) throws SAXParseException {
+ showSpecifics("fatal error",e);
+ }
+ public void showSpecifics(String s, SAXParseException e)
+ throws SAXParseException {
+ String err = "--- xtpipes " + s + " 24 --- " + e.getSystemId()
+ + " line " + e.getLineNumber()
+ + " col " + e.getColumnNumber()
+ + " : " + e.getMessage() ;
+ if( exceptionErrs ) { throw new SAXParseException(
+ err, (org.xml.sax.Locator) null ); }
+ else {
+ System.err.println( err );
+ System.exit(1);
+} } }
+);
+ fc = TransformerFactory.newInstance();
+identityTransformer = fc.newTransformer();
+identityTransformer.setErrorListener(
+ new ErrorListener() {
+ public void warning(TransformerException e) throws TransformerException {
+ showSpecifics(e);
+ }
+ public void error(TransformerException e) throws TransformerException {
+ showSpecifics(e);
+ }
+ public void fatalError(TransformerException e) throws TransformerException {
+ showSpecifics(e);
+ }
+ void showSpecifics(TransformerException e)
+ throws TransformerException{
+ String err = e.getMessage() ;
+ String loc = e.getLocationAsString();
+ if( loc != null ){ err = loc + ": " + err; }
+ throw new TransformerException(err);
+} }
+ );
+saxFactory = SAXParserFactory.newInstance();
+saxFactory.setValidating(true);
+domFactory.setValidating(false);
+domBuilder = domFactory.newDocumentBuilder();
+saxFactory = SAXParserFactory.newInstance();
+saxFactory.setValidating(false);
+Class <?> cls = Xtpipes.class;
+Class<?> [] argTypes = { Node.class, String.class };
+method = cls.getMethod( "execute", argTypes );
+
+ if( scriptMap != null ){
+ try{
+ String f = FileInfo.searchFile( scriptMap );
+ if( f == null ){
+ throw new java.io.FileNotFoundException( scriptMap );
+ } else {
+ scriptMap = f;
+ }
+ XMLReader saxReader;
+if( saxReaderStack.empty() ){
+ SAXParser saxParser = saxFactory.newSAXParser();
+ saxReader = saxParser.getXMLReader();
+ saxReader.setEntityResolver(new org.xml.sax.EntityResolver() {
+ public InputSource resolveEntity(
+ String publicId, String systemId) {
+ if( (new File(systemId)).exists() ){
+ return new org.xml.sax.InputSource( systemId );
+ }
+ StringReader strReader = new StringReader("");
+ return new org.xml.sax.InputSource(strReader);
+ }
+});
+
+} else {
+ saxReader = (XMLReader) saxReaderStack.pop();
+}
+
+ saxReader.setContentHandler( new DefaultHandler(){
+ private Stack <Boolean> condition = new Stack <Boolean> ();
+public void startDocument () {
+ condition.push( new Boolean(true) );
+}
+public void startElement(String ns, String sName,
+ String qName, Attributes atts) {
+ if( condition == null ){ return; }
+ if( Xtpipes.trace ){
+ String s = "<" + qName + "\n";
+ for(int i=0; i<atts.getLength(); i++ ){
+ String name = atts.getQName(i);
+ s += " " + name + "=\"" + atts.getValue(i) + "\"";
+ }
+ s += ">" ;
+ Xtpipes.logWriter.println( s );
+}
+
+ boolean cond = ((Boolean) condition.peek()).booleanValue();
+ if( qName.equals("when") ){
+ if( cond ){ String name = atts.getValue("name");
+String value = atts.getValue("value");
+if( name.equals("system-id") ){
+ cond = value.equals(inputObject.getSystemId());
+}
+else
+if( name.equals("public-id") ){
+ cond = value.equals(inputObject.getPublicId());
+}
+else
+if( name.equals("dtd-root") ){
+ cond = value.equals(inputObject.getDtdRoot());
+}
+else
+if( name.equals("root") ){
+ cond = value.equals(inputObject.getRoot());
+}
+else
+if( name.equals("ext") ){
+ cond = inputObject.getFilename().endsWith("." + value);
+}
+else
+if( name.equals("prefix") ){
+ name = inputObject.getFilename();
+ if( name != null ){
+ int i = name.lastIndexOf('/');
+ if( (i != -1) && ((i+1) < name.length()) ){
+ name = name.substring(i+1);
+ }
+ i = name.lastIndexOf('\\');
+ if( (i != -1) && ((i+1) < name.length()) ){
+ name = name.substring(i+1);
+ }
+ cond = name.startsWith(value);
+} }
+else
+if( name.equals("meta-type") ){
+ cond = value.equals(inputObject.getMetaType());
+}
+else
+if( name.equals("content-type") ){
+ cond = value.equals(inputObject.getContentType());
+}
+ }
+ }
+ else
+ if( qName.equals("command-line") ){
+ if( scriptFile != null ){
+ if( trace ){
+ Xtpipes.logWriter.println( " Found script file in map: "
+ + Xtpipes.scriptFile );
+}
+
+ condition = null;
+ return;
+ } }
+ else
+ if( qName.equals("processing-instruction") ){
+ if( cond ){
+ String s = inputObject.getXtpipes();
+ if( s != null ){
+ Xtpipes.scriptFile = s;
+ if( trace ){
+ Xtpipes.logWriter.println( " Found script file in map: "
+ + Xtpipes.scriptFile );
+}
+
+ condition = null;
+ return;
+ } } }
+ else
+ if( qName.equals("select") ){
+ if( cond ){
+ Xtpipes.scriptFile = atts.getValue("name");
+ if( trace ){
+ Xtpipes.logWriter.println( " Found script file in map: "
+ + Xtpipes.scriptFile );
+}
+
+ condition = null;
+ return;
+ } }
+ condition.push( new Boolean(cond) );
+}
+public void endElement(String ns, String sName, String qName) {
+ if( condition == null ){ return; }
+ if( Xtpipes.trace ){
+ String s = "</" + qName + ">";
+ Xtpipes.logWriter.println( s );
+}
+
+ condition.pop();
+}
+
+ } );
+ InputStream inputStream =
+ (InputStream) (new File(scriptMap).toURI().toURL().openStream());
+ saxReader.parse( new InputSource(inputStream) );
+ saxReaderStack.push( saxReader );
+ } catch( java.io.FileNotFoundException e ){
+ instructionErr( null,
+ "File not found: " + e.getMessage()
+ + "; command line option -i",
+ 33 );
+ } catch( Exception e ){
+ instructionErr( null, e.toString(), e.getStackTrace(), 27 );
+ }
+}
+if( scriptFile == null ){
+ scriptFile = "xtpipes-default.4xt";
+}
+
+ while( needScript ){
+ if( scriptFile == null ){
+ instructionErr( null, "Missing 4xt script file name", 32 );
+ }
+ String f = FileInfo.searchFile( scriptFile );
+if( f == null ){
+ throw new java.io.FileNotFoundException( scriptFile );
+} else {
+ scriptFile = f;
+}
+
+ Document script = validatingDomBuilder.parse(scriptFile);
+ if( trace ){
+ logWriter.println( "(" + scriptFile + ")" );
+}
+
+ execute( script.getFirstChild() );
+ }
+ if( outFileName != null ){
+ outPrintWriter.close();
+}
+
+ Xtpipes.logWriter.flush();
+ } catch( org.xml.sax.SAXParseException e ){
+ String s = "Improper file " + scriptFile + ": " + e.getMessage();
+ instructionErr( null, s, 2 );
+ } catch( java.io.FileNotFoundException e ){
+ String s;
+ if( scriptFile.equals( e.getMessage() ) ){
+ s = "Could not find file: " + scriptFile;
+ } else {
+ s = "Problem at script " + scriptFile + ": Could not find file "
+ + e.getMessage();
+ }
+ instructionErr( null, s, 3 );
+ } catch( Exception e ){
+ String s = "Problems at file: " + scriptFile + "\n " + e;
+ instructionErr( null, s, 4 );
+} }
+
+ private static void execute( Node node ) throws Exception {
+ while( node != null ){
+ if( node.getNodeType()==Node.ELEMENT_NODE ){
+ String instruction = node.getNodeName();
+ if( trace ){
+ logWriter.print( "[##] = xtpipes => " + instruction );
+ if( node.hasAttributes() ){
+ NamedNodeMap attributes = node.getAttributes();
+ for(int i=0; i < attributes.getLength(); i++ ){
+ Node attr = attributes.item(i);
+ logWriter.print( " " + attr.getNodeName()
+ + "=\"" + attr.getNodeValue() + "\"" );
+ } }
+ logWriter.println(); logWriter.flush();
+}
+
+ if( instruction.equals( "xtpipes" ) ){
+ // String errMsg = "";
+needScript = false;
+if( node.hasChildNodes() ){
+ if( outFileName != null ){
+ try {
+ FileWriter fw = new FileWriter( outFileName );
+ outPrintWriter = new XtpipesPrintWriter( fw );
+ returnToFile = true;
+ } catch(Exception e){
+ instructionErr( null, e.toString(), 12 );
+} }
+
+ if( node.hasAttributes() ){
+ Node attr = node.getAttributes()
+ .getNamedItem( "signature" );
+ if ( (attr != null) && messages ) {
+ logWriter.println( attr.getNodeValue() );
+}
+
+ attr = node.getAttributes()
+ .getNamedItem( "preamble" );
+ if( (attr != null)
+ && attr.getNodeValue().equals( "yes" ) ){
+ // BufferedReader br = null;
+try {
+ String s;
+ boolean front = true;
+ rootName = "<" + ((rootName==null)? inputObject.getRoot() : rootName);
+ if( inData == null ){
+ // FileReader fr = new FileReader(inFile);
+// BufferedReader in = new BufferedReader(fr);
+URLConnection connection =
+ new URL(inFile).openConnection();
+connection.setRequestProperty("User-Agent",
+ "["
+ + System.getProperty("os.name")
+ + " / "
+ + System.getProperty("os.arch")
+ + "]"
+ + "["
+ + System.getProperty("java.version")
+ + " - "
+ + System.getProperty("java.vendor")
+ + "]"
+);
+InputStream inputStream = connection.getInputStream();
+BufferedReader in = new BufferedReader (
+ new InputStreamReader ( inputStream ) );
+
+while ( ((s = in.readLine()) != null) && front ) {
+ int i = s.indexOf( rootName );
+ if( i > -1 ){
+ front = false;
+ s = s.substring(0,i);
+ }
+ outPrintWriter.println(s);
+ returnToFile = false;
+}
+in.close();
+
+ } else {
+ int i = inData.indexOf( rootName );
+if( i > -1 ){
+ front = false;
+ s = inData.substring(0,i);
+} else { s = ""; }
+outPrintWriter.println(s);
+returnToFile = false;
+
+ }
+} catch (Exception e) {
+ System.err.println(
+ "--- Error --- Couldn't copy preamble: " + e);
+}
+
+} }
+
+ execute( node.getFirstChild() );
+} else {
+ if( inData == null ){
+ /*
+errMsg = "Searching <?xtpipes file=\"...\"?> in "
+ + inFile + ": ";
+*/
+scriptFile = inputObject.getXtpipes();
+rootName = inputObject.getRoot();
+needScript = true;
+
+} else {
+ scriptFile = inputObject.getXtpipes();
+rootName = inputObject.getRoot();
+needScript = true;
+
+}
+
+}
+
+ } else if( instruction.equals( "set" ) ){
+ String name = node.getAttributes().getNamedItem( "name" )
+ .getNodeValue();
+Node cdata = node.getFirstChild();
+while( cdata.getNodeType() != Node.CDATA_SECTION_NODE ){
+ cdata = cdata.getNextSibling();
+}
+String code = cdata.getNodeValue().trim();
+map.put( name, (Object) code );
+
+ } else if( instruction.equals( "get" ) ){
+ try {
+ String name = node.getAttributes()
+ .getNamedItem( "name" ).getNodeValue();
+ String file = node.getAttributes()
+ .getNamedItem( "file" ).getNodeValue();
+ StreamSource in = new StreamSource( new File(file) );
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ identityTransformer.transform( in, new StreamResult(baos) );
+ byte [] bytes = baos.toByteArray();
+ map.put( name, (Object) new String(bytes) );
+} catch( Exception e ){
+ instructionErr( node, e.toString(), 14 );
+}
+
+ } else if( instruction.equals( "print" ) ){
+ String name = node.getAttributes()
+ .getNamedItem( "name" ).getNodeValue();
+String xml = (String) map.get(name);
+if( node.getAttributes().getNamedItem( "file" )==null ){
+ if( !Xtpipes.trace ){
+ logWriter.println( "[##] = xtpipes => print: " + scriptFile );
+ }
+ logWriter.println( XtpipesUni.toUni(xml, "") );
+} else {
+ String file = node.getAttributes()
+ .getNamedItem( "file" ).getNodeValue();
+ try{
+ FileWriter fw = new FileWriter( file );
+ XtpipesPrintWriter out = new XtpipesPrintWriter( fw );
+ out.println( xml );
+ out.close();
+ } catch(Exception e){
+ instructionErr( node, e.toString(),15 );
+} }
+
+ } else if( instruction.equals( "return" ) ){
+ String name = node.getAttributes()
+ .getNamedItem( "name" ).getNodeValue();
+result = (String) map.get(name);
+if( returnToFile ){
+ outPrintWriter.println(result);
+}
+
+ } else if( instruction.equals( "if" ) ){
+ try{
+ String xml = node.getAttributes()
+ .getNamedItem( "xml" ).getNodeValue();
+String dtd = node.getAttributes()
+ .getNamedItem( "dtd" ).getNodeValue();
+// String root = node.getAttributes()
+// .getNamedItem( "root" ).getNodeValue();
+String doc = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
+ + "<!DOCTYPE doc [\n"
+ + (String) map.get(dtd)
+ + "\n]>\n"
+ + (String) map.get(xml) ;
+
+ byte [] bytes = doc.getBytes("UTF-8");
+ ByteArrayInputStream bais = new ByteArrayInputStream( bytes );
+ InputSource in = new InputSource( bais );
+ SAXParser saxParser = saxFactory.newSAXParser();
+ XMLReader xmlReader = saxParser.getXMLReader();
+ xmlReader.parse( in );
+ if( trace ){
+ logWriter.print( "--> true" );
+}
+
+ execute( node.getFirstChild() );
+} catch ( Exception e ){ if( trace ){
+ logWriter.print( "--> true" );
+}
+ }
+
+ } else if( instruction.equals( "xslt" ) ){
+ try{
+ Node xmlNode = node.getAttributes().getNamedItem( "xml" );
+StreamSource inDoc = null;
+String xml;
+if( xmlNode == null ){
+ if( inData == null ){
+ inDoc = new StreamSource( new File(inFile) );
+} else {
+ byte [] bytes = inData.getBytes("UTF-8");
+ ByteArrayInputStream bais = new ByteArrayInputStream( bytes );
+ inDoc = new StreamSource( bais );
+}
+
+} else {
+ xml = xmlNode.getNodeValue();
+ String doc = (String) map.get(xml);
+ if( doc!=null ){
+ byte [] bytes = doc.getBytes("UTF-8");
+ ByteArrayInputStream bais = new ByteArrayInputStream( bytes );
+ inDoc = new StreamSource( bais );
+} }
+
+ String xslt = node.getAttributes()
+ .getNamedItem( "xsl" ).getNodeValue();
+String templates = (String) map.get(xslt);
+byte [] bytes = templates.getBytes("UTF-8");
+ByteArrayInputStream bais = new ByteArrayInputStream( bytes );
+StreamSource inXslt = new StreamSource( bais );
+
+ Node nameNode = node.getAttributes().getNamedItem("name");
+StreamResult outDoc;
+CharArrayWriter caos = null;
+if( nameNode == null ){
+ outDoc = new StreamResult(outPrintWriter);
+ returnToFile = false;
+} else {
+ caos = new CharArrayWriter();
+ outDoc = new StreamResult(caos);
+}
+
+ errMssg = null;
+ fc.setErrorListener( new ErrorListener() {
+ public void warning(TransformerException e) throws TransformerException {
+ showSpecifics(e);
+ }
+ public void error(TransformerException e) throws TransformerException {
+ showSpecifics(e);
+ }
+ public void fatalError(TransformerException e) throws TransformerException {
+ showSpecifics(e);
+ }
+ void showSpecifics(TransformerException e)
+ throws TransformerException{
+ String err = e.getMessage() ;
+ String loc = e.getLocationAsString();
+ if( loc != null ){ err = loc + ": " + err; }
+ err = "XSL stylesheet problem: " + err;
+ if( errMssg == null ){ errMssg = err; }
+ throw new TransformerException(err);
+} }
+ );
+ Transformer transformer = fc.newTransformer( inXslt );
+ transformer.setErrorListener( new ErrorListener() {
+ public void warning(TransformerException e) throws TransformerException {
+ showSpecifics(e);
+ }
+ public void error(TransformerException e) throws TransformerException {
+ showSpecifics(e);
+ }
+ public void fatalError(TransformerException e) throws TransformerException {
+ showSpecifics(e);
+ }
+ void showSpecifics(TransformerException e)
+ throws TransformerException{
+ String err = e.getMessage() ;
+ String loc = e.getLocationAsString();
+ if( loc != null ){ err = loc + ": " + err; }
+ if( errMssg == null ){ errMssg = err; }
+ err = "XML document prblem: " + err;
+ throw new TransformerException(err);
+} }
+ );
+ transformer.transform(inDoc, outDoc );
+ if( nameNode != null ){
+ String name = nameNode.getNodeValue();
+ char [] chars = caos.toCharArray() ;
+ map.put( name, (Object) new String(chars) );
+}
+
+
+} catch ( javax.xml.transform.TransformerException e ){
+ if( Xtpipes.trace ){ e.printStackTrace(); }
+ instructionErr( node,
+ e.getMessage()
+ +
+ ((errMssg==null)? "" : ("; " +errMssg))
+ , 37);
+} catch ( Exception e ){
+ if( Xtpipes.trace ){ e.printStackTrace(); }
+ instructionErr( node, (errMssg==null)? e.toString()
+ : e.toString() + "; " + errMssg
+ , 16 );
+}
+
+ } else if( instruction.equals( "dom" ) ){
+ try{
+ Node xmlNode = node.getAttributes().getNamedItem( "xml" );
+Document dom;
+if( xmlNode == null ){
+ if( inData == null ){
+ dom = domBuilder.parse( new File(inFile) );
+} else {
+ byte [] bytes = inData.getBytes("UTF-8");
+ InputStream is = new ByteArrayInputStream( bytes );
+ dom = domBuilder.parse (is);}
+
+} else {
+ String xml = xmlNode.getNodeValue();
+ String doc = (String) map.get(xml);
+ if( doc == null ){
+ instructionErr( node, "improper xml attribute value", 18 );
+ }
+ byte [] bytes = doc.getBytes("UTF-8");
+ InputStream is = new ByteArrayInputStream( bytes );
+ dom = domBuilder.parse (is);
+}
+
+ String className = node.getAttributes()
+ .getNamedItem( "class" ).getNodeValue();
+String methodName = node.getAttributes()
+ .getNamedItem( "method" ).getNodeValue();
+Class <?> cls = Class.forName( className );
+Class<?> [] argTypes = { Node.class };
+Method m = cls.getMethod( methodName, argTypes );
+Object parmValues[] = new Object[1];
+parmValues[0] = dom;
+m.invoke( null, parmValues );
+
+ Node nameNode = node.getAttributes().getNamedItem("name");
+StreamResult outDoc;
+CharArrayWriter caos = null;
+if( nameNode == null ){
+ outDoc = new StreamResult(outPrintWriter);
+ returnToFile = false;
+} else {
+ caos = new CharArrayWriter();
+ outDoc = new StreamResult(caos);
+}
+
+cleanXmlns(dom);
+DOMSource domSource = new DOMSource(dom);
+try{
+ identityTransformer.transform( domSource, outDoc );
+} catch ( javax.xml.transform.TransformerException e ){
+ String s = Xtpipes.trace?
+ (
+ "\n------------------------ xml code ------------------------\n"
+ + serialize( dom )
+ + "\n----------------------------------------------------------\n"
+ )
+ : "";
+ instructionErr( node, e.getMessage() + s, 35 );
+}
+if( nameNode != null ){
+ String name = nameNode.getNodeValue();
+ char [] chars = caos.toCharArray() ;
+ String domString = new String(chars);
+ Node dcl = node.getAttributes().getNamedItem( "dcl" );
+if( ((dcl == null) || (dcl.getNodeValue().equals("no") ))
+ &&
+ (domString.length() > 7)
+ &&
+ domString.startsWith("<?xml")
+ &&
+ !Character.isLetterOrDigit( domString.charAt(5) )
+){
+ domString = domString.substring( domString.indexOf("?>") + 2 );
+}
+
+ map.put( name, (Object) domString );
+}
+
+} catch ( NoSuchMethodException e ){
+ instructionErr( node,
+ "could not find method: " + e.getMessage(), 18 );
+} catch ( java.lang.reflect.InvocationTargetException e ){
+ if( Xtpipes.trace ){ e.printStackTrace(); }
+ instructionErr( node, e.getCause().toString(), 36);
+} catch ( Exception e ){
+ if( Xtpipes.trace ){ e.printStackTrace(); }
+ instructionErr( node, e.toString(), 20 );
+}
+
+ } else if( instruction.equals( "sax" ) ){
+ String errMsg = "";
+try{
+ Node xmlNode = node.getAttributes().getNamedItem( "xml" );
+InputSource inputSource=null;
+String xml = null;
+if( xmlNode == null ){
+ if( inData == null ){
+ xml = inFile;
+} else {
+ byte [] bytes = inData.getBytes("UTF-8");
+ ByteArrayInputStream bais = new ByteArrayInputStream( bytes );
+ inputSource = new InputSource( bais );
+}
+
+} else {
+ xml = xmlNode.getNodeValue();
+ String doc = (String) map.get(xml);
+ if( doc!=null ){
+ byte [] bytes = doc.getBytes("UTF-8");
+ ByteArrayInputStream bais = new ByteArrayInputStream( bytes );
+ inputSource = new InputSource( bais );
+} }
+
+ String [] className = node.getAttributes()
+ .getNamedItem( "content-handler" )
+ .getNodeValue()
+ .split(",");
+
+ Class<?> [] argTypes = {
+ PrintWriter.class, HashMap.class, Method.class,
+ PrintWriter.class, boolean.class };
+Node nameNode = node.getAttributes().getNamedItem("name");
+PrintWriter out;
+CharArrayWriter caos = null;
+if( nameNode == null ){
+ out = outPrintWriter;
+ returnToFile = false;
+} else {
+ caos = new CharArrayWriter();
+ out = new PrintWriter( caos );
+}
+
+Object parmValues[] = new Object[5];
+parmValues[0] = out;
+HashMap <String,Object> scripts = new HashMap <String,Object> ();
+Node script = node.getFirstChild();
+while( script != null ){
+ if( script.getNodeType()==Node.ELEMENT_NODE ){
+ String element = script.getAttributes().getNamedItem( "element" )
+ .getNodeValue();
+ if( scripts.containsKey(element) ){
+ System.err.println(
+ "--- Warning --- redfining script: " + element );
+ }
+ scripts.put( element, (Object) script );
+ }
+ script = script.getNextSibling();
+}
+ parmValues[1] = scripts;
+parmValues[2] = method;
+parmValues[3] = Xtpipes.logWriter;
+parmValues[4] = (Object) Xtpipes.trace;
+Class<?> cls = Class.forName( className[0].trim() );
+Constructor<?> c = cls.getConstructor( argTypes );
+Object ch = (Object) c.newInstance( parmValues );
+
+ XMLReader saxReader;
+if( saxReaderStack.empty() ){
+ SAXParser saxParser = saxFactory.newSAXParser();
+ saxReader = saxParser.getXMLReader();
+ saxReader.setEntityResolver(new org.xml.sax.EntityResolver() {
+ public InputSource resolveEntity(
+ String publicId, String systemId) {
+ if( (new File(systemId)).exists() ){
+ return new org.xml.sax.InputSource( systemId );
+ }
+ StringReader strReader = new StringReader("");
+ return new org.xml.sax.InputSource(strReader);
+ }
+});
+
+} else {
+ saxReader = (XMLReader) saxReaderStack.pop();
+}
+
+ XMLReader reader = saxReader;
+ for( int i=1; i<className.length; i++ ){
+ argTypes = new Class [3];
+ argTypes[0] = PrintWriter.class;
+ argTypes[1] = PrintWriter.class;
+ argTypes[2] = boolean.class;
+ parmValues = new Object[3];
+ parmValues[0] = out;
+ parmValues[1] = Xtpipes.logWriter;
+ parmValues[2] = (Object) Xtpipes.trace;
+ errMsg = "Class.forName( " + className[i].trim() + ") " ;
+ cls = Class.forName( className[i].trim() );
+ errMsg = "get-constructor "
+ + className[i].trim()
+ + "( PrintWriter, PrintWriter, boolean ) " ;
+ c = cls.getConstructor( argTypes );
+ errMsg = "get-object "
+ + className[i].trim()
+ + "( PrintWriter, PrintWriter, boolean ) " ;
+ if( (cls.getModifiers() % 2) != 1 ){
+ errMsg += "; class not defined to be public. ";
+ }
+ XMLFilter filter = (XMLFilter) c.newInstance( parmValues );
+ errMsg = "set-parent "
+ + className[i].trim()
+ + "( PrintWriter, PrintWriter, boolean ) " ;
+ filter.setParent(saxReader);
+ saxReader = filter;
+}
+
+ errMsg = "setContentHandler( "
+ + className[0].trim() + " )";
+ saxReader.setContentHandler( (org.xml.sax.ContentHandler) ch );
+ Node lexAttr = node.getAttributes()
+ .getNamedItem( "lexical-handler" );
+if( lexAttr != null ){
+ String lexName = lexAttr.getNodeValue();
+ argTypes = new Class[3];
+ argTypes[0] = Class.forName( className[0].trim() );
+ argTypes[1] = PrintWriter.class;
+ argTypes[2] = boolean.class;
+ parmValues = new Object[3];
+ parmValues[0] = ch;
+ parmValues[1] = Xtpipes.logWriter;
+ parmValues[2] = (Object) Xtpipes.trace;
+ errMsg = "Class.forName( " + lexName.trim() + ") " ;
+ cls = Class.forName( lexName.trim() );
+ errMsg = "get-constructor " +
+ lexName.trim() +
+ "( " + className[0].trim() + " ) " ;
+ c = cls.getConstructor( argTypes );
+ errMsg = "get-object " +
+ lexName.trim() + "( ... ) " ;
+ Object xh = (Object) c.newInstance( parmValues );
+ errMsg = "set lexical handler " + lexName.trim() + " ";
+ saxReader.setProperty(
+ "http://xml.org/sax/properties/lexical-handler",
+ (org.xml.sax.ext.LexicalHandler) xh
+ );
+}
+
+ saxReader.setEntityResolver(new org.xml.sax.EntityResolver() {
+ public InputSource resolveEntity(
+ String publicId, String systemId) {
+ if( (new File(systemId)).exists() ){
+ return new org.xml.sax.InputSource( systemId );
+ }
+ StringReader strReader = new StringReader("");
+ return new org.xml.sax.InputSource(strReader);
+ }
+});
+
+ if( inputSource==null ){
+ errMsg = "While parsing file " + xml + ": ";
+InputStream inputStream = null;
+if( Xtpipes.ml2xml == null ){
+ if( Xtpipes.trace ){
+ Xtpipes.logWriter.println(
+ "No request for ml2xml configuration (command line option -x)" );
+ }
+ try{
+ inputStream = (InputStream) (new File(xml).toURI().toURL().openStream());
+} catch ( java.io.FileNotFoundException ioe ){
+ try{
+ URL url = null;
+ try {
+ url = new URL(xml);
+ } catch ( java.net.MalformedURLException fnf ){
+ url = new File(xml).toURI().toURL();
+ }
+ inputStream = (InputStream) (url.openStream());
+ } catch ( java.io.FileNotFoundException fnf ){
+ inputStream = (InputStream)
+ (
+ new File( new File(xml).toURI().toURL().toString() )
+ . toURI().toURL()
+ . openStream()
+ );
+} }
+
+} else {
+ try{
+ ml2xmlClassObj = Class.forName( "ml2xml.Ml2xml" );
+} catch (java.lang.ClassNotFoundException cnf ){
+ instructionErr( null, "Class not found: ml2xml.Ml2xml", 25 );
+}
+Class<?> [] argTyp = { String.class, String[].class };
+Constructor<?> con = ml2xmlClassObj.getConstructor( argTyp );
+try{
+ if( Xtpipes.trace ){
+ String s = "Calling: ml2xml.Ml2xml(inputStream,"
+ + "new String[]{" ;
+ for(int i=0; i < Xtpipes.ml2xml.length; i++){
+ s += ((i==0)? "\"" : ", \"") + Xtpipes.ml2xml[i] + "\"";
+ }
+ s += "})";
+ Xtpipes.logWriter.println( s );
+}
+
+ inputStream = (InputStream) con.newInstance(
+ new Object[]{xml, ml2xml}
+ );
+} catch(java.lang.reflect.InvocationTargetException ite){
+ String s = "Problem at: ml2xml.Ml2xml(" + xml + ","
+ + "new String[]{" ;
+ for(int i=0; i < Xtpipes.ml2xml.length; i++){
+ s += ((i==0)? "\"" : ", \"") + Xtpipes.ml2xml[i] + "\"";
+ }
+ s += "})";
+ instructionErr( null, s + "; " + ite.getCause(), 38);
+}
+
+}
+saxReader.parse( new InputSource(inputStream) );
+if( Xtpipes.ml2xml != null ){
+ Class<?> [] argTyp = {};
+ Method m = ml2xmlClassObj . getMethod( "closeFiles", argTyp );
+ m.invoke( null, new Object[0] );
+}
+
+
+ } else {
+ errMsg = "xtpipes sax parsing error";
+ saxReader.parse( inputSource );
+ }
+ if( nameNode != null ){
+ String name = nameNode.getNodeValue();
+ char [] chars = caos.toCharArray() ;
+ map.put( name, (Object) new String(chars) );
+}
+
+ saxReaderStack.push( reader );
+} catch ( java.io.FileNotFoundException e ){
+ instructionErr( node, errMsg
+ + "could not find file: " + e.getMessage(), 19 );
+} catch ( ClassNotFoundException e ){
+ instructionErr( node, errMsg
+ + " class not found: "
+ + e.getMessage() + "\n classpath = "
+ + System.getProperty("java.class.path")
+ + " ---", 22 );
+} catch ( java.lang.reflect.InvocationTargetException e ){
+ instructionErr( node, errMsg + ": " + e.getCause(), 23 );
+} catch ( Exception e ){
+// e.printStackTrace();
+ instructionErr( node, errMsg + e.toString(), 29 );
+}
+
+ } else {
+ instructionErr( node, "Improper instruction: " + instruction, 11 );
+ } }
+ node = node.getNextSibling();
+} }
+
+ public static String execute( Node node, String xml )
+ throws Exception {
+ String name = ".";
+ String old = (String) map.get(name);
+ map.put( name, (Object) xml );
+ execute( node.getFirstChild() );
+ String s = (String) map.get(name);
+ if( old != null ){ map.put( name, (Object) old ); }
+ return s;
+}
+
+ private static void instructionErr( Node node, String e, int num )
+ throws Exception {
+ String err = "--- xtpipes error " + num + " --- ";
+ if( node != null ){
+ err += "At <" + node.getNodeName();
+ NamedNodeMap attr = node.getAttributes();
+ for(int i=0; i<attr.getLength(); i++){
+ Node nd = attr.item(i);
+ err += " " +
+ nd.getNodeName() + "=\"" +
+ nd.getNodeValue() + "\"" ;
+ }
+ err += " > : " ;
+ }
+ err += e;
+ if( ml2xmlClassObj != null ){
+ Class<?> [] argTypes = { };
+ Method m = ml2xmlClassObj.getMethod( "closeFiles", argTypes );
+ Object parmValues[] = new Object[0];
+ m.invoke( null, parmValues );
+}
+
+ Xtpipes.logWriter.flush();
+ if( exceptionErrs ) { throw new Exception( err ); }
+ else {
+ System.err.println( err );
+ System.exit(1);
+ }
+}
+private static void instructionErr( Node node, String e,
+ StackTraceElement[] st, int num )
+ throws Exception {
+ Xtpipes.logWriter.println(
+ "--- xtpipes error " + num + " --- " + e
+ );
+ for(int i=st.length-1; i>=0; i-- ){
+ Xtpipes.logWriter.println( st[i].toString() );
+ }
+ instructionErr( node, e, num );
+}
+
+ static String serialize( Node root ){
+ if( root.getNodeType() == Node.TEXT_NODE) {
+ return root.getNodeValue();
+ }
+ if( root.getNodeType() == Node.ELEMENT_NODE) {
+ String ser = "";
+ String tagName = root.getNodeName();
+ ser += "<" + tagName;
+ NamedNodeMap attributes = root.getAttributes();
+for(int i = 0; i < attributes.getLength(); i++) {
+ Attr attribute = (Attr) attributes.item(i);
+ ser += "\n" + attribute.getName() + "=\""
+ + attribute.getValue() + "\" ";
+}
+
+ ser += "\n>";
+ NodeList children = root.getChildNodes();
+if(children.getLength() > 0) {
+ for(int i = 0; i < children.getLength(); i++) {
+ ser += serialize(children.item(i));
+} }
+
+ ser += "</" + tagName + ">";
+ return ser;
+ }
+ if( root.getNodeType() == Node.DOCUMENT_NODE) {
+ String ser = "";
+ NodeList children = root.getChildNodes();
+if(children.getLength() > 0) {
+ for(int i = 0; i < children.getLength(); i++) {
+ ser += serialize(children.item(i));
+} }
+
+ return ser;
+ }
+ if( root == null ){ return "null"; }
+ return "";
+}
+
+ static ArrayList<String> nsName, nsValue;
+static void cleanXmlns( Node root ){
+ if( root.getNodeType() == Node.ELEMENT_NODE) {
+ int top = nsName.size();
+ ArrayList<Attr> remove = new ArrayList<Attr>();
+NamedNodeMap attributes = root.getAttributes();
+for(int i = 0; i < attributes.getLength(); i++) {
+ Attr attribute = (Attr) attributes.item(i);
+ String name = attribute.getName();
+ if( name.startsWith("xmlns") ){
+ if( (name.length() == 5) || (name.charAt(5) == ':') ){
+ String value = attribute.getValue();
+ boolean bool = false;
+for(int k=nsName.size(); k>0; ){
+ k--;
+ if( ((String) nsName.get(k)) . equals(name) ){
+ bool = ((String) nsValue.get(k)) . equals(value);
+ break;
+} }
+
+ if( bool ){ remove.add(attribute);
+ } else { nsName.add(name); nsValue.add(value); }
+} } }
+for(int i=remove.size(); i>0; ){
+ i--;
+ ((Element) root).removeAttributeNode( (Attr) remove.get(i) );
+}
+remove = null;
+
+ NodeList children = root.getChildNodes();
+if(children.getLength() > 0) {
+ for(int i = 0; i < children.getLength(); i++) {
+ cleanXmlns(children.item(i));
+} }
+
+ for(int i=nsName.size(); i>top; ){
+ i--;
+ nsName.remove(i);
+ nsValue.remove(i);
+ }
+ } else if( root.getNodeType() == Node.DOCUMENT_NODE) {
+ nsName = new ArrayList<String>();
+ nsValue = new ArrayList<String>();
+ NodeList children = root.getChildNodes();
+if(children.getLength() > 0) {
+ for(int i = 0; i < children.getLength(); i++) {
+ cleanXmlns(children.item(i));
+} }
+
+ nsName = null;
+ nsValue = null;
+} }
+
+}
+class XtpipesEntityResolver implements org.xml.sax.EntityResolver {
+ public InputSource resolveEntity(String publicID, String systemID)
+ throws SAXException {
+ if( Xtpipes.trace ){
+ Xtpipes.logWriter.println( "Resolving: publicID = \" " + publicID
+ + "\" systemID = \"" + systemID + "\"" );
+ }
+ String file = FileInfo.searchFile( systemID );
+ if( file != null ){
+ try{
+ file = new File(file).toURI().toURL().toString();
+ return new InputSource( file );
+ } catch( java.net.MalformedURLException mfe){
+ throw new SAXException(
+ "--- xtpipes error 30 --- improper file name: " + file );
+ } }
+ return null;
+}
+
+}
+
+
diff --git a/Build/source/texk/tex4htk/java/xtpipes/XtpipesUni.java b/Build/source/texk/tex4htk/java/xtpipes/XtpipesUni.java
new file mode 100755
index 00000000000..7050d590d17
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/xtpipes/XtpipesUni.java
@@ -0,0 +1,41 @@
+// 2008-01-26-00:38
+package xtpipes;
+public class XtpipesUni{
+ private static int D800 = Integer.parseInt("D800", 16);
+private static int DFFF = Integer.parseInt("DFFF", 16);
+private static int DC00 = Integer.parseInt("DC00", 16);
+private static int X400 = Integer.parseInt("400",16);
+private static int X10000 = Integer.parseInt("10000",16);
+
+
+public static String toUni( char[] ch, int start, int length,
+ String filter ){
+ StringBuffer buf = new StringBuffer(length);
+ for (int i = 0; i < length; i++) {
+ int chr = ch[ start + i ];
+ boolean ascii = (chr == '\n')
+ || (chr > 31) && (chr < 127) ;
+ if( filter.indexOf(chr) > -1 ){ ascii = false; }
+
+ if( (chr >= D800) && (chr<= DFFF) ){
+ chr = ((ch[i] - D800) * X400 + (ch[++i] - DC00)) + X10000;
+ }
+
+
+ buf.append(
+ ascii ? Character.toString((char) chr)
+ : ("&#x"
+ + Integer.toHexString(chr).toUpperCase()
+ + ";" ) );
+ }
+ return new String(buf);
+}
+
+ public static String toUni( String s, String filter ){
+ char [] ch = s.toCharArray();
+ int length = ch.length;
+ return toUni(ch, 0, length, filter);
+}
+
+}
+
diff --git a/Build/source/texk/tex4htk/java/xtpipes/util/ScriptsManager.java b/Build/source/texk/tex4htk/java/xtpipes/util/ScriptsManager.java
new file mode 100755
index 00000000000..2d2c06a715f
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/xtpipes/util/ScriptsManager.java
@@ -0,0 +1,196 @@
+// 2008-01-26-00:38
+package xtpipes.util;
+import java.util.ArrayList;
+import java.util.HashSet;
+import xtpipes.XtpipesUni;
+
+
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.*;
+import java.io.*;
+import java.lang.reflect.*;
+import java.util.HashMap;
+import java.util.Stack;
+
+public class ScriptsManager extends DefaultHandler {
+ boolean inBody = false;
+ArrayList<String> nsName = new ArrayList<String>(),
+ nsValue = new ArrayList<String>();
+Stack<Integer> nsStack = new Stack<Integer>();
+
+ PrintWriter out = null, log = null;
+ HashMap<String,Object> scripts = null;
+ Method method = null;
+ boolean savemode=false;
+ String code="", match = null;
+ Stack<Object[]> stack = new Stack<Object[]>();
+ public ScriptsManager( PrintWriter out,
+ HashMap<String,Object> scripts, Method method,
+ PrintWriter log, boolean trace ){
+ this.out = out;
+ this.log = (log==null)? new PrintWriter( System.err ) : log;
+ this.scripts = scripts;
+ this.method = method;
+ }
+ public void characters(char[] ch, int start, int length){
+ add( XtpipesUni.toUni(ch, start, length, "<>&") );
+ }
+ public void startElement(String ns, String sName,
+ String qName, Attributes atts) {
+ int top = nsName.size();
+nsStack.push( new Integer(top) );
+
+ String key = (atts==null)?
+ null
+ : (qName + "::" + atts.getValue("class"));
+boolean flag = (key != null) && scripts.containsKey(key);
+
+if( !flag ){
+ key = qName;
+ flag = scripts.containsKey(key);
+}
+
+ inBody = true;
+ String s = "<" + qName + "\n";
+ for(int i=0; i<atts.getLength(); i++ ){
+ String name = atts.getQName(i),
+ value = atts.getValue(i);
+ if( name.startsWith("xmlns") ){
+ if( (name.length() == 5) || (name.charAt(5) == ':') ){
+ boolean bool = false;
+for(int k=nsName.size(); k>0; ){
+ k--;
+ if( ((String) nsName.get(k)) . equals(name) ){
+ bool = ((String) nsValue.get(k)) . equals(value);
+ break;
+} }
+
+ if( !bool ){
+ nsName.add(name); nsValue.add(value);
+} } }
+
+ s += " " + name + "=\"" +
+ XtpipesUni.toUni(value, "<>&\"") + "\"";
+ }
+ if( flag ){ HashSet<String> registry = new HashSet<String>();
+for(int i=nsName.size(); i>top; ){
+ i--;
+ registry.add( (String) nsName.get(i) );
+}
+for(int i=top; i>0; ){
+ i--;
+ String nm = (String) nsName.get(i);
+ if( ! registry.contains(nm) ){
+ registry.add( nm );
+ s += " " + nm + "=\"" +
+ XtpipesUni.toUni( (String) nsValue.get(i), "<>&\"") + "\"";
+} }
+ }
+ s += ">" ;
+ if( flag ){
+ Object [] state = { new Boolean(savemode), code, match };
+ stack.push( state );
+ savemode=true; code=""; match= key;
+} else {
+ Object [] state = { new Boolean(savemode), null, null };
+ stack.push( state );
+}
+add( s );
+
+}
+
+ public void endElement(String ns, String sName, String qName){
+ String s = "</" + qName + ">";
+ add( s );
+ Object [] state = (Object []) stack.pop();
+ if( (String) state[1] != null ){
+ Object parmValues[] = new Object[2];
+parmValues[0] = scripts.get( match );
+parmValues[1] = code;
+try {
+ s = (String) method.invoke( null, parmValues );
+} catch(java.lang.reflect.InvocationTargetException e){
+ log.println("--- ScriptsManager Error 1 --- " + e.getCause() );
+ log.flush();
+} catch (Exception e){
+ log.println("--- ScriptsManager Error 2 --- " + e );
+ log.flush();
+}
+
+ savemode = ((Boolean) state[0]).booleanValue();
+code = (String) state[1];
+match = (String) state[2];
+
+ int top = ((Integer) nsStack.pop()) . intValue();
+for(int i=nsName.size(); i>top; ){
+ i--;
+ nsName.remove(i);
+ nsValue.remove(i);
+}
+
+ int m = s.indexOf('>');
+char [] attrs = s.substring(0,m).toCharArray();
+int result = qName.length()+1,
+ mark = result,
+ from=-1,
+ control = 12
+;
+char delimiter = ' ';
+String name="";
+
+for(int i=result; i<m; i++ ){
+ attrs[result++] = attrs[i];
+ switch( control ){
+ case 12
+: { if( attrs[i] == '=' ){
+ name = (new String(attrs,mark,result-mark-1)).trim();
+ control = 13
+;
+}
+ break; }
+ case 13
+: { if( (attrs[i] == '"') || (attrs[i] == '\'') ){
+ delimiter = attrs[i];
+ control = 14
+;
+ from = result;
+}
+ break; }
+ case 14
+: { if( attrs[i] == delimiter ){
+ if( name.startsWith("xmlns")
+ && ((name.length() == 5) || (name.charAt(5) == ':')) ){
+ String value = (new String(attrs,from,result-from-1)).trim();
+ boolean bool = false;
+for(int k=nsName.size(); k>0; ){
+ k--;
+ if( ((String) nsName.get(k)) . equals(name) ){
+ bool = ((String) nsValue.get(k)) . equals(value);
+ break;
+} }
+
+ if( bool ){ result = mark; }
+ }
+ mark = result;
+ control = 12
+;
+}
+ break; }
+} }
+s = (new String(attrs,0,result)) + s.substring(m);
+
+ add( s );
+ } else { int top = ((Integer) nsStack.pop()) . intValue();
+for(int i=nsName.size(); i>top; ){
+ i--;
+ nsName.remove(i);
+ nsValue.remove(i);
+}
+ }
+}
+
+ void add(String s){
+ if( savemode ){ code+=s; }
+ else { out.print(s); }
+} }
+
diff --git a/Build/source/texk/tex4htk/java/xtpipes/util/ScriptsManagerLH.java b/Build/source/texk/tex4htk/java/xtpipes/util/ScriptsManagerLH.java
new file mode 100755
index 00000000000..b5fe3526208
--- /dev/null
+++ b/Build/source/texk/tex4htk/java/xtpipes/util/ScriptsManagerLH.java
@@ -0,0 +1,26 @@
+// 2008-01-26-00:38
+package xtpipes.util;
+import org.xml.sax.ext.LexicalHandler;
+// import org.xml.sax.ContentHandler;
+import java.io.PrintWriter;
+public class ScriptsManagerLH implements LexicalHandler {
+ ScriptsManager contentHandler;
+ PrintWriter log;
+ public ScriptsManagerLH( ScriptsManager contentHandler,
+ PrintWriter log, boolean trace ){
+ this.contentHandler = contentHandler;
+ this.log = (log==null)? new PrintWriter( System.err ) : log;
+ }
+ public void comment(char[] ch, int start, int length){
+ if( contentHandler.inBody ){
+ String s = new String(ch, start, length);
+ contentHandler.add( "<!--" + s + "\n-->");
+ } }
+ public void startEntity(String x){}
+ public void endEntity(String x){}
+ public void startCDATA(){}
+ public void endCDATA(){}
+ public void startDTD(String x, String y, String z){}
+ public void endDTD(){}
+}
+
diff --git a/Build/source/texk/tex4htk/jh1context b/Build/source/texk/tex4htk/jh1context
new file mode 100755
index 00000000000..51bbe192c42
--- /dev/null
+++ b/Build/source/texk/tex4htk/jh1context
@@ -0,0 +1,7 @@
+#!/bin/sh
+ texexec --arg="ht-1=$2" --use=tex4ht --dvi --nobackend $5 $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp1 -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jh1latex b/Build/source/texk/tex4htk/jh1latex
new file mode 100755
index 00000000000..3a3969515da
--- /dev/null
+++ b/Build/source/texk/tex4htk/jh1latex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode,jh1.0]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode,jh1.0]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode,jh1.0]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp1 -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jh1mex b/Build/source/texk/tex4htk/jh1mex
new file mode 100755
index 00000000000..d37b07fa9ca
--- /dev/null
+++ b/Build/source/texk/tex4htk/jh1mex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp1 -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jh1tex b/Build/source/texk/tex4htk/jh1tex
new file mode 100755
index 00000000000..e0a4cffd79b
--- /dev/null
+++ b/Build/source/texk/tex4htk/jh1tex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp1 -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jh1texi b/Build/source/texk/tex4htk/jh1texi
new file mode 100755
index 00000000000..071d6544f27
--- /dev/null
+++ b/Build/source/texk/tex4htk/jh1texi
@@ -0,0 +1,10 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp1 -m644
+# texindex ?
+
+
+
diff --git a/Build/source/texk/tex4htk/jh1xelatex b/Build/source/texk/tex4htk/jh1xelatex
new file mode 100755
index 00000000000..a7340693acf
--- /dev/null
+++ b/Build/source/texk/tex4htk/jh1xelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode,jh1.0]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode,jh1.0]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode,jh1.0]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -.xdv -f/$1 $4 -d$1-doc/ -cjavahelp1 -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jh1xetex b/Build/source/texk/tex4htk/jh1xetex
new file mode 100755
index 00000000000..05f52b9d2a6
--- /dev/null
+++ b/Build/source/texk/tex4htk/jh1xetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode,jh1.0}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -.xdv -f/$1 $4 -d$1-doc/ -cjavahelp1 -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jhcontext b/Build/source/texk/tex4htk/jhcontext
new file mode 100755
index 00000000000..1378b3a623d
--- /dev/null
+++ b/Build/source/texk/tex4htk/jhcontext
@@ -0,0 +1,7 @@
+#!/bin/sh
+ texexec --arg="ht-1=$2" --use=tex4ht --dvi --nobackend $5 $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp -cvalidatehtml -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jhlatex b/Build/source/texk/tex4htk/jhlatex
new file mode 100755
index 00000000000..e8550de4420
--- /dev/null
+++ b/Build/source/texk/tex4htk/jhlatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp -cvalidatehtml -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jhmex b/Build/source/texk/tex4htk/jhmex
new file mode 100755
index 00000000000..4deec4d4ff2
--- /dev/null
+++ b/Build/source/texk/tex4htk/jhmex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp -cvalidatehtml -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jhtex b/Build/source/texk/tex4htk/jhtex
new file mode 100755
index 00000000000..45460a32628
--- /dev/null
+++ b/Build/source/texk/tex4htk/jhtex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp -cvalidatehtml -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jhtexi b/Build/source/texk/tex4htk/jhtexi
new file mode 100755
index 00000000000..70219afd076
--- /dev/null
+++ b/Build/source/texk/tex4htk/jhtexi
@@ -0,0 +1,10 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -f/$1 $4 -d$1-doc/ -cjavahelp -cvalidatehtml -m644
+# texindex ?
+
+
+
diff --git a/Build/source/texk/tex4htk/jhxelatex b/Build/source/texk/tex4htk/jhxelatex
new file mode 100755
index 00000000000..2b1b4e81e5d
--- /dev/null
+++ b/Build/source/texk/tex4htk/jhxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html,javahelp,3.2,unicode]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -.xdv -f/$1 $4 -d$1-doc/ -cjavahelp -cvalidatehtml -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jhxetex b/Build/source/texk/tex4htk/jhxetex
new file mode 100755
index 00000000000..ae0e520823e
--- /dev/null
+++ b/Build/source/texk/tex4htk/jhxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html,javahelp,3.2,unicode}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf -u10
+ t4ht -.xdv -f/$1 $4 -d$1-doc/ -cjavahelp -cvalidatehtml -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jmcontext b/Build/source/texk/tex4htk/jmcontext
new file mode 100755
index 00000000000..3c9c08f6a61
--- /dev/null
+++ b/Build/source/texk/tex4htk/jmcontext
@@ -0,0 +1,7 @@
+#!/bin/sh
+ texexec --arg="ht-1=$2" --use=tex4ht --dvi --nobackend $5 $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jmlatex b/Build/source/texk/tex4htk/jmlatex
new file mode 100755
index 00000000000..eacf7b534a9
--- /dev/null
+++ b/Build/source/texk/tex4htk/jmlatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsmath]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsmath]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsmath]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jmmex b/Build/source/texk/tex4htk/jmmex
new file mode 100755
index 00000000000..ebc9abdf786
--- /dev/null
+++ b/Build/source/texk/tex4htk/jmmex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jmtex b/Build/source/texk/tex4htk/jmtex
new file mode 100755
index 00000000000..541bbce3cb5
--- /dev/null
+++ b/Build/source/texk/tex4htk/jmtex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jmtexi b/Build/source/texk/tex4htk/jmtexi
new file mode 100755
index 00000000000..b2406c7902e
--- /dev/null
+++ b/Build/source/texk/tex4htk/jmtexi
@@ -0,0 +1,10 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
+# texindex ?
+
+
+
diff --git a/Build/source/texk/tex4htk/jmxelatex b/Build/source/texk/tex4htk/jmxelatex
new file mode 100755
index 00000000000..cdbe256e60c
--- /dev/null
+++ b/Build/source/texk/tex4htk/jmxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsmath]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsmath]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsmath]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -.xdv -f/$1 $4 ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jmxetex b/Build/source/texk/tex4htk/jmxetex
new file mode 100755
index 00000000000..0a442884648
--- /dev/null
+++ b/Build/source/texk/tex4htk/jmxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsmath}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -.xdv -f/$1 $4 ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jscontext b/Build/source/texk/tex4htk/jscontext
new file mode 100755
index 00000000000..fbf4dabecac
--- /dev/null
+++ b/Build/source/texk/tex4htk/jscontext
@@ -0,0 +1,7 @@
+#!/bin/sh
+ texexec --arg="ht-1=$2" --use=tex4ht --dvi --nobackend $5 $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cjsmlhtf
+ t4ht -f/$1 $4 -cjsml ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jslatex b/Build/source/texk/tex4htk/jslatex
new file mode 100755
index 00000000000..6efea03607e
--- /dev/null
+++ b/Build/source/texk/tex4htk/jslatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cjsmlhtf
+ t4ht -f/$1 $4 -cjsml ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jsmex b/Build/source/texk/tex4htk/jsmex
new file mode 100755
index 00000000000..52a0171080b
--- /dev/null
+++ b/Build/source/texk/tex4htk/jsmex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cjsmlhtf
+ t4ht -f/$1 $4 -cjsml ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jstex b/Build/source/texk/tex4htk/jstex
new file mode 100755
index 00000000000..d4c4bf957bc
--- /dev/null
+++ b/Build/source/texk/tex4htk/jstex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cjsmlhtf
+ t4ht -f/$1 $4 -cjsml ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jstexi b/Build/source/texk/tex4htk/jstexi
new file mode 100755
index 00000000000..c0b64953683
--- /dev/null
+++ b/Build/source/texk/tex4htk/jstexi
@@ -0,0 +1,10 @@
+#!/bin/sh
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cjsmlhtf
+ t4ht -f/$1 $4 -cjsml ## -d~/WWW/temp/ -m644
+# texindex ?
+
+
+
diff --git a/Build/source/texk/tex4htk/jsxelatex b/Build/source/texk/tex4htk/jsxelatex
new file mode 100755
index 00000000000..cc5ca7db937
--- /dev/null
+++ b/Build/source/texk/tex4htk/jsxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,jsml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cjsmlhtf
+ t4ht -.xdv -f/$1 $4 -cjsml ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/jsxetex b/Build/source/texk/tex4htk/jsxetex
new file mode 100755
index 00000000000..7ba07e29d20
--- /dev/null
+++ b/Build/source/texk/tex4htk/jsxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,jsml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cjsmlhtf
+ t4ht -.xdv -f/$1 $4 -cjsml ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/mzxelatex b/Build/source/texk/tex4htk/mzxelatex
new file mode 100755
index 00000000000..0ec06093fab
--- /dev/null
+++ b/Build/source/texk/tex4htk/mzxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,mozilla]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mozilla}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,mozilla]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mozilla}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,mozilla]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mozilla}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/mzxetex b/Build/source/texk/tex4htk/mzxetex
new file mode 100755
index 00000000000..f6a6e800fc3
--- /dev/null
+++ b/Build/source/texk/tex4htk/mzxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mozilla}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mozilla}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mozilla}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/ooxelatex b/Build/source/texk/tex4htk/ooxelatex
new file mode 100755
index 00000000000..74cacff6e72
--- /dev/null
+++ b/Build/source/texk/tex4htk/ooxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,ooffice]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,ooffice}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,ooffice]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,ooffice}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,ooffice]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,ooffice}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -.xdv -f/$1 $4 -cooxtpipes -coo
+
+
+
diff --git a/Build/source/texk/tex4htk/ooxetex b/Build/source/texk/tex4htk/ooxetex
new file mode 100755
index 00000000000..377bdc0c9fc
--- /dev/null
+++ b/Build/source/texk/tex4htk/ooxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,ooffice}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,ooffice}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,ooffice}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cmozhtf
+ t4ht -.xdv -f/$1 $4 -cooxtpipes -coo
+
+
+
diff --git a/Build/source/texk/tex4htk/teimxelatex b/Build/source/texk/tex4htk/teimxelatex
new file mode 100755
index 00000000000..5d0a81bd001
--- /dev/null
+++ b/Build/source/texk/tex4htk/teimxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,tei-mml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei-mml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,tei-mml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei-mml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,tei-mml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei-mml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/teimxetex b/Build/source/texk/tex4htk/teimxetex
new file mode 100755
index 00000000000..e0c3fa220e8
--- /dev/null
+++ b/Build/source/texk/tex4htk/teimxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei-mml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei-mml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei-mml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/teixelatex b/Build/source/texk/tex4htk/teixelatex
new file mode 100755
index 00000000000..a3a5595682d
--- /dev/null
+++ b/Build/source/texk/tex4htk/teixelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,tei]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,tei]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,tei]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/teixetex b/Build/source/texk/tex4htk/teixetex
new file mode 100755
index 00000000000..349274351e1
--- /dev/null
+++ b/Build/source/texk/tex4htk/teixetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,tei}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/uxhxelatex b/Build/source/texk/tex4htk/uxhxelatex
new file mode 100755
index 00000000000..a4437501017
--- /dev/null
+++ b/Build/source/texk/tex4htk/uxhxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,uni-html4]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,uni-html4}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,uni-html4]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,uni-html4}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,uni-html4]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,uni-html4}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/uxhxetex b/Build/source/texk/tex4htk/uxhxetex
new file mode 100755
index 00000000000..b71da80b70f
--- /dev/null
+++ b/Build/source/texk/tex4htk/uxhxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,uni-html4}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,uni-html4}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,uni-html4}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/wxelatex b/Build/source/texk/tex4htk/wxelatex
new file mode 100755
index 00000000000..28f30a4ddb2
--- /dev/null
+++ b/Build/source/texk/tex4htk/wxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,word]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,word}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,word]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,word}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,word]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,word}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -csymhtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/wxetex b/Build/source/texk/tex4htk/wxetex
new file mode 100755
index 00000000000..d27b9bae366
--- /dev/null
+++ b/Build/source/texk/tex4htk/wxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,word}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,word}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,word}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -csymhtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/xhmxelatex b/Build/source/texk/tex4htk/xhmxelatex
new file mode 100755
index 00000000000..1167bcc0cbf
--- /dev/null
+++ b/Build/source/texk/tex4htk/xhmxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,mathml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mathml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,mathml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mathml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml,mathml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mathml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/xhmxetex b/Build/source/texk/tex4htk/xhmxetex
new file mode 100755
index 00000000000..3a6b465e83f
--- /dev/null
+++ b/Build/source/texk/tex4htk/xhmxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mathml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mathml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml,mathml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3 -cunihtf
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/xhxelatex b/Build/source/texk/tex4htk/xhxelatex
new file mode 100755
index 00000000000..016084e28dd
--- /dev/null
+++ b/Build/source/texk/tex4htk/xhxelatex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ xelatex -no-pdf $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,xhtml]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,xhtml}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+
diff --git a/Build/source/texk/tex4htk/xhxetex b/Build/source/texk/tex4htk/xhxetex
new file mode 100755
index 00000000000..73e8e772c54
--- /dev/null
+++ b/Build/source/texk/tex4htk/xhxetex
@@ -0,0 +1,9 @@
+#!/bin/sh
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ xetex -no-pdf $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,xhtml}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
+ tex4ht -.xdv -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
+ t4ht -.xdv -f/$1 $4 -cvalidate ## -d~/WWW/temp/ -m644
+
+
+