This commit was manufactured by cvs2svn to create tag 'WX_2_2_9'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_2_9@13364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2002-01-04 16:15:08 +00:00
parent dc3d889d0b
commit f7f6abe24d
2324 changed files with 375095 additions and 121526 deletions

View File

@@ -1,7 +1,7 @@
all:
cd src; make
cd src; $(MAKE)
clean:
cd src; make clean
cd src; $(MAKE) clean

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 959 B

View File

@@ -1,5 +1,5 @@
[OPTIONS]
BMROOT=d:\wx2\wxWind~1\utils\tex2rtf\docs ; Assume that bitmaps are where the source is
BMROOT=c:\wx2sta~1\wxWind~1\utils\tex2rtf\docs ; Assume that bitmaps are where the source is
TITLE=Tex2RTF Manual
CONTENTS=Contents
COMPRESS=HIGH

View File

@@ -13,6 +13,11 @@ listItemIndent=40
winHelpContents = yes
winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
generateHPJ = yes
;;
;; These two are for generating MS HTML Help project, contents and index files.
;;
htmlWorkshopFiles = true
htmlIndex = true
htmlBrowseButtons = bitmap
winHelpTitle = "Tex2RTF Manual"
truncateFilenames = yes

View File

@@ -1,5 +1,5 @@
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}%
\input{psbox.tex}
%\input{psbox.tex}
\newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}%
\newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}%
\newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}%
@@ -8,7 +8,7 @@
\parskip=10pt%
\parindent=0pt%
%\backgroundcolour{255;255;255}\textcolour{0;0;0}% Has an effect in HTML only
\winhelpignore{\title{Manual for Tex2RTF 2.0:\\A \LaTeX\ to RTF and HTML converter}%
\winhelpignore{\title{Manual for Tex2RTF 2.0: A \LaTeX\ to RTF and HTML converter}%
\author{Julian Smart}%
\date{November 1999}%
}%

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 998 B

View File

@@ -0,0 +1,343 @@
# Microsoft Developer Studio Project File - Name="Tex2RTFVC" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=Tex2RTFVC - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Tex2RTFVC.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Tex2RTFVC.mak" CFG="Tex2RTFVC - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Tex2RTFVC - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "Tex2RTFVC - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "Tex2RTFVC - Win32 Debug DLL" (based on "Win32 (x86) Application")
!MESSAGE "Tex2RTFVC - Win32 Release DLL" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "Tex2RTFVC - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/tex2rtf.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/tex2rtf.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "DebugDLL"
# PROP BASE Intermediate_Dir "DebugDLL"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "DebugDLL"
# PROP Intermediate_Dir "DebugDLL"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/tex2rtf.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseDLL"
# PROP BASE Intermediate_Dir "ReleaseDLL"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseDLL"
# PROP Intermediate_Dir "ReleaseDLL"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/tex2rtf.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
!ENDIF
# Begin Target
# Name "Tex2RTFVC - Win32 Release"
# Name "Tex2RTFVC - Win32 Debug"
# Name "Tex2RTFVC - Win32 Debug DLL"
# Name "Tex2RTFVC - Win32 Release DLL"
# Begin Source File
SOURCE=.\bmputils.h
# End Source File
# Begin Source File
SOURCE=.\htmlutil.cpp
!IF "$(CFG)" == "Tex2RTFVC - Win32 Release"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\readshg.cpp
!IF "$(CFG)" == "Tex2RTFVC - Win32 Release"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\readshg.h
# End Source File
# Begin Source File
SOURCE=.\rtfutils.cpp
!IF "$(CFG)" == "Tex2RTFVC - Win32 Release"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\rtfutils.h
# End Source File
# Begin Source File
SOURCE=.\table.cpp
!IF "$(CFG)" == "Tex2RTFVC - Win32 Release"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\table.h
# End Source File
# Begin Source File
SOURCE=.\tex2any.cpp
!IF "$(CFG)" == "Tex2RTFVC - Win32 Release"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\tex2any.h
# End Source File
# Begin Source File
SOURCE=.\tex2rtf.cpp
!IF "$(CFG)" == "Tex2RTFVC - Win32 Release"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\tex2rtf.h
# End Source File
# Begin Source File
SOURCE=.\tex2rtf.rc
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include"
# End Source File
# Begin Source File
SOURCE=.\texutils.cpp
!IF "$(CFG)" == "Tex2RTFVC - Win32 Release"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\wxhlpblk.h
# End Source File
# Begin Source File
SOURCE=.\xlputils.cpp
!IF "$(CFG)" == "Tex2RTFVC - Win32 Release"
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL"
!ENDIF
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "Tex2RTFVC"=.\Tex2RTFVC.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -76,6 +76,10 @@ static bool inTable = FALSE;
// This is defined in the Tex2Any library.
extern char *BigBuffer;
// DHS Two-column table dimensions.
static int TwoColWidthA = -1;
static int TwoColWidthB = -1;
class HyperReference: public wxObject
{
public:
@@ -1189,8 +1193,12 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
{
if ( start )
TexOutput("\n<TABLE>\n");
else
else {
TexOutput("\n</TABLE>\n");
// DHS
TwoColWidthA = -1;
TwoColWidthB = -1;
}
break;
}
case ltPAR:
@@ -2089,17 +2097,29 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
*/
if (arg_no == 1)
{
if ( start )
TexOutput("\n<TR><TD VALIGN=TOP>\n");
else
if ( start ) {
// DHS
if (TwoColWidthA > -1) {
char buf[100];
sprintf(buf,"\n<TR><TD VALIGN=TOP WIDTH=%d>\n",TwoColWidthA);
TexOutput(buf);
} else
TexOutput("\n<TR><TD VALIGN=TOP>\n");
} else
TexOutput("\n</TD>\n");
}
if (arg_no == 2)
{
if ( start )
TexOutput("\n<TD VALIGN=TOP>\n");
else
TexOutput("\n</TD></TR>\n");
// DHS
if ( start ) {
if (TwoColWidthB > -1) {
char buf[100];
sprintf(buf,"\n<TD VALIGN=TOP WIDTH=%d>\n",TwoColWidthB);
TexOutput(buf);
} else
TexOutput("\n<TD VALIGN=TOP>\n");
} else
TexOutput("\n</TD></TR>\n");
}
return TRUE;
break;
@@ -2153,6 +2173,30 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
TexOutput("<HR><P>\n");
break;
}
// DHS
case ltTWOCOLWIDTHA:
{
if (start)
{
char *val = GetArgData();
float points = ParseUnitArgument(val);
TwoColWidthA = (int)((points * 100.0) / 72.0);
}
return FALSE;
break;
}
// DHS
case ltTWOCOLWIDTHB:
{
if (start)
{
char *val = GetArgData();
float points = ParseUnitArgument(val);
TwoColWidthB = (int)((points * 100.0) / 72.0);
}
return FALSE;
break;
}
/*
* Accents
*

View File

@@ -91,6 +91,8 @@ cleanall:
DOCSOURCES=$(LOCALDOCDIR)\tex2rtf.tex
html: $(DOCDIR)\html\tex2rtf\t2rtf.htm
htmlhelp: $(DOCDIR)\htmlhelp\tex2rtf.chm
htb: $(DOCDIR)\htb\tex2rtf.htb
hlp: $(DOCDIR)\winhelp\tex2rtf.hlp
pdfrtf: $(DOCDIR)\pdf\tex2rtf.rtf
ps: $(WXDIR)\docs\ps\tex2rtf.ps
@@ -118,11 +120,30 @@ $(DOCDIR)\pdf\tex2rtf.rtf: $(DOCSOURCES)
$(DOCDIR)\html\tex2rtf\t2rtf.htm: $(DOCSOURCES)
cd $(LOCALDOCDIR)
-mkdir $(DOCDIR)\html\tex2rtf
-copy *.gif $(DOCDIR)\html\tex2rtf
-start /w tex2rtf $(LOCALDOCDIR)\tex2rtf.tex $(DOCDIR)\html\tex2rtf\t2rtf.htm -twice -html
-erase $(DOCDIR)\html\tex2rtf\*.con
-erase $(DOCDIR)\html\tex2rtf\*.ref
cd $(THISDIR)
$(DOCDIR)\htmlhelp\tex2rtf.chm : $(DOCDIR)\html\tex2rtf\t2rtf.htm $(DOCDIR)\html\tex2rtf\t2rtf.hhp
cd $(DOCDIR)\html\tex2rtf
-hhc t2rtf.hhp
move t2rtf.chm $(DOCDIR)\htmlhelp\tex2rtf.chm
cd $(THISDIR)
# An htb file is a zip file containing the .htm, .gif, .hhp, .hhc and .hhk
# files, renamed to htb.
# This can then be used with e.g. helpview.
# Optionally, a cached version of the .hhp file can be generated with hhp2cached.
$(DOCDIR)\htb\tex2rtf.htb: $(DOCDIR)\html\tex2rtf\t2rtf.htm
cd $(DOCDIR)\html\tex2rtf
-erase /Y tex2rtf.zip tex2rtf.htb
zip32 tex2rtf.zip *.htm *.gif *.hhp *.hhc *.hhk
-mkdir $(DOCDIR)\htb
move tex2rtf.zip $(DOCDIR)\htb\tex2rtf.htb
cd $(THISDIR)
$(LOCALDOCDIR)\tex2rtf.dvi: $(DOCSOURCES)
cd $(LOCALDOCDIR)
-latex tex2rtf

View File

@@ -363,6 +363,14 @@ bool FindEndEnvironment(char *buffer, int *pos, char *env)
bool readingVerbatim = FALSE;
bool readInVerbatim = FALSE; // Within a verbatim, but not nec. verbatiminput
// Switched this off because e.g. \verb${$ causes it to fail. There is no
// detection of \verb yet.
#define CHECK_BRACES 0
unsigned long leftCurly = 0;
unsigned long rightCurly = 0;
static wxString currentFileName = "";
bool read_a_line(char *buf)
{
if (CurrentInputIndex < 0)
@@ -374,6 +382,7 @@ bool read_a_line(char *buf)
int ch = -2;
int i = 0;
buf[0] = 0;
while (ch != EOF && ch != 10)
{
if (((i == 14) && (strncmp(buf, "\\end{verbatim}", 14) == 0)) ||
@@ -381,6 +390,26 @@ bool read_a_line(char *buf)
readInVerbatim = FALSE;
ch = getc(Inputs[CurrentInputIndex]);
#if CHECK_BRACES
if (ch == '{' && !readInVerbatim)
leftCurly++;
if (ch == '}' && !readInVerbatim)
{
rightCurly++;
if (rightCurly > leftCurly)
{
wxString errBuf;
errBuf.Printf("An extra right Curly brace ('}') was detected at line %l inside file %s",LineNumbers[CurrentInputIndex], (const char*) currentFileName.c_str());
OnError((char *)errBuf.c_str());
// Reduce the count of right curly braces, so the mismatched count
// isn't reported on every line that has a '}' after the first mismatch
rightCurly--;
}
}
#endif
if (ch != EOF)
{
// Check for 2 consecutive newlines and replace with \par
@@ -450,8 +479,19 @@ bool read_a_line(char *buf)
buf[i] = 0;
fclose(Inputs[CurrentInputIndex]);
Inputs[CurrentInputIndex] = NULL;
if (CurrentInputIndex > 0) ch = ' '; // No real end of file
if (CurrentInputIndex > 0)
ch = ' '; // No real end of file
CurrentInputIndex --;
#if CHECK_BRACES
if (leftCurly != rightCurly)
{
wxString errBuf;
errBuf.Printf("Curly braces do not match inside file %s\n%lu opens, %lu closes", (const char*) currentFileName.c_str(),leftCurly,rightCurly);
OnError((char *)errBuf.c_str());
}
leftCurly = 0;
rightCurly = 0;
#endif
if (readingVerbatim)
{
readingVerbatim = FALSE;
@@ -491,6 +531,7 @@ bool read_a_line(char *buf)
if (buf[j-1] == '}') buf[j-1] = 0; // Ignore final brace
wxString actualFile = TexPathList.FindValidPath(fileName);
currentFileName = actualFile;
if (actualFile == "")
{
char errBuf[300];
@@ -500,6 +541,9 @@ bool read_a_line(char *buf)
}
else
{
wxString informStr;
informStr.Printf("Processing: %s",actualFile.c_str());
OnInform((char *)informStr.c_str());
CurrentInputIndex ++;
Inputs[CurrentInputIndex] = fopen(actualFile, "r");
LineNumbers[CurrentInputIndex] = 1;
@@ -550,18 +594,25 @@ bool read_a_line(char *buf)
if (buf[j-1] == '}') buf[j-1] = 0; // Ignore final brace
// Remove backslashes from name
wxString fileNameStr(fileName);
fileNameStr.Replace("\\", "");
// Ignore some types of input files (e.g. macro definition files)
char *fileOnly = FileNameFromPath(fileName);
char *fileOnly = FileNameFromPath((char*) (const char*) fileNameStr);
currentFileName = fileOnly;
if (IgnorableInputFiles.Member(fileOnly))
return read_a_line(buf);
wxString actualFile = TexPathList.FindValidPath(fileName);
wxString actualFile = TexPathList.FindValidPath(fileNameStr);
if (actualFile == "")
{
char buf2[400];
sprintf(buf2, "%s.tex", fileName);
sprintf(buf2, "%s.tex", (const char*) fileNameStr);
actualFile = TexPathList.FindValidPath(buf2);
}
currentFileName = actualFile;
if (actualFile == "")
{
char errBuf[300];
@@ -575,6 +626,9 @@ bool read_a_line(char *buf)
// then we look in the same directory as this one.
TexPathList.EnsureFileAccessible(actualFile);
wxString informStr;
informStr.Printf("Processing: %s",actualFile.c_str());
OnInform((char *)informStr.c_str());
CurrentInputIndex ++;
Inputs[CurrentInputIndex] = fopen(actualFile, "r");
LineNumbers[CurrentInputIndex] = 1;
@@ -600,6 +654,15 @@ bool read_a_line(char *buf)
strncmp(buf, "\\end{toocomplex}", 16) == 0)
readInVerbatim = FALSE;
#if CHECK_BRACES
if (ch == EOF && leftCurly != rightCurly)
{
wxString errBuf;
errBuf.Printf("Curly braces do not match inside file %s\n%lu opens, %lu closes", (const char*) currentFileName.c_str(),leftCurly,rightCurly);
OnError((char *)errBuf.c_str());
}
#endif
return (ch == EOF);
}
@@ -2024,7 +2087,7 @@ void DefineDefaultMacros(void)
AddMacroDef(ltNABLA, "nabla", 0);
AddMacroDef(ltNEG, "neg", 0);
AddMacroDef(ltNEQ, "neq", 0);
AddMacroDef(ltNEWCOUNTER, "newcounter", 1, FALSE, FORBID_ABSOLUTELY);
AddMacroDef(ltNEWCOUNTER, "newcounter", 1, FALSE, (bool)FORBID_ABSOLUTELY);
AddMacroDef(ltNEWLINE, "newline", 0);
AddMacroDef(ltNEWPAGE, "newpage", 0);
AddMacroDef(ltNI, "ni", 0);
@@ -2077,8 +2140,8 @@ void DefineDefaultMacros(void)
AddMacroDef(ltPRECEQ, "preceq", 0);
AddMacroDef(ltPRINTINDEX, "printindex", 0);
AddMacroDef(ltPROPTO, "propto", 0);
AddMacroDef(ltPSBOXTO, "psboxto", 1, FALSE, FORBID_ABSOLUTELY);
AddMacroDef(ltPSBOX, "psbox", 1, FALSE, FORBID_ABSOLUTELY);
AddMacroDef(ltPSBOXTO, "psboxto", 1, FALSE, (bool)FORBID_ABSOLUTELY);
AddMacroDef(ltPSBOX, "psbox", 1, FALSE, (bool)FORBID_ABSOLUTELY);
AddMacroDef(ltPSI, "psi", 0);
AddMacroDef(ltCAP_PSI, "Psi", 0);

View File

@@ -105,7 +105,11 @@ void ShowOptions(void);
#ifdef NO_GUI
extern char *wxBuffer; // we must init it, otherwise tex2rtf will crash
#if wxUSE_GUI || !defined(__UNIX__)
// wxBase for Unix does not have wxBuffer
extern
#endif
char *wxBuffer; // we must init it, otherwise tex2rtf will crash
int main(int argc, char **argv)
#else
@@ -170,7 +174,8 @@ bool MyApp::OnInit()
if (!InputFile || !OutputFile)
isInteractive = TRUE;
for (int i = n; i < argc;)
int i;
for (i = n; i < argc;)
{
if (strcmp(argv[i], "-winhelp") == 0)
{
@@ -497,6 +502,7 @@ void MyFrame::OnExit(wxCommandEvent& event)
void MyFrame::OnGo(wxCommandEvent& event)
{
passNumber = 1;
menuBar->EnableTop(0, FALSE);
menuBar->EnableTop(1, FALSE);
menuBar->EnableTop(2, FALSE);
@@ -826,7 +832,7 @@ bool Go(void)
char buf[100];
#ifndef NO_GUI
long tim = wxGetElapsedTime();
sprintf(buf, "Finished in %ld seconds.", (long)(tim/1000.0));
sprintf(buf, "Finished PASS #%d in %ld seconds.\n", passNumber, (long)(tim/1000.0));
OnInform(buf);
if (isInteractive)
{

View File

@@ -528,10 +528,10 @@ void BibReadValue(istream& istr, char *buffer, bool ignoreBraces = TRUE,
while (!istr.eof() && !stopping)
{
// i ++;
if (i >= 2000)
if (i >= 4000)
{
char buf[100];
sprintf(buf, "Sorry, value > 2000 chars in bib file at line %ld, terminating.", BibLine);
sprintf(buf, "Sorry, value > 4000 chars in bib file at line %ld, terminating.", BibLine);
wxFatalError(buf, "Tex2RTF Fatal Error");
}
istr.get(ch);
@@ -581,7 +581,7 @@ bool ReadBib(char *filename)
OnInform("Reading .bib file...");
char ch;
char fieldValue[2000];
char fieldValue[4000];
char recordType[100];
char recordKey[100];
char recordField[100];