summaryrefslogtreecommitdiff
path: root/support/tex-converter/update/convert.bat
blob: c69fe1b2c4778c74913dd9301a59f0c15be77ea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
@echo off
REM Batch file converts TeX file
REM using Hevea, Tth, Texify, pdfLaTeX, LaTeX
REM %1=Program used to convert
REM %2=TeX file
REM %3=Optional pause

REM *****************************************************
REM Please don't alter these lines
REM Otherwise TeX Converter may not work properly
REM TeX Converter will be writing text here automatically
set redir=d:\visual~1.0\my\tex\texfor~1\versio~1.5\redir.exe
set progpath=d:\tex\heveaf~1
set cmdline=-exec xxdate.exe swp.hva dek.hva xhvbc.hva -e tcilatex.tex 
set cmdline2=
set code=x
REM *****************************************************

goto %1

:hevea
REM find ocamlrun.exe
set path=%progpath%
REM find .hva files
set heveadir=%progpath%
echo Running HeVeA%code% ...
%redir% -ea %2.hlog hevea%code%.exe %cmdline% %2
echo.
if "%cmdline2%"=="no" goto nohacha
echo Running HaChA%code% ... produces index.html + %2???.html
%heveadir%\hacha%code%.exe %cmdline2% %2.html

:nohacha
echo.
echo Done
set path=
set hevea=
set heveadir=
set cmdline=
set cmdline2=
set code=
goto final

:tth
set path=%progpath%
echo Running tth ...
%redir% -ea %2.tlog tth.exe %cmdline% -e2 -L%2 <%2.tex >%2.htm
echo .
echo Done
set path=
goto final

:tex4ht
set opath=%path%
set path=%path%;%progpath%;%htrunpath%
call %cmdline%
%3
set path=%opath%
set opath=
set delegate_path=
set gs_lib=
set htrunpath=
goto final

:latex2html
set oldpath=%path%
set path=%path%;%progpath%
echo Starting Latex2HTML ...
call latex2html.bat -init_file=%init% %2
%3
set path=%oldpath%
set L2HMODULE=
set gs_lib=
goto final

:dvi
latex %2 --src-specials
goto final

:pdf
pdflatex %2
goto final

:texify
set opath=%path%
set path=%path%;%progpath%
texify %cmdline% %2.tex
set path=%opath%
set opath=
goto final

:gspdf
set opath=%path%
set path=%path%;%progpath%;%filepath%
call %cmdline%
set path=%opath%
set opath=
set filepath=
goto final

:final 
set redir=
set progpath=
set cmdline=