Help - Search - Members - Calendar
Full Version: Writing In Microsoft Word, Publishing In Mt4
Movable Type Community Forum > Using Movable Type > Default Stylesheets
BloggyThingy
Not sure where to put this, but since it involves formatting, this seems like the best place.

I'd appreciate some insight into the best way to move content from Microsoft Word into Movable Type 4. I should mention that I'm using Word 97 and am aware that later versions of Word might make this a more straightforward process.

The problems (or confusions) I'm encountering have to do with styles. As best I can figure out, it seems that while the MT4 Entry form is able to recognize styles from Word, it uses its own interpretation of those styles.

For example, most of my paragraphs in Word use the 'Normal' style. I have this style defined as having no spacing after a paragraph (IOW, to get a space between two paras, I need to explicitly enter a second, blank paragraph before starting the next para.)

When I copy a number of such paragraphs and copy them into MT4 using the 'Rich Text' format option, MT4 displays space after each paragraph roughly equivalent to one empty paragraph, thus doubling my desired space.

I've tried pasting the text into MT4 using its various format options but none of them actually preserve the formatting that I produced in Word. The 'Convert Line Breaks' option keeps my paras the way I want, but all other character formatting, such as words in bold or italics, are lost. If I then change the formatting option to 'Rich Text', it retains the para spacing, but the character formatting is still lost. The 'None' option ignores all para markers and runs all the text into one paragraph.

Somewhat independent of this issue, I notice that if I use the Rich Text option, each paragraph on the published page is surrounded by Word-specific formatting including an inline css paragraph class 'MsoNormal' (which is not actually defined in the document or in the associated css style sheets), and defines each paragraph as an HTML span with a completely empty style (two double quotes without a named style.) The empty blank paragraph from my original Word doc likewise has these codes, as well as an HTML comment that seems to have some kind of conditional: if !supportEmptyParas. (Does this mean there's some setting somewhere that will let me do what I want?) At the end of each paragraph there is also a pair of HTML tags that open and immediately close and contain no text at all, and that seem to be more extraneous code from Word, referencing nothing.

The main thing I'm looking for is a way to bring text from Word into MT4 that retains my formatting (which consists of little more than the bold, italics, and my preferred paragraph formatting) and that doesn't contain all the extraneous code that is typical of Word docs converted to HTML and that seems to do nothing but clutter the source. I realize this code does no real harm and isn't visible on the published page, but it's still quite dissatisfying at some basic level. Why is it there?

Is there some way of copying from Word and getting it converted into clean, efficient, standard css/html, without having to first massage the text in Word? Maybe some kind of plug-in? The combined power of Word and MT4 would be amazing.

Again, I'm using Word 97. Is that part of my problem?

Thank you.
OtherNiceMan
The msoNormal etc is a feature of pasting from Word.

Have you looked at Windows Live Writer http://windowslivewriter.spaces.live.com/default.aspx finally out of beta.
BloggyThingy
Thanks for the reply, OtherNiceMan. I understand that this code comes from pasting from Word. What I don't understand is what purpose it serves. And if there is a way of pasting from Word in into MT4 and not getting all of the extraneous code.

For example, here is the published HTML from a post created by pasting from Word 97 into MT4.

CODE
<p class="MsoNormal">This is a paragraph pasted from Word 97. It will be
immediately followed by a blank paragraph.</p>

<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>

<p class="MsoNormal">This is another paragraph pasted from Word 97. </p>

In the Word document, none of the paragraphs contained any special formatting (they were in the default Normal style), and the second paragraph was entirely blank.

I can see that the css class MsoNormal is carried over from Word. The code for the second paragraph contains two comments that contain 'if' and 'endif' code, and a completely empty pair of tags. When the published page is viewed in Internet Explorer, the entire content of the two comments is visible as regular text. In Firefox, this second para is rendered as a blank line.

There is something I'm not understanding. I would think it's quite common and desireable to compose entries in Word and paste them into MT, and have the formatting remain reasonably intact (or have it translated into HTML or css formatting), and without all of the extraneous code.

Is there something I'm missing? Are my expectations simply wrong?

How weird that when I google for...

supportEmptyParas "movable type"

...there are only 20 hits, and the first one is this post.
OtherNiceMan
It does not serve any purpose, apart from making it look like non-microsoft products are broken.

The supportEmptyParas is a special IE only condiftional and the problems that it causes are reported across a wide range of CMS and blogging tools, search for supportEmptyParas without movabletype to see. Have a look at this for example http://www.boingboing.net/2007/01/19/cake-...er-barfs-u.html

A work around imay be to save the file as filtered HTML in Microsoft Word and paste from there.

Did you look at livewriter?
BloggyThingy
Hi OtherNiceMan. Thanks again for replying. I guess I was expecting a smoother pasting process between Word and MT, given that they are both leaders in their respective, but very much related, categories.

I'm using Word 2000, a few versions behind latest (I mistakenly said I was using Word 97 in a previous post.) I've been aware of issues with how Word deals with HTML but wonder if that has improved in more recent versions.
QUOTE
A work around imay be to save the file as filtered HTML in Microsoft Word and paste from there.

As far as I can tell my version of Word doesn't have options for saving HTML, just a basic save that includes all of Word's proprietary code. But I'm used to getting text from Word into Dreamweaver such that the formatting is retained but without all of the extraneous junk. Pasting from Word into DW and then pasting it back into Word and using a Word macro to clean up the code works OK and isn't too painful.

I've looked briefly at the information about Live Writer but haven't yet had an opportunity to directly check it out. Thanks for bringing it to my attention!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.