word2lyx is a python script meant to convert Microsoft Word documents to a format that 
can be imported into LyX. word2lyx only works on documents saved in the docx format, 
created using Word 2007 or 2010. Older in doc will have to be converted before word2lyx
will be able to read them.

word2lyx supports:

- Translating Word paragraph and character styles to LyX paragraph and character styles.
	In cases where the character styles aren't defined, it will write entries for them 
	in the local layout. These entries will include basic LaTeX font commands, created 
	from the font properties.
- Importing Word tables, including those with merged rows or columns. it will also do
	its best with table borders.
- Enumerated and itemized lists
- Importing images from the Word document. Word image objects, such as Excel charts
	and graphs are skipped.
- The use of custom templates, which allow you to finely describe how you would like
	for your documents to be translated. There are two templates included with the 
	script and supporting libraries: article.w2l and book.w2l. These can be found in
	the lyx/templates folder. (For more about templates, please see below.)

For best conversion, please make use of paragraph and character styles. These tags are 
converted directly. Per word formatting is removed. This makes it easier to create 
clean markup for LyX.

word2lyx is released under the GNU General Public License (GPL).
Copyright 2012, Robert Oakes.

Usage:

To use the script, use a variation of the command below:

python word2lyx.py "InputFile.docx" "OutputFile.lyx"

You can optionally specify a template you would like for it to use:

python word2lyx.py "InputFile.docx" "OutputFile.lyx" -t book

Templates:

word2lyx templates are files which tell word2lyx how a particular type of document should
be translated. They include lists of paragraph, character, and table styles and their LyX 
equivalents. Consider the example below, which is taken from the article template:

	ImageDir = 'Images'
	IgnoreStyles = FootnoteReference, EndnoteReference

	[ParagraphStyles]
	Title = Title
	Author = Author
	Part = Part
	Heading1 = Chapter
	...

The template file contains settings and sections. The example above includes two settings,
ImageDir and IgnoreStyles, and a group of paragraph styles. The paragraph styles specify
how Word styles (on the left), such as Heading1, should be translated into LyX styles,
such as Chapter, Section, etc.

When you create a new template (or extend one of the existing options), you add additional
styles so that word2lyx knows how you want those particular pieces of information to be
processed.

Each word2lyx template includes several sections. These include:

- ParagraphStyles: Matched paris that convert Word styles (on the left) to LyX styles
	(on the right).
- CharacterStyles: Matched pairs that convert Word charstyles (again, on the left)
	to LyX charstyles (again, specified on the right).
- TableStyles: Similar to paragraph and character styles, but used in the conversion
	of tables.

Sections are defined by a section tag, enclosed with square brackets. Values in the section
are entered as matching pairs, offset by an equal sign.

If you choose, you can add an additional section called [DocOptions], where you specify
information such as the document class, which types of fonts you would like the document
to use, and so forth. (Please refer to the LyX documentation for avaialble options.)

If you create new templates, you should place them in the lyx/templates folder for word2lyx
to be able to find them. They should have a 'w2l' file extension.