Corrected memory.cpp checkpoint bug; added Tex2RTF

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-01-02 00:45:39 +00:00
parent 07c5641a93
commit 9a29912f60
60 changed files with 23137 additions and 22 deletions

BIN
utils/tex2rtf/docs/back.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

View File

@@ -0,0 +1,145 @@
% fancyheadings.sty version 1.92
% Fancy headers and footers.
% Piet van Oostrum, Dept of Computer Science, University of Utrecht
% Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
% Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!sun4nl!ruuinf!piet)
% Sep 16, 1994
% version 1.4: Correction for use with \reversemargin
% Sep 29, 1994:
% version 1.5: Added the \iftopfloat, \ifbotfloat and \iffloatpage commands
% Oct 4, 1994:
% version 1.6: Reset single spacing in headers/footers for use with
% setspace.sty or doublespace.sty
% Oct 4, 1994:
% version 1.7: changed \let\@mkboth\markboth to
% \def\@mkboth{\protect\markboth} to make it more robust
% Dec 5, 1994:
% version 1.8: corrections for amsbook/amsart: define \@chapapp and (more
% importantly) use the \chapter/sectionmark definitions from ps@headings if
% they exist (which should be true for all standard classes).
% May 31, 1995:
% version 1.9: The proposed \renewcommand{\headrulewidth}{\iffloatpage...
% construction in the doc did not work properly with the fancyplain style.
% June 1, 1995:
% version 1.91: The definition of \@mkboth wasn't restored on subsequent
% \pagestyle{fancy}'s.
% June 1, 1995:
% version 1.92: The sequence \pagestyle{fancyplain} \pagestyle{plain}
% \pagestyle{fancy} would erroneously select the plain version.
\def\lhead{\@ifnextchar[{\@xlhead}{\@ylhead}}
\def\@xlhead[#1]#2{\gdef\@elhead{#1}\gdef\@olhead{#2}}
\def\@ylhead#1{\gdef\@elhead{#1}\gdef\@olhead{#1}}
\def\chead{\@ifnextchar[{\@xchead}{\@ychead}}
\def\@xchead[#1]#2{\gdef\@echead{#1}\gdef\@ochead{#2}}
\def\@ychead#1{\gdef\@echead{#1}\gdef\@ochead{#1}}
\def\rhead{\@ifnextchar[{\@xrhead}{\@yrhead}}
\def\@xrhead[#1]#2{\gdef\@erhead{#1}\gdef\@orhead{#2}}
\def\@yrhead#1{\gdef\@erhead{#1}\gdef\@orhead{#1}}
\def\lfoot{\@ifnextchar[{\@xlfoot}{\@ylfoot}}
\def\@xlfoot[#1]#2{\gdef\@elfoot{#1}\gdef\@olfoot{#2}}
\def\@ylfoot#1{\gdef\@elfoot{#1}\gdef\@olfoot{#1}}
\def\cfoot{\@ifnextchar[{\@xcfoot}{\@ycfoot}}
\def\@xcfoot[#1]#2{\gdef\@ecfoot{#1}\gdef\@ocfoot{#2}}
\def\@ycfoot#1{\gdef\@ecfoot{#1}\gdef\@ocfoot{#1}}
\def\rfoot{\@ifnextchar[{\@xrfoot}{\@yrfoot}}
\def\@xrfoot[#1]#2{\gdef\@erfoot{#1}\gdef\@orfoot{#2}}
\def\@yrfoot#1{\gdef\@erfoot{#1}\gdef\@orfoot{#1}}
\newdimen\headrulewidth
\newdimen\footrulewidth
\newdimen\plainheadrulewidth
\newdimen\plainfootrulewidth
\newdimen\headwidth
\newif\if@fancyplain
\def\fancyplain#1#2{\if@fancyplain#1\else#2\fi}
% Command to reset various things in the headers:
% a.o. single spacing (taken from setspace.sty)
% and the catcode of ^^M (so that epsf files in the header work if a
% verbatim crosses a page boundary)
\def\fancy@reset{\restorecr
\def\baselinestretch{1}%
\ifx\undefined\@newbaseline% NFSS not present; 2.09 or 2e
\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi%
\else% NFSS (2.09) present
\@newbaseline%
\fi}
% Initialization of the head and foot text.
\headrulewidth 0.4pt
\footrulewidth\z@
\plainheadrulewidth\z@
\plainfootrulewidth\z@
\lhead[\fancyplain{}{\sl\rightmark}]{\fancyplain{}{\sl\leftmark}}
% i.e. empty on ``plain'' pages, \rightmark on even, \leftmark on odd pages
\chead{}
\rhead[\fancyplain{}{\sl\leftmark}]{\fancyplain{}{\sl\rightmark}}
% i.e. empty on ``plain'' pages, \leftmark on even, \rightmark on odd pages
\lfoot{}
\cfoot{\rm\thepage} % page number
\rfoot{}
% Put together a header or footer given the left, center and
% right text, fillers at left and right and a rule.
% The \lap commands put the text into an hbox of zero size,
% so overlapping text does not generate an errormessage.
\def\@fancyhead#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset\vbox{\hbox
{\rlap{\parbox[b]{\headwidth}{\raggedright#2\strut}}\hfill
\parbox[b]{\headwidth}{\centering#3\strut}\hfill
\llap{\parbox[b]{\headwidth}{\raggedleft#4\strut}}}\headrule}}#5}
\def\@fancyfoot#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset\vbox{\footrule
\hbox{\rlap{\parbox[t]{\headwidth}{\raggedright#2\strut}}\hfill
\parbox[t]{\headwidth}{\centering#3\strut}\hfill
\llap{\parbox[t]{\headwidth}{\raggedleft#4\strut}}}}}#5}
\def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi
\hrule\@height\headrulewidth\@width\headwidth \vskip-\headrulewidth}}
\def\footrule{{\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi
\vskip-0.3\normalbaselineskip\vskip-\footrulewidth
\hrule\@width\headwidth\@height\footrulewidth\vskip0.3\normalbaselineskip}}
\def\ps@fancy{%
\@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook
\@ifundefined{chapter}{\def\sectionmark##1{\markboth
{\uppercase{\ifnum \c@secnumdepth>\z@
\thesection\hskip 1em\relax \fi ##1}}{}}%
\def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne
\thesubsection\hskip 1em\relax \fi ##1}}}%
{\def\chaptermark##1{\markboth {\uppercase{\ifnum \c@secnumdepth>\m@ne
\@chapapp\ \thechapter. \ \fi ##1}}{}}
\def\sectionmark##1{\markright{\uppercase{\ifnum \c@secnumdepth >\z@
\thesection. \ \fi ##1}}}}%
\csname ps@headings\endcsname % use \ps@headings defaults if they exist
\ps@@fancy
\gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}%
\headwidth\textwidth}
\def\ps@fancyplain{\ps@fancy \let\ps@plain\ps@plain@fancy}
\def\ps@plain@fancy{\@fancyplaintrue\ps@@fancy}
\def\ps@@fancy{%
\def\@mkboth{\protect\markboth}%
\def\@oddhead{\@fancyhead\@lodd\@olhead\@ochead\@orhead\@rodd}%
\def\@oddfoot{\@fancyfoot\@lodd\@olfoot\@ocfoot\@orfoot\@rodd}%
\def\@evenhead{\@fancyhead\@rodd\@elhead\@echead\@erhead\@lodd}%
\def\@evenfoot{\@fancyfoot\@rodd\@elfoot\@ecfoot\@erfoot\@lodd}%
}
\def\@lodd{\if@reversemargin\hss\else\relax\fi}
\def\@rodd{\if@reversemargin\relax\else\hss\fi}
\let\latex@makecol\@makecol
\def\@makecol{\let\topfloat\@toplist\let\botfloat\@botlist\latex@makecol}
\def\iftopfloat#1#2{\ifx\topfloat\empty #2\else #1\fi}
\def\ifbotfloat#1#2{\ifx\botfloat\empty #2\else #1\fi}
\def\iffloatpage#1#2{\if@fcolmade #1\else #2\fi}

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

View File

@@ -0,0 +1,43 @@
Installation Instructions for Tex2RTF
-------------------------------------
Binaries are supplied for Windows 3.1 and for Sun workstations.
If these don't work for you, or you are using a different system, you
will need to compile Tex2RTF. There are several options for doing this.
(1) GUI version
If you want to have a graphical interface for Tex2RTF
(not essential for a conversion utility!) then you
will need to download wxWindows from skye.aiai.ed.ac.uk
(192.41.104.6) in the directory /pub/wxwin/beta, files
wx150?_*.tar.Z (or .gz) where ? is the latest beta letter,
currently i.
On UNIX, you will then need to decide whether you want to produce
an XView or Motif version (provided you have one of these
toolkits), and change the makefiles in accordingly,
in wx/src/x, wx/src/base and wx/utils/tex2rtf/src.
Use the makefile target 'xview' or 'motif' from each of the directories
wx/src/x and wx/utils/tex2rtf/src.
Under Windows, just type 'nmake -f makefile.dos' if you're
using a Microsoft-compatible compiler (you'll need to
change the makefiles or build project files for other compilers.)
(2) Non-GUI version
Under UNIX, simply use the target 'nogui'. The supplied files in the
src/wxwin directory supply the essential utilities from wxWindows, and
Tex2RTF will be built as a command-line program.
On a PC, add 'NOGUI=1' to the makefile command line. Note that the small
amount of memory available under DOS can cause catastrophic crashes for
large input files, due to the lack of memory checking, so be warned! The
Windows version is a more sensible choice.
-------------------------------------------------------------------------
Julian Smart, February 1993
J.Smart@ed.ac.uk

View File

@@ -0,0 +1,11 @@
% makeidx.sty 20-Jan-87 modified for international usage
%
% Modified by J.Schrod (TeXsys).
% according to the suggestion of H.Partl (TU Wien) in german.sty
% to make caption names adaptable to other languages.
\@ifundefined{seeterm}{\def\seeterm{see}}{} % <-----------
\def\see#1#2{{\em \seeterm\/} #1}
\def\printindex{\@input{\jobname.ind}}

View File

@@ -0,0 +1,154 @@
% SOBER.STY van Nico Poppelier
% Adapted by Julian Smart for his own
% nefarious purposes
% --------------------------------------
% Koppen van secties, subsecties, ...
% --------------------------------------
%
% --------------------------------------
% fontgrootte en regelafstand
% (met de notatie X/Y wordt bedoeld
% 'letter X op regelafstand Y')
% --------------------------------------
%
% 10pt 11pt 12pt
% \scriptsize 7/ 8 8/ 9.5 8/ 9.5
% \tiny 5/ 6 6/ 7 6/ 7
% \small 9/11 10/12 11/13.6
% \footnotesize 8/ 9.5 9/11 10/12
% \@normalsize 10/12 11/13.6 12/15
% \large 12/14 12/14 14/18
% \Large 14/18 14/18 17/22
% \LARGE 17/22 17/22 20/25
% \huge 20/25 20/25 25/30
% \Huge 25/30 25/30 25/30
%
% de syntax van \@startsection is:
% \@startsection
% {Name}{Level}{Indent}{Before_skip}{After_Skip}{Type_face}
% Indent : inspring van kop vanaf linkermarge
% Before_skip: wit boven kopje
% (< 0 geeft aan dat eerste alinea niet inspringt)
% After_skip : wit onder kopje indien >= 0
% horizontaal wit na kopje,
% met kopje op de regel indien < 0
%
% notatie voor <glue>: <dimen>(<stretch>)(<shrink>)
%
% in LaTeX's standaard-stijlen (onafhankelijk van \@ptsize):
%
% Indent Before_skip After_skip Type_face
% section 0 -3.5ex (-1ex)(-0.2ex) 2.3ex(0.2ex) \Large\bf
% subsection 0 -3.25ex(-1ex)(-0.2ex) 1.5ex(0.2ex) \large\bf
% subsubsection 0 -3.25ex(-1ex)(-0.2ex) 1.5ex(0.2ex) \normalsize\bf
% paragraph 0 3.25ex( 1ex)( 0.2ex) -1em()() \normalsize\bf
% subparagraph \parindent 3.25ex( 1ex)( 0.2ex) -1em()() \normalsize\bf
%
%
% in een soberder uitvoering (onafhankelijk van \@ptsize):
%
\def\section{\@startsection{section}{1}
%{\z@}{-2.5ex plus -0.5ex minus -0.1ex}{0.5ex plus 0.1ex}{\large\bf}}
{\z@}{-2.5ex plus -0.5ex minus -0.1ex}{0.5ex plus 0.1ex}{\large\bf}}
\def\subsection{\@startsection{subsection}{2}
{\z@}{-2.25ex plus -0.3ex minus -0.2ex}{0.05ex plus 0.05ex}{\normalsize\bf}}
\def\subsubsection{\@startsection{subsubsection}{3}
{\z@}{-2.25ex plus -0.3ex minus -0.2ex}{0.05ex plus 0.05ex}{\normalsize\sc}}
\def\paragraph{\@startsection{paragraph}{4}
{\z@}{2ex plus 0.5ex minus 0.1ex}{-0.7em}{\normalsize\it}}
\def\subparagraph{\@startsection{subparagraph}{4}
{\parindent}{2ex plus 0.5ex minus 0.1ex}{-0.7em}{\normalsize\it}}
%
% --------------------------------------
% Hoofdstuk-koppen
% --------------------------------------
%
% LaTeX's book style (standaard documentstijl) definieert
% de hoofdstuk-koppen onafhankelijk van \@ptsize
%
\def\@makechapterhead#1{\vspace*{20pt}%
% Next line repaired by Piet van Oostrum - June 14, 1991.
%{\parindent 0pt\Large\bf \ifnum\c@secnumdepth>\m@ne\thechapter \fi
{\parindent 0pt\LARGE\bf \ifnum\c@secnumdepth>\m@ne\thechapter. \hskip 1em \fi%
{\raggedright\LARGE\bf #1}\\\rule[10pt]{\textwidth}{0.3mm}\par\nobreak \vskip25pt} }
\def\@makeschapterhead#1{
\vspace*{20pt} { \parindent 0pt \raggedright
\LARGE\bf#1\par\nobreak\vskip25pt } }
%
% --------------------------------------
% List-omgevingen (itemize en enumerate)
% --------------------------------------
%
% De volgende parameters zijn relevant in een list-omgeving:
%
% \labelsep : afstand tussen label en item
% \labelwidth : breedte van label
% \leftmargin : afstand tussen linkermarge en item
% \rightmargin : afstand tussen item en rechtermarge
% \listparindent: indentatie voor vervolg-alinea's in item
% \parsep : verticaal wit tussen vervolg-alinea's in item
% \itemsep : verticaal wit tussen opeenvolgende item's
% \topsep,
% \partopsep : wit boven item 1 = \topsep + \parskip
% (geen alinea-overgang boven lijst)
% wit boven item 1 = \topsep + \parskip + \partopsep
% (alinea-overgang boven lijst)
%
% zie verder LaTeX-boek 5.7.1 en C.5.3
% --------------------------------------
%
% De parameters voor niveau 1 worden gedefinieerd op top-niveau en
% \@listi definieert uitsluitend \leftmargin
%
% size = small (9pt, 10pt, 11pt)
\def\@listi{\topsep 0.4ex \parsep 0pt \itemsep \parsep}
% \topsep 4pt(2pt)(2pt) 6pt(2pt)(2pt) 9pt(3pt)(5pt)
% \parsep 2pt(1pt)(1pt) 3pt(2pt)(1pt) 4.5pt(2pt)(1pt)
%
% size = footnotesize (8pt, 9pt, 10pt)
\def\@listi{\topsep 0.4ex \parsep 0pt \itemsep \parsep}
% \topsep 3pt(1pt)(1pt) 4pt(2pt)(2pt) 6pt(2pt)(2pt)
% \parsep 2pt(1pt)(1pt) 2pt(1pt)(1pt) 3pt(2pt)(1pt)
%
% size = normalsize (and bigger)
% \parskip 0pt(1pt) 0pt(1pt) 0pt(1pt)
% \parindent 15pt 17pt 1.5em
% \topsep 8pt(2pt)(4pt) 9pt(3pt)(5pt) 10pt(4pt)(6pt)
% \partopsep 2pt(1pt)(1pt) 3pt(1pt)(2pt) 3pt(2pt)(2pt)
% \itemsep 4pt(2pt)(1pt) 4.5pt(2pt)(1pt) 5pt(2.5pt)(1pt
% \parsep 4pt(2pt)(1pt) 4.5pt(2pt)(1pt) 5pt(2.5pt)(1pt)
\topsep 0.4ex \partopsep 0pt \itemsep 0pt \parsep 0pt
%
% \leftmargini 2.5em \leftmarginii 2.2em \leftmarginiii 1.87em
% \leftmarginiv 1.7em \leftmarginv 1.0em \leftmarginvi 1.0em
%
% \leftmargin\leftmargini
% \labelwidth\leftmargini\advance\labelwidth-\labelsep
% \labelsep 0.5em
%
% \def\@listi{\leftmargin\leftmargini}
%
\def\@listii{\leftmargin\leftmarginii
\labelwidth\leftmarginii\advance\labelwidth-\labelsep
% \topsep 4pt(2pt)(1pt) 4.5pt(2pt)(1pt) 5pt(2.5pt)(1pt)
% \parsep 2pt(1pt)(1pt) 2pt(1pt)(1pt) 2.5pt(1pt)(1pt)
\topsep 0pt \parsep 0pt \itemsep \parsep}
%
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii\advance\labelwidth-\labelsep
% \topsep 2pt(1pt)(1pt) 2pt(1pt)(1pt) 2.5pt(1pt)(1pt)
% \partopsep 1pt(0pt)(1pt) 1pt(0pt)(1pt) 1pt(0pt)(1pt)
\parsep \z@ \topsep 0pt \partopsep 0pt \itemsep \topsep}
%
% \def\@listiv{\leftmargin\leftmarginiv
% \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
%
% \def\@listv{ \leftmargin\leftmarginv
% \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
%
% \def\@listvi{\leftmargin\leftmarginvi
% \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}

View File

@@ -0,0 +1,33 @@
% mytitle.sty
% Julian Smart's Enhanced Titlepage
\def\maketitle{\begin{titlepage}
\let\footnotesize\small \let\footnoterule\relax \setcounter{page}{0}
%\null
%\vfil
\vspace*{2cm}\begin{flushleft}
{\huge \sf\@title\\\rule{\textwidth}{0.5mm}} \vskip 3em {\large \lineskip .75em
{\sf\@author}
\par}
\vskip 1.5em {\large\sf \@date \par} \end{flushleft} \par
\@thanks
\vfill
{\sf\small\begin{flushright}%
Artificial Intelligence Applications Institute\\
University of Edinburgh\\
80 South Bridge\\
EH1 1HN\\
Tel. 0131-650-2746
\end{flushright}}
\null
\end{titlepage}
\setcounter{footnote}{0} \let\thanks\relax
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\maketitle\relax}
\def\abstractname{Abstract} % <----------
\def\abstract{\titlepage
\null\vfil
\begin{center}
{\bf \abstractname} % <----------
% {\bf Abstract}
\end{center}}
\def\endabstract{\par\vfil\null\endtitlepage}

View File

@@ -0,0 +1,140 @@
Implementation notes
--------------------
Files
-----
The library tex2any.lib contains the generic Latex parser.
It comprises tex2any.cc, tex2any.h and texutils.cc.
The executable Tex2RTF is made up of tex2any.lib,
tex2rtf.cc (main driver and user interface), and specific
drivers for generating output: rtfutils.cc, htmlutil.cc
and xlputils.cc.
Data structures
---------------
Class declarations are found in tex2any.h.
TexMacroDef holds a macro (Latex command) definition: name, identifier,
number of arguments, whether it should be ignored, etc. Integer
identifiers are used for each Latex command for efficiency when
generating output. A hash table MacroDefs stores all the TexMacroDefs,
indexed on command name.
Each unit of a Latex file is stored in a TexChunk. A TexChunk can be
a macro, argument or just a string: a TexChunk macro has child
chunks for the arguments, and each argument will have one or more
children for representing another command or a simple string.
Parsing
-------
Parsing is relatively add hoc. read_a_line reads in a line at a time,
doing some processing for file commands (e.g. input, verbatiminclude).
File handles are stored in a stack so file input commands may be nested.
ParseArg parses an argument (which might be the whole Latex input,
which is treated as an argument) or a single command, or a command
argument. The parsing gets a little hairy because an environment,
a normal command and bracketed commands (e.g. {\bf thing}) all get
parsed into the same format. An environment, for example,
is usually a one-argument command, as is {\bf thing}. It also
deals with user-defined macros.
Whilst parsing, the function MatchMacro gets called to
attempt to find a command following a backslash (or the
start of an environment). ParseMacroBody parses the
arguments of a command when one is found.
Generation
----------
The upshot of parsing is a hierarchy of TexChunks.
TraverseFromDocument calls the recursive TraverseFromChunk,
and is called by the 'client' converter application to
start the generation process. TraverseFromChunk
calls the two functions OnMacro and OnArgument,
twice for each chunk to allow for preprocessing
and postprocessing of each macro or argument.
The client defines OnMacro and OnArgument to test
the command identifier, and output the appropriate
code. To help do this, the function TexOutput
outputs to the current stream(s), and
SetCurrentOutput(s) allows the setting of one
or two output streams for the output to be sent to.
Usually two outputs at a time are sufficient for
hypertext applications where a title is likely
to appear in an index and as a section header.
There are support functions for getting the string
data for the current chunk (GetArgData) and the
current chunk (GetArgChunk). If you have a handle
on a chunk, you can output it several times by calling
TraverseChildrenFromChunk (not TraverseFromChunk because
that causes infinite recursion).
The client (here, Tex2RTF) also defines OnError and OnInform output
functions appropriate to the desired user interface.
References
----------
Adding, finding and resolving references are supported
with functions from texutils.cc. WriteTexReferences
and ReadTexReferences allow saving and reading references
between conversion processes, rather like real LaTeX.
Bibliography
------------
Again texutils.cc provides functions for reading in .bib files and
resolving references. The function OutputBibItem gives a generic way
outputting bibliography items, by 'faking' calls to OnMacro and
OnArgument, allowing the existing low-level client code to take care of
formatting.
Units
-----
Unit parsing code is in texutils.cc as ParseUnitArgument. It converts
units to points.
Common errors
-------------
1) Macro not found: \end{center} ...
Rewrite:
\begin{center}
{\large{\underline{A}}}
\end{center}
as:
\begin{center}
{\large \underline{A}}
\end{center}
2) Tables crash RTF. Set 'compatibility ' to TRUE in .ini file; also
check for \\ end of row characters on their own on a line, insert
correct number of ampersands for the number of columns. E.g.
hello & world\\
\\
becomes
hello & world\\
&\\
3) If list items indent erratically, try increasing
listItemIndent to give more space between label and following text.
A global replace of '\item [' to '\item[' may also be helpful to remove
unnecessary space before the item label.
4) Missing figure or section references: ensure all labels _directly_ follow captions
or sections (no intervening white space).

View File

@@ -0,0 +1,520 @@
%
% %%%%%%% %%%%% %%%%%% %%%%% % %
% % % % % % % % % %
% % % % % % % % % %
% %%%%%%% %%%%% %%%%%% % % %
% % % % % % % % %
% % % % % % % % %
% % %%%%%% %%%%%% %%%%% % %
%
% By Jean Orloff
% Comments & suggestions by e-mail: ORLOFF@surya11.cern.ch
% No modification of this file allowed if not e-sent to me.
%
% A simple way to measure the size of encapsulated postscript figures
% from inside TeX, and to use it for automatically formatting texts
% with inserted figures. Works both under Plain TeX-based macros
% (Phyzzx, Harvmac, Psizzl, ...) and LaTeX environment.
% Provides exactly the same result on any PostScript printer provided
% the single instruction \psfor... is changed to fit the needs of the
% particular dvi->ps translator used.
% History:
% 1.31: adds \psforDVIALW(?)
% 1.30: adds \splitfile & \joinfiles for multi-file management
% 1.24: fix error handling & add \psonlyboxes
% 1.23: adds \putsp@ce for OzTeX fix
% 1.22: makes \drawingBox \global for use in Phyzzx
% 1.21: accepts %%BoundingBox: (atend)
% 1.20: tries to add \psfordvitps for the TeXPS package.
% 1.10: adds \psforoztex, error handling...
%2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 2345678 7 23456789
%
\def\temp{1.31}
\let\tempp=\relax
\expandafter\ifx\csname psboxversion\endcsname\relax
\message{version: \temp}
\else
\ifdim\temp cm>\psboxversion cm
\message{version: \temp}
\else
\message{psbox(\psboxversion) is already loaded: I won't load
psbox(\temp)!}
\let\temp=\psboxversion
\let\tempp=\endinput
\fi
\fi
\tempp
\let\psboxversion=\temp
\catcode`\@=11
% Every macro likes a little privacy...
%
% Some common defs
%
\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
\def\executeinspecs#1{%
\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
%
%Trying to tame the variety of \special commands for Postscript: the
% universal internal command \PSspeci@l##1##2 takes ##1 to be the
% filename and ##2 to be the integer scale factor*1000 (as for usual
% TeX \scale commands)
%
\def\psfortextures{% For TeXtures on the Macintosh
%-----------------
\def\PSspeci@l##1##2{%
\special{illustration ##1\space scaled ##2}%
}}
%
\def\psfordvitops{% For the DVItoPS converter on IBM mainframes
%----------------
\def\PSspeci@l##1##2{%
\special{dvitops: import ##1\space \the\drawingwd \the\drawinght}%
}}
%
\def\psfordvips{% For DVIPS converter on VAX, UNIX and PC's
%--------------
\def\PSspeci@l##1##2{%
% \special{/@scaleunit 1000 def}% never read dox without trying!
\d@my=0.1bp \d@mx=\drawingwd \divide\d@mx by\d@my%
\special{PSfile=##1\space llx=\psllx\space lly=\pslly\space%
urx=\psurx\space ury=\psury\space rwi=\number\d@mx}%
}}
%
\def\psforoztex{% For the OzTeX shareware on the Macintosh
%--------------
\def\PSspeci@l##1##2{%
\special{##1 \space
##2 1000 div dup scale
\putsp@ce{\number-\psllx} \putsp@ce{\number-\pslly} translate
}%
}}
\def\putsp@ce#1{#1 }
%
\def\psfordvitps{% From the UNIX TeXPS package, vers.>3.12
%---------------
% Convert a dimension into the number \psn@sp (in scaled points)
\def\psdimt@n@sp##1{\d@mx=##1\relax\edef\psn@sp{\number\d@mx}}
\def\PSspeci@l##1##2{%
% psfig.psr contains the def of "startTexFig": if you can locate it
% and include the correct pathname, it should work
\special{dvitps: Include0 "psfig.psr"}% contains def of "startTexFig"
\psdimt@n@sp{\drawingwd}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\drawinght}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\psllx bp}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\pslly bp}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\psurx bp}
\special{dvitps: Literal "\psn@sp\space"}
\psdimt@n@sp{\psury bp}
\special{dvitps: Literal "\psn@sp\space startTexFig\space"}
\special{dvitps: Include1 "##1"}
\special{dvitps: Literal "endTexFig\space"}
}}
\def\psforDVIALW{% Try for dvialw, a UNIX public domain
%---------------
\def\PSspeci@l##1##2{
\special{language "PS"
literal "##2 1000 div dup scale"
include "##1"}}}
\def\psonlyboxes{% Draft-like behaviour if none of the others works
%---------------
\def\PSspeci@l##1##2{%
\at(0cm;0cm){\boxit{\vbox to\drawinght
{\vss
\hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1)}}\hss}
}}}
}%
}
%
\def\psloc@lerr#1{%
\let\savedPSspeci@l=\PSspeci@l%
\def\PSspeci@l##1##2{%
\at(0cm;0cm){\boxit{\vbox to\drawinght
{\vss
\hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1) #1}}\hss}
}}}
\let\PSspeci@l=\savedPSspeci@l% restore normal output for other figs!
}%
}
%
%\def\psfor... add your own!
%
% \ReadPSize{PSfilename} reads the dimensions of a PostScript drawing
% and stores it in \drawinght(wd)
\newread\pst@mpin
\newdimen\drawinght\newdimen\drawingwd
\newdimen\psxoffset\newdimen\psyoffset
\newbox\drawingBox
\newif\ifNotB@undingBox
\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of
your graphics (Jean Orloff).}
\def\@mpty{}
\def\s@tsize#1 #2 #3 #4\@ndsize{
\def\psllx{#1}\def\pslly{#2}%
\def\psurx{#3}\def\psury{#4}% needed by a crazyness of dvips!
\ifx\psurx\@mpty\NotB@undingBoxtrue% this is not a valid one!
\else
\drawinght=#4bp\advance\drawinght by-#2bp
\drawingwd=#3bp\advance\drawingwd by-#1bp
% !Units related by crazy factors as bp/pt=72.27/72 should be BANNED!
\fi
}
\def\sc@nline#1:#2\@ndline{\edef\p@rameter{#1}\edef\v@lue{#2}}
\def\g@bblefirstblank#1#2:{\ifx#1 \else#1\fi#2}
\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
\def\execute#1{#1}% Seems stupid, but cs are identified BEFORE execution
{\catcode`\%=12
\xdef\B@undingBox{%%BoundingBox}
} %% is not a true comment in PostScript, even if % is!
\def\ReadPSize#1{
\edef\PSfilename{#1}
\openin\pst@mpin=#1\relax
\ifeof\pst@mpin \errhelp=\PShelp
\errmessage{I haven't found your postscript file (\PSfilename)}
\psloc@lerr{was not found}
\s@tsize 0 0 142 142\@ndsize
\closein\pst@mpin
\else
\immediate\write\psbj@inaux{#1,}
\loop
\executeinspecs{\catcode`\ =10\global\read\pst@mpin to\n@xtline}
\ifeof\pst@mpin
\errhelp=\PShelp
\errmessage{(\PSfilename) is not an Encapsulated PostScript File:
I could not find any \B@undingBox: line.}
\edef\v@lue{0 0 142 142:}
\psloc@lerr{is not an EPSFile}
\NotB@undingBoxfalse
\else
\expandafter\sc@nline\n@xtline:\@ndline
\ifx\p@rameter\B@undingBox\NotB@undingBoxfalse
\edef\t@mp{%
\expandafter\g@bblefirstblank\v@lue\space\space\space}
\expandafter\s@tsize\t@mp\@ndsize
\else\NotB@undingBoxtrue
\fi
\fi
\ifNotB@undingBox\repeat
\closein\pst@mpin
\fi
\message{#1}
}
%
% \psboxto(xdim;ydim){psfilename}: you specify the dimensions and
% TeX uniformly scales to fit the largest one. If xdim=0pt, the
% scale is fully determined by ydim and vice versa.
% Notice: psboxes are a real vboxes; couldn't take hbox otherwise all
% indentation and all cr's would be interpreted as spaces (hugh!).
%
\newcount\xscale \newcount\yscale \newdimen\pscm\pscm=1cm
\newdimen\d@mx \newdimen\d@my
\let\ps@nnotation=\relax
\def\psboxto(#1;#2)#3{\vbox{
\ReadPSize{#3}
\divide\drawingwd by 1000
\divide\drawinght by 1000
\d@mx=#1
\ifdim\d@mx=0pt\xscale=1000
\else \xscale=\d@mx \divide \xscale by \drawingwd\fi
\d@my=#2
\ifdim\d@my=0pt\yscale=1000
\else \yscale=\d@my \divide \yscale by \drawinght\fi
\ifnum\yscale=1000
\else\ifnum\xscale=1000\xscale=\yscale
\else\ifnum\yscale<\xscale\xscale=\yscale\fi
\fi
\fi
\divide \psxoffset by 1000\multiply\psxoffset by \xscale
\divide \psyoffset by 1000\multiply\psyoffset by \xscale
\global\divide\pscm by 1000
\global\multiply\pscm by\xscale
\multiply\drawingwd by\xscale \multiply\drawinght by\xscale
\ifdim\d@mx=0pt\d@mx=\drawingwd\fi
\ifdim\d@my=0pt\d@my=\drawinght\fi
\message{scaled \the\xscale}
\hbox to\d@mx{\hss\vbox to\d@my{\vss
\global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
\kern-\psyoffset
\PSspeci@l{\PSfilename}{\the\xscale}
\vss}\hss\ps@nnotation}
\global\ht\drawingBox=\the\drawinght
\global\wd\drawingBox=\the\drawingwd
\baselineskip=0pt
\copy\drawingBox
\vss}\hss}
\global\psxoffset=0pt
\global\psyoffset=0pt% These are local to one figure
\global\pscm=1cm
\global\drawingwd=\drawingwd
\global\drawinght=\drawinght
}}
%
% \psboxscaled{scalefactor*1000}{PSfilename} allows to bypass the
% rounding errors of TeX integer divisions for situations where the
% TeX box should fit the original BoundingBox with a precision better
% than 1/1000.
%
\def\psboxscaled#1#2{\vbox{
\ReadPSize{#2}
\xscale=#1
\message{scaled \the\xscale}
\divide\drawingwd by 1000\multiply\drawingwd by\xscale
\divide\drawinght by 1000\multiply\drawinght by\xscale
\divide \psxoffset by 1000\multiply\psxoffset by \xscale
\divide \psyoffset by 1000\multiply\psyoffset by \xscale
\global\divide\pscm by 1000
\global\multiply\pscm by\xscale
\global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
\kern-\psyoffset
\PSspeci@l{\PSfilename}{\the\xscale}
\vss}\hss\ps@nnotation}
\global\ht\drawingBox=\the\drawinght
\global\wd\drawingBox=\the\drawingwd
\baselineskip=0pt
\copy\drawingBox
\global\psxoffset=0pt
\global\psyoffset=0pt% These are local to one figure
\global\pscm=1cm
\global\drawingwd=\drawingwd
\global\drawinght=\drawinght
}}
%
% \psbox{PSfilename} makes a TeX box having the minimal size to
% enclose the picture
\def\psbox#1{\psboxscaled{1000}{#1}}
%
%
% \joinfiles file1, file2, ...n \into joinedfilename .
% makes one file out of many
% \splitfile joinedfilename
% the opposite
%
%\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
%\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
%\def\executeinspecs#1{%
%\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
%\newread\pst@mpin
\newif\ifn@teof\n@teoftrue
\newif\ifc@ntrolline
\newif\ifmatch
\newread\j@insplitin
\newwrite\j@insplitout
\newwrite\psbj@inaux
\immediate\openout\psbj@inaux=psbjoin.aux
\immediate\write\psbj@inaux{\string\joinfiles}
\immediate\write\psbj@inaux{\jobname,}
%
% We redefine input to keep track of the various files inputted
%
\immediate\let\oldinput=\input
\def\input#1 {
\immediate\write\psbj@inaux{#1,}
\oldinput #1 }
\def\empty{}
\def\setmatchif#1\contains#2{
\def\match##1#2##2\endmatch{
\def\tmp{##2}
\ifx\empty\tmp
\matchfalse
\else
\matchtrue
\fi}
\match#1#2\endmatch}
\def\warnopenout#1#2{
\setmatchif{TrashMe,psbjoin.aux,psbjoin.all}\contains{#2}
\ifmatch
\else
\immediate\openin\pst@mpin=#2
\ifeof\pst@mpin
\else
\errhelp{If the content of this file is so precious to you, abort (ie
press x or e) and rename it before retrying.}
\errmessage{I'm just about to replace your file named #2}
\fi
\immediate\closein\pst@mpin
\fi
\message{#2}
\immediate\openout#1=#2}
% No comments allowed below: % will have an unusual catcode
{
\catcode`\%=12
\gdef\splitfile#1 {
\immediate\openin\j@insplitin=#1
\message{Splitting file #1 into:}
\warnopenout\j@insplitout{TrashMe}
\loop
\ifeof
\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
\else
\n@teoftrue
\executeinspecs{\global\read\j@insplitin to\spl@tinline\expandafter
\ch@ckbeginnewfile\spl@tinline%Beginning-Of-File-Named:%\endcheck}
\ifc@ntrolline
\else
\toks0=\expandafter{\spl@tinline}
\immediate\write\j@insplitout{\the\toks0}
\fi
\fi
\ifn@teof\repeat
\immediate\closeout\j@insplitout}
\gdef\ch@ckbeginnewfile#1%Beginning-Of-File-Named:#2%#3\endcheck{
\def\t@mp{#1}
\ifx\empty\t@mp
\def\t@mp{#3}
\ifx\empty\t@mp
\global\c@ntrollinefalse
\else
\immediate\closeout\j@insplitout
\warnopenout\j@insplitout{#2}
\global\c@ntrollinetrue
\fi
\else
\global\c@ntrollinefalse
\fi}
\gdef\joinfiles#1\into#2 {
\message{Joining following files into}
\warnopenout\j@insplitout{#2}
\message{:}
{
\edef\w@##1{\immediate\write\j@insplitout{##1}}
\w@{% This text was produced with psbox's \string\joinfiles.}
\w@{% To decompose and tex it:}
\w@{%-save this with a filename CONTAINING ONLY LETTERS, and no extensions}
\w@{% (say, JOINTFIL), in some uncrowded directory;}
\w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);}
\w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by}
\w@{% the first part in the joining (after splitting JOINTFIL into}
\w@{% it's constituents, TeX will try to process it as it stands).}
\w@{\string\input\space psbox.tex}
\w@{\string\splitfile{\string\jobname}}
}
\tre@tfilelist#1, \endtre@t
\immediate\closeout\j@insplitout}
\gdef\tre@tfilelist#1, #2\endtre@t{
\def\t@mp{#1}
\ifx\empty\t@mp
\else
\llj@in{#1}
\tre@tfilelist#2, \endtre@t
\fi}
\gdef\llj@in#1{
\immediate\openin\j@insplitin=#1
\ifeof\j@insplitin
\errmessage{I couldn't find file #1.}
\else
\message{#1}
\toks0={%Beginning-Of-File-Named:#1}
\immediate\write\j@insplitout{\the\toks0}
\executeinspecs{\global\read\j@insplitin to\oldj@ininline}
\loop
\ifeof\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
\else\n@teoftrue
\executeinspecs{\global\read\j@insplitin to\j@ininline}
\toks0=\expandafter{\oldj@ininline}
\let\oldj@ininline=\j@ininline
\immediate\write\j@insplitout{\the\toks0}
\fi
\ifn@teof
\repeat
\immediate\closein\j@insplitin
\fi}
}
% To be put at the end of a file, for making an tar-like file containing
% everything it used.
\def\autojoin{
\immediate\write\psbj@inaux{\string\into\space psbjoin.all}
\immediate\closeout\psbj@inaux
\input psbjoin.aux
}
%
% Annotations & Captions etc...
%
%
% \centinsert{anybox} is just a centered \midinsert, but is included as
% people barely use the original inserts from TeX.
%
\def\centinsert#1{\midinsert\line{\hss#1\hss}\endinsert}
\def\psannotate#1#2{\def\ps@nnotation{#2\global\let\ps@nnotation=\relax}#1}
\def\pscaption#1#2{\vbox{
\setbox\drawingBox=#1
\copy\drawingBox
\vskip\baselineskip
\vbox{\hsize=\wd\drawingBox\setbox0=\hbox{#2}
\ifdim\wd0>\hsize
\noindent\unhbox0\tolerance=5000
\else\centerline{\box0}
\fi
}}}
% for compatibility with older versions
\def\psfig#1#2#3{\pscaption{\psannotate{#1}{#2}}{#3}}
\def\psfigurebox#1#2#3{\pscaption{\psannotate{\psbox{#1}}{#2}}{#3}}
%
% \at(#1;#2)#3 puts #3 at #1-higher and #2-right of the current
% position without moving it (to be used in annotations).
\def\at(#1;#2)#3{\setbox0=\hbox{#3}\ht0=0pt\dp0=0pt
\rlap{\kern#1\vbox to0pt{\kern-#2\box0\vss}}}
%
% \gridfill(ht;wd) makes a 1cm*1cm grid of ht by wd whose lower-left
% corner is the current point
\newdimen\gridht \newdimen\gridwd
\def\gridfill(#1;#2){
\setbox0=\hbox to 1\pscm
{\vrule height1\pscm width.4pt\leaders\hrule\hfill}
\gridht=#1
\divide\gridht by \ht0
\multiply\gridht by \ht0
\gridwd=#2
\divide\gridwd by \wd0
\multiply\gridwd by \wd0
\advance \gridwd by \wd0
\vbox to \gridht{\leaders\hbox to\gridwd{\leaders\box0\hfill}\vfill}}
%
% Useful to measure where to put annotations
\def\fillinggrid{\at(0cm;0cm){\vbox{
\gridfill(\drawinght;\drawingwd)}}}
%
% \textleftof\anybox: Sample text\endtext
% inserts "Sample text" on the left of \anybox ie \vbox, \psbox.
% \textrightof is the symmetric (not documented, too uggly)
% Welcome any suggestion about clean wraparound macros from
% TeXhackers reading this
%
\def\textleftof#1:{
\setbox1=#1
\setbox0=\vbox\bgroup
\advance\hsize by -\wd1 \advance\hsize by -2em}
\def\textrightof#1:{
\setbox0=#1
\setbox1=\vbox\bgroup
\advance\hsize by -\wd0 \advance\hsize by -2em}
\def\endtext{
\egroup
\hbox to \hsize{\valign{\vfil##\vfil\cr%
\box0\cr%
\noalign{\hss}\box1\cr}}}
%
% \frameit{\thick}{\skip}{\anybox}
% draws with thickness \thick a box around \anybox, leaving \skip of
% blank around it. eg \frameit{0.5pt}{1pt}{\hbox{hello}}
% \boxit{\anybox} is a shortcut.
\def\frameit#1#2#3{\hbox{\vrule width#1\vbox{
\hrule height#1\vskip#2\hbox{\hskip#2\vbox{#3}\hskip#2}%
\vskip#2\hrule height#1}\vrule width#1}}
\def\boxit#1{\frameit{0.4pt}{0pt}{#1}}
%
%
\catcode`\@=12 % cs containing @ are unreachable
%
% CUSTOMIZE YOUR DEFAULT DRIVER:
% Uncomment the line corresponding to your TeX system:
%\psfortextures% For TeXtures on the Macintosh
%\psforoztex % For OzTeX shareware on the Macintosh
%\psfordvitops % For the DVItoPS converter for TeX on IBM mainframes
\psfordvips % For DVIPS converter on VAX and UNIX
%\psfordvitps % For dvitps from TeXPS package under UNIX
%\psforDVIALW % For DVIALW, UNIX public domain
%\psonlyboxes % Blank Boxes (when all else fails).

View File

@@ -0,0 +1,81 @@
+++++ Announcing Tex2RTF +++++
+++++ A Free LaTeX to RTF, Windows Help RTF, HTML & wxHelp converter +++++
Purpose
=======
* Allows you to maintain manuals in printed and hypertext formats.
* Allows conversion of existing LaTeX documents to word processor
formats (usually some 'tweaking' is required to conform to
Tex2RTF restrictions).
Input
=====
A LaTeX subset with some additional hypertext macros; no maths,
minimal table support.
Caveat: Please do not expect to convert arbitrary LaTex files without
editing: this is not the primary intention of Tex2RTF. Success converting
existing LaTeX depends on your expectations and the style in which
the LaTeX was written. Tex2RTF does not accept pure TeX (non-LaTeX)
documents.
Output
======
* ordinary RTF
* Windows Help hypertext RTF
* HTML (the World Wide Web hypertext format)
* wxHelp (the wxWindows GUI library help file format)
Installation
============
Under Windows, please run the supplied install.exe program. The Tex2RTF
manual itself serves as an example input file, in the docs subdirectory
with various .sty, .ini, and .gif files that you may need for your
own documents. See the online manual for further details.
Platforms supported
===================
* SPARC Open Look
* SPARC Motif
* Windows 3.1
Where to get it
===============
The latest version of Tex2RTF can be accessed by anonymous ftp from
ftp.aiai.ed.ac.uk in the directory /pub/packages/tex2rtf.
The WWW pages are at http://www.aiai.ed.ac.uk/~jacs/tex2rtf.html.
Tex2RTF was developed using the free Open Look/Motif/Windows 3.1 C++
class library wxWindows, also available from the above FTP site in the
/pub/packages/wxwin directory.
The wxWindows WWW pages are at http://www.aiai.ed.ac.uk/~jacs/wxwin.html.
------------------------------------------------------------------
Julian Smart, November 1995
Artificial Intelligence Applications Institute
University of Edinburgh
80 South Bridge
Edinburgh
Scotland
EH1 1HN
EMAIL: J.Smart@ed.ac.uk
TEL: 0131 650 2746

View File

@@ -0,0 +1,35 @@
@techreport{robins87,
author = {Robins, Gabriel},
title = {The {ISI} grapher: a portable tool for displaying graphs pictorially (ISI/RS-87-196)},
institution = {University of South California},
year = {1987},
month = {September}
}
@book{helpbook,
author = {Boggan, Scott and Fakas, David and Welinske, Joe}
, title = {Developing on-line help for {W}indows}
, publisher = {Sams Publishing}
, address = {11711 North College, Carmel, Indiana 46032, USA}
, year = {1993}
}
@book{kopka,
author = {Kopka, Helmut and Daly, Patrick W.}
, title = {A Guide to LaTeX}
, publisher = {Addison-Wesley}
, year = {1993}
}
@book{pfeiffer,
author = {Pfeiffer, Katherine Shelly}
, title = {Word for Windows Design Companion}
, publisher = {Ventana Press}
, year = {1994}
}
@manual{smart93a,
author = {Smart, Julian}
, title = {wxWindows 1.50 User Manual}
, publisher = {Artificial Intelligence Applications Institute}
, organization = {University of Edinburgh}
, address = {80 South Bridge, Edinburgh, EH1 1HN}
, year = {1993}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

View File

@@ -0,0 +1,17 @@
[OPTIONS]
BMROOT=.
TITLE=Tex2RTF Manual
CONTENTS=Contents
COMPRESS=HIGH
[FILES]
tex2rtf.rtf
[CONFIG]
CreateButton("Up", "&Up", "JumpId(`tex2rtf.hlp', `Contents')")
BrowseButtons()
[MAP]
[BITMAPS]

View File

@@ -0,0 +1,21 @@
; Tex2RTF initialisation file for 16-bit WinHelp
runTwice = yes
titleFontSize = 12
authorFontSize = 10
chapterFontSize = 12
sectionFontSize = 12
subsectionFontSize = 12
headerRule = yes
footerRule = yes
useHeadingStyles = yes
contentsDepth = 2
listItemIndent=40
winHelpContents = yes
winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
generateHPJ = yes
htmlBrowseButtons = bitmap
winHelpTitle = "Tex2RTF Manual"
truncateFilenames = yes
combineSubSections = yes
htmlIndex = yes
htmlFrameContents = no

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,282 @@
% LaTeX style file
% Name: texhelp.sty
% Author: Julian Smart
%
% Purpose
% -------
% Style file to enable the simultaneous preparation of printed LaTeX and on-line
% hypertext manuals.
% Use in conjunction with Tex2RTF (see Tex2RTF documentation).
%
% Note that if a non-ASCII character starts a newline and there should be a space
% between the last word on the previous line and the first word on this line,
% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
% in all other formats.
%
% Julian Smart
% Artificial Intelligence Applications Institute
%
%
% ============== C++/CLIPS Documentation Facilities ==============
%
% Each class definition should be typeset with e.g.
%
% \section{\class{Name}: Parent}
%
% followed by a description of the class.
% Each member should follow:
%
% \membersection{wxName::Member}
%
% with a description of what this member does.
% Then, one (or more if overloaded) member (function) in detail:
%
% \func{return type}{name}{args}
% or
% \member{type}{name}
%
% where args is a list of \param{type}{name}, ...
% Function, e.g.
% e.g. to typeset
%
% void DoIt(char *string);
%
% write:
%
% \func{void}{DoIt}{\param{char *}{string}}
%
\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
{{\it #1} {\bf #2}\index{#2}}(#3)}
% For function/type definition where the name is a pointer,
% e.g. to typeset
%
% typedef void (*wxFunction)(wxObject&)
%
% write:
%
% \pfunc{typedef void}{wxFunction}{param{wxObject&}}
\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
{{\it #1} ({\bf *#2})\index{#2}}(#3)}
% Use an ordinary \section command for class name definitions.
% This is used for a member, such as wxBitmap: GetDepth
\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
% CLIPS function
\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
{{\bf #1} ({\bf #2}\index{#2}}#3)}
\newcommand{\clipssection}[1]{\chapter{#1}}
% This is used for a CLIPS function name
\newcommand{\functionsection}[1]{\subsection*{#1}}
% Member: a type and a name
\newcommand{\member}[2]{{\bf #1 \it #2}}
% C++ Parameter: a type and a name (no intervening space)
\newcommand{\param}[2]{{\it #1}{\bf #2}}
% CLIPS Parameter: a type and a name (one intervening space)
\newcommand{\cparam}[2]{{\bf #1} {\it #2}}
% Class: puts in index
\newcommand{\class}[1]{#1\index{#1}}
% Void type
\newcommand{\void}{{\it void}}
% Typeset destructor
\newcommand{\destruct}[1]{{$\sim$}#1}
% Typeset insert/extract operators
\newcommand{\cinsert}{$<<$}
\newcommand{\cextract}{$>>$}
% =================== Hypertext facilities ===================
%
% To insert hyperlinks (or references, in Latex), \label the sections
% or membersections \label{ref-label} immediately after the section, on the same line,
% and use \helpref{text-to-show}{ref-label} to make a reference.
%
% Type text with section reference
\newcommand{\helpref}[2]{{\it #1} (section \ref{#2}) }
% Type text with URL in verbatim mode
\newcommand{\urlref}[2]{#1 (\verb$#2$)}
% Don't typeset section number in LaTeX
\newcommand{\helprefn}[2]{{\it #1}}
% Like helpref, but popup text in WinHelp instead of hyperlinked
\newcommand{\popref}[2]{{\it #1}}
% Like footnote, but popup text.
\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
% =================== On-line help specific macros ===================
%
% Global document font size/family, help only.
\newcommand{\helpfontsize}[1]{}
\newcommand{\helpfontfamily}[1]{}
% Ignore in all on-line help
\newcommand{\helpignore}[1]{#1}
% Only print in all on-line help
\newcommand{\helponly}[1]{}
% Ignore in LaTeX
\newcommand{\latexignore}[1]{}
% Only print in LaTeX
\newcommand{\latexonly}[1]{#1}
% Ignore in linear RTF
\newcommand{\rtfignore}[1]{#1}
% Only print in linear RTF
\newcommand{\rtfonly}[1]{}
% Ignore in WinHelp RTF
\newcommand{\winhelpignore}[1]{#1}
% Only print in WinHelp RTF
\newcommand{\winhelponly}[1]{}
% Ignore in wxHelp
\newcommand{\xlpignore}[1]{#1}
% Only print in wxHelp
\newcommand{\xlponly}[1]{}
% Ignore in HTML
\newcommand{\htmlignore}[1]{#1}
% Only print in HTML
\newcommand{\htmlonly}[1]{}
% Input a file only for help system (binder thickness is not a limitation
% in help systems!)
\newcommand{\helpinput}[1]{}
\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
% =================== Miscellaneous macros ===================
%
% Headings consistent with generated ones
\newcommand{\myheading}[1]{\vspace*{25pt}
\begin{flushleft}
{\LARGE \bf #1}
\end{flushleft}
\vskip 20pt
}
% Heading with entry in contents page.
\newcommand{\chapterheading}[1]{\myheading{#1}
\addcontentsline{toc}{chapter}{#1}}
\newcommand{\sectionheading}[1]{\myheading{#1}
\addcontentsline{toc}{section}{#1}}
% Glossary environment
\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
% Glossary entry
\newcommand{\gloss}[1]{\item[#1]\index{#1}}
% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
\newcommand{\image}[2]{\psboxto(#1){#2}}
% Image, left aligned (HTML)
\newcommand{\imager}[2]{\psboxto(#1){#2}}
% Image, right aligned (HTML)
\newcommand{\imagel}[2]{\psboxto(#1){#2}}
% Imagemap: principally for HTML only. In Latex,
% acts like \image.
\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
% Headers and footers
% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
% {OddPageLeft}{OddPageCentre}{OddPageRight}
\newcommand{\setheader}[6]{
\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
}
% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
% {OddPageLeft}{OddPageCentre}{OddPageRight}
\newcommand{\setfooter}[6]{
\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
}
% Needed for telling RTF where margin paragraph should go
% in mirrored margins mode.
\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
% Environment for two-column table popular in WinHelp and manuals.
\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
\twocolwidtha{3cm}
\twocolwidthb{8.5cm}
\twocolspacing{2}
\newcommand{\twocolitem}[2]{#1 & #2\\}
\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
{\end{tabular}\renewcommand{\arraystretch}{1}}
% Specifying table rows for RTF compatibility
\newcommand{\row}[1]{#1\\}
% Use for the last ruled row for correct RTF generation.
\newcommand{\ruledrow}[1]{#1\\\hline}
% Indentation environment. Arg1 is left margin size
\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
{\end{list}}
% Framed box of text, normal formatting.
\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
% Double-framed box of text.
\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
% WITHDRAWN -- can't do in RTF, easily.
% Framed box of text, horizontally centred. Ragged right within box.
% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
% Double-framed box of text, horizontally centred. Ragged right within box.
% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
% toocomplex environment: simply prints the argument in LaTeX,
% comes out verbatim in all generated formats.
\newenvironment{toocomplex}{}{}
% Colour: dummy commands since LaTeX doesn't support colour.
% \definecolour{name}{red}{blue}{green}
% \fcol{name}{text} ; Foreground
% \bcol{name}{text} ; Background
\newcommand{\definecolour}[4]{}
\newcommand{\definecolor}[4]{}
\newcommand{\fcol}[2]{#2}
\newcommand{\bcol}[2]{#2}
\newcommand{\sethotspotcolour}[1]{}
\newcommand{\sethotspotunderline}[1]{}
\newcommand{\settransparency}[1]{}
\newcommand{\backslashraw}[0]{}
\newcommand{\lbraceraw}[0]{}
\newcommand{\rbraceraw}[0]{}
\newcommand{\registered}[0]{(r)}
\newcommand{\background}[1]{}
\newcommand{\textcolour}[1]{}
\newcommand{\overview}[2]{See \helpref{#1}{#2}.}

BIN
utils/tex2rtf/docs/up.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

View File

@@ -0,0 +1,212 @@
%%
%% This is file `verbatim.sty' generated
%% on <1991/9/3> with the docstrip utility (v1.1l test).
%%
%% The original source file was `verbatim.doc'.
%%
%%
%% Copyright (C) 1989,1990,1991 by Rainer Schoepf. All rights reserved.
%%
%% IMPORTANT NOTICE:
%%
%% You are not allowed to change this file. You may however copy this file
%% to a different name and then change this copy.
%%
%% You are allowed to distribute this file under the condition that it is
%% distributed together with all files mentioned in readme.mz4. If you
%% receive only some of these files from someone, complain!
%%
%% You are NOT ALLOWED to distribute this file alone. You are NOT ALLOWED
%% to take money for the distribution or use of this file (or a changed
%% version) except for some nominal charge for copying etc.
%%
%% Error Reports in case of UNCHANGED versions to
%%
%% Rainer Schoepf
%% Konrad-Zuse-Zentrum fuer Informationstechnik Berlin
%% Heilbronner Str. 10
%% W-1000 Berlin 31
%% Federal Republic of Germany
%% Internet: <SCHOEPF@SC.ZIB-Berlin.DE>
%%
\def\fileversion{v1.4f}
\def\filedate{91/08/05}
\def\docdate{91/08/05}
%% \CheckSum{439}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
%% Style-option `verbatim' to use with LaTeX v2.09
%% Copyright (C) 1989, 1990, 1991 by Rainer Sch\"opf, all rights reserved.
\@ifundefined{verbatim@@@}{}{\endinput}
\typeout{Style-Option: `verbatim'
\fileversion \space <\filedate> (RmS)}
\typeout{English Documentation
\@spaces \@spaces \space <\docdate> (RmS)}
\def\addto@hook#1#2{#1\expandafter{\the#1#2}}
\newtoks\every@verbatim
\every@verbatim={}
\def\@makeother#1{\catcode`#112\relax}
\begingroup
\catcode`\ =\active%
\gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}%
\endgroup
\def\@xobeysp{\leavevmode\penalty\@M\ }
\newtoks\verbatim@line
\def\verbatim@startline{\verbatim@line{}}
\def\verbatim@addtoline#1{%
\verbatim@line\expandafter{\the\verbatim@line#1}}
\def\verbatim@processline{\the\verbatim@line\par}
\def\verbatim@finish{\ifcat$\the\verbatim@line$\else
\verbatim@processline\fi}
\begingroup
\catcode`\`=\active
\gdef\verbatim@font{\tt \catcode96\active
\def`{\leavevmode\kern\z@\char96 }}
\endgroup
\def\@verbatim{\the\every@verbatim
\trivlist \item[]%
\leftskip\@totalleftmargin\rightskip\z@
\parindent\z@\parfillskip\@flushglue\parskip\z@
\@@par
\def\par{\leavevmode\null\@@par\penalty\interlinepenalty}%
\obeylines
\verbatim@font
\let\do\@makeother \dospecials}
\def\verbatim{\@verbatim \frenchspacing\@vobeyspaces\verbatim@start}
\@namedef{verbatim*}{\@verbatim\verbatim@start}
\let\endverbatim=\endtrivlist
\expandafter\let\csname endverbatim*\endcsname =\endtrivlist
\def\comment{\@bsphack
\let\do\@makeother\dospecials\catcode`\^^M\active
\let\verbatim@startline\relax
\let\verbatim@addtoline\@gobble
\let\verbatim@processline\relax
\let\verbatim@finish\relax
\verbatim@}
\let\endcomment=\@esphack
\@ifundefined{vrb@catcodes}%
{\def\vrb@catcodes{%
\catcode`\!12\catcode`\[12\catcode`\]12}}{}
\begingroup
\vrb@catcodes
\lccode`\!=`\\ \lccode`\[=`\{ \lccode`\]=`\}
\catcode`\~=\active \lccode`\~=`\^^M
\lccode`\C=`\C
\lowercase{%
\gdef\verbatim@start#1{%
\verbatim@startline
\if\noexpand#1\noexpand~%
\let\next\verbatim@
\else \def\next{\verbatim@#1}\fi
\next}%
\gdef\verbatim@#1~{\verbatim@@#1!end\@nil}%
\gdef\verbatim@@#1!end{%
\verbatim@addtoline{#1}%
\futurelet\next\verbatim@@@}%
\gdef\verbatim@@@#1\@nil{%
\ifx\next\@nil
\verbatim@processline
\verbatim@startline
\let\next\verbatim@
\else
\def\@tempa##1!end\@nil{\toks@{##1}}%
\@tempa#1\@nil
\@temptokena{!end}%
\edef\next{\noexpand\verbatim@test\the\toks@\noexpand~}%
\fi \next}%
\gdef\verbatim@test#1{%
\let\next\verbatim@test
\if\noexpand#1\noexpand~%
\expandafter\verbatim@addtoline
\expandafter{\the\@temptokena}%
\verbatim@processline
\verbatim@startline
\let\next\verbatim@
\else \if\noexpand#1
\@temptokena\expandafter{\the\@temptokena#1}%
\else \if\noexpand#1\noexpand[%
\let\@tempc\@empty
\let\next\verbatim@testend
\else
\expandafter\verbatim@addtoline
\expandafter{\the\@temptokena}%
\def\next{\verbatim@#1}%
\fi\fi\fi
\next}%
\gdef\verbatim@testend#1{%
\if\noexpand#1\noexpand~%
\expandafter\verbatim@addtoline
\expandafter{\the\@temptokena[}%
\expandafter\verbatim@addtoline
\expandafter{\@tempc}%
\verbatim@processline
\verbatim@startline
\let\next\verbatim@
\else\if\noexpand#1\noexpand]%
\let\next\verbatim@@testend
\else\if\noexpand#1\noexpand!%
\expandafter\verbatim@addtoline
\expandafter{\the\@temptokena[}%
\expandafter\verbatim@addtoline
\expandafter{\@tempc}%
\def\next{\verbatim@!}%
\else \expandafter\def\expandafter\@tempc\expandafter
{\@tempc#1}\fi\fi\fi
\next}%
\gdef\verbatim@@testend{%
\ifx\@tempc\@currenvir
\verbatim@finish
\edef\next{\noexpand\end{\@currenvir}%
\noexpand\verbatim@rescan{\@currenvir}}%
\else
\expandafter\verbatim@addtoline
\expandafter{\the\@temptokena[}%
\expandafter\verbatim@addtoline
\expandafter{\@tempc]}%
\let\next\verbatim@
\fi
\next}%
\gdef\verbatim@rescan#1#2~{\if\noexpand~\noexpand#2~\else
\@warning{Characters dropped after `\string\end{#1}'}\fi}}
\endgroup
\def\verbatiminput{\begingroup
\@ifstar\sverbatim@input\verbatim@input}
\def\sverbatim@input#1{\@verbatim
\@input{#1}\endtrivlist\endgroup\@doendpe}
\def\verbatim@input#1{\@verbatim
\frenchspacing \@vobeyspaces
\@input{#1}\endtrivlist\endgroup\@doendpe}
\begingroup
\lccode`\~=`\^^M
\lowercase{%
\gdef\verb{\begingroup
\verbatim@font
\catcode`\^^M\active
\def~{\endgroup\@latexerr{\string\verb\space command ended by
end of line.}\@ehc}%
\let\do\@makeother \dospecials
\@ifstar\@sverb{\@vobeyspaces \frenchspacing \@sverb}}}
\endgroup
\def\@sverb#1{%
\catcode`#1\active
\lccode`\~`#1%
\lowercase{\let~\endgroup}%
\leavevmode\null}
\endinput
%%
%% End of file `verbatim.sty'.