Search:   Help



LyX documentation


Shared groups




Categories: Compatibility, Windows
<< | Page list | >>

How to import documents from Scientific Word/Scientific Workplace (SWP) into LyX.

Importing Scientific Word/Scientific Workplace (hereinafter SWP) .tex files into LyX is relatively straightforward. The particular procedure that works as of 22 December 2007 (LyX 1.5.3) is provided below.

Before proceeding, one should consider the issue of included graphics files. One of the allures of SWP, working under MS Windows, has been the ready cutting-pasting of Windows metafiles (.wmf, .emf) via the clipboard, out from some application, as figures into one's document. This, plus punching out the final PDF, could be done without the aggravation of first putting figures into EPS (encapsulated postscript) format, as is the standard handling practice for most other LaTeX setups. With the advent of LyX 1.5 and the contributed metafile2eps utility, one can continue this lazy practice, as the combo will auto-render .wmf that are included in the document, and auto-convert to EPS when time for PDF output.

However, metafile2eps is also great as a standalone utility for converting .wmf into EPS. If one collaborates with others possessing vanilla LaTeX setups and/or on linux, one will need to exchange figures in EPS format. So undertaking such conversions up-front is likely advisable.

STEPS to Convert SW/SWP .tex to LyX .lyx

If not done already, install the *free* MetafileToEPSConverter, per

(For Mac users, there's not, as far as known, a free converter although WMF Viewer is a cheap app [9$])

I. In SWP, File>SaveAs Portable LaTeX.

This will employ, for instance, the LaTeX-standard \includegraphics directive, and comment-out SWP-specific macros and pragmas. These comment-outs will later show up as harmless ERT (evil red text - embedded TeX commands, but here, merely % comments) in the LyX document. Those can be left alone (harmless), or deleted as desired.

II. Metafile-to-EPS conversion (optional, but recommended)

Convert any figures that are windows metafiles (.wmf, .emf) to .eps:

  1. go to c:\Program Files\LyX15\bin, right-click metafile2eps.exe, and PinToStartMenu
    • this makes it easy to invoke the program from the Start Menu
  2. in metafile2eps window: File > Open MetaFile..., then File > Export EPS... (you can also use the toolbar icons)
    • Note that when pasting, the image actually shown in the metafile2eps GUI window may not be the complete figure you were expecting, but don't be alarmed - the complete figure is put to the EPS file intact.
  3. In .tex file, using a text editor (e.g., WinVi32, WordPad etc) search/replace ".wmf" to ".eps", etc.

[For Mac users: the easiest way to import pictures is to first export from SWP the pic to .pdf format and then import from LyX]

III. In LyX import the .tex document

Choose File > Import > LaTeX (plain)

IV. In Lyx: > Document>Settings>LaTeX Preamble

You may need to change the \usepackage directives to match MikTeX (or whatever LaTeX installation you're employing). For example, there is no such package (at least in MikTeX):


In this case, it's easy to delete this entry in the preamble and find built-in provisions for this functionality under Document>Settings>Page Layout to get what you want.

V. BibTeX Bibliography

For converted .tex files that included a BibTeX bibliography at the end, at the tail of the resulting LyX document, there will be a grey tag labeled "BibTeX Generated Bibliography" - clicking it pops a menu showing the .bib database files and a selectable bib style.

Compatibility Windows

<< | FAQ.PageList | >>

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2011-04-27 12:33 UTC