OLETeX Utility
The primary goal of this
project is development of an OLE-LaTeX interface. The
program is aimed to allowа
LaTeX users easily embed pictures and other
objects produced by OLE-aware programs into their LaTeX
documents keeping it platform-independent.
OLETeX
uses Windows PostScript printing features to convert ANY OLE object (e.g. Visio
picture, ExcelТs plot,Е) into an Encapsulated
Postscript (EPS) file which can be easily processed by LaTeX.
OLE is a
MS-Windows feature allowing one to embed objects (figures, plots, controlsЕ)
produced by one program into documents handled by another one.
OLETeX is
distributed under the terms of GNU General Public license.
Currently OLETeX is in BETA stage, so do not expect it to be
bug-free.
OLETeX
1.0 Beta 4 |
This is
the first public release of OLETeX |
OLETeX
should be used as follows:
If you
would like to automate OLE ↔LaTeX interaction,
you should proceed as follows:
\usepackage{graphicx}
\usepackage{oletex}
to the
preamble of your document. oletex.sty is a style file provided with the OLETeX distribution.
\oleaddfile{file1.otx}
\oleaddfile{file2.otx}
\begin{figure}
\includeolepicture[angle=90]{demo}
\caption{Word-produced
picture}\label{theDemo}
\end{figure}
This makes a floating figure referencing to an
object with identifier УdemoФ rotated by 90 degrees with appropriate caption
and label. Note, that you can use any graphics
or graphicx
options here Ц they are passed unchanged to the underlying \includegraphics
command
>latex
mydocument.tex
This will cause LaTeX
to parse your file and, in particular, execute \includeolepicture
commands. This command looks for EPS files named identifier.eps (demo.eps for the above example) in the current directory.
If it finds one it executes \includegraphics for it.
Otherwise, an appropriate warning is issued. In both cases it writes a record
into a special mydocument.otl file. After latex.exe
finishes its job this file contains all information about containers you have
registered and OLE objects referenced in the document. This is a plain text
file, so you can read and edit it in case of problems.
>ot2tex
mydocument.otl
This will cause .otl
file to be parsed and all containers referenced in it to be loaded. For each
referenced identifier OT2TeX will
try to find an OLE object having the same name and to generate EPS file from
it.
>texify mydocument.tex
NOTE 1.
You HAVE to rerun OT2TeX
if and only if:
You
have referenced some new objects
You
have changed some of OLE objects in OTEditor.
Otherwise, you can compile your documents in
usual manner.
A: It seems that your EPS printer installation
is broken. Run OTEditor, open OptionsàSettings dialog. Press Change button near the
EPS-configured printer. Select OLETeX Color PS L2 printer from the listbox.
If you do not see it, you should reinstall it (see help file for details). When
you have it selected, press OK button and choose OptionsàSave settings. Go to Printers folder and check
printing properties of OLETeX Color PS L2 printer. Check if its Postscript Output Option is set to Encapsulated Postscript and Language Level is set to 2. Check if its port is
set to FILE.
A: Currently, OLETeX
is not a standard LaTeX tool, so most likely your
colleague does not have it installed. You may solve problem in the following
ways:
A: By default,
A: OLETeX
has been created by Peter Trifonov.
I was writing a report in LaTeX and had to embed some
Word pictures into it. I have not found any satisfactory solution for this
problem, so I started programming OLETeX.
If you have
installed OLETeX, please write me to trifonov at users dot sourceforge dot net
about your experience. You can discuss OLETeX at oletex-general@lists.sourceforge.net.