Applied Don Spear's patch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2001-04-05 15:18:42 +00:00
parent 921a43c1f6
commit c103ca4b4d

View File

@ -80,6 +80,11 @@ static bool inTable = FALSE;
// This is defined in the Tex2Any library. // This is defined in the Tex2Any library.
extern char *BigBuffer; extern char *BigBuffer;
// DHS Two-column table dimensions.
static int TwoColWidthA = -1;
static int TwoColWidthB = -1;
class HyperReference: public wxObject class HyperReference: public wxObject
{ {
public: public:
@ -1193,8 +1198,12 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
{ {
if ( start ) if ( start )
TexOutput("\n<TABLE>\n"); TexOutput("\n<TABLE>\n");
else else {
TexOutput("\n</TABLE>\n"); TexOutput("\n</TABLE>\n");
// DHS
TwoColWidthA = -1;
TwoColWidthB = -1;
}
break; break;
} }
case ltPAR: case ltPAR:
@ -2093,17 +2102,29 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
*/ */
if (arg_no == 1) if (arg_no == 1)
{ {
if ( start ) if ( start ) {
TexOutput("\n<TR><TD VALIGN=TOP>\n"); // DHS
else 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"); TexOutput("\n</TD>\n");
} }
if (arg_no == 2) if (arg_no == 2)
{ {
if ( start ) // DHS
TexOutput("\n<TD VALIGN=TOP>\n"); if ( start ) {
else if (TwoColWidthB > -1) {
TexOutput("\n</TD></TR>\n"); 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; return TRUE;
break; break;
@ -2157,6 +2178,30 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
TexOutput("<HR><P>\n"); TexOutput("<HR><P>\n");
break; 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 * Accents
* *