Tuesday, February 19, 2008

Did I mention that graphics in Word 2007 suck?

A graphic in Word 2007 can be a drawing (created using Shapes), text box, drawing canvas, picture, equation, table, chart, etc. In addition to the layout issues I mentioned in the last post, it is very hard to transfer a graphic between Word 2007 and other programs, including other Microsoft Office programs. In one case I needed to transfer an equation to PowerPoint. In other case I needed to save a drawing and found out that I first had to copy-and-paste the drawing into another program to save it (i.e., there is no way to directly save a graphic in Word). Let me demonstrate how this goes horribly wrong.

I created the following graphic in Word 2007 using shapes inside a drawing canvas (the image below was created using a screen capture (ALT+Print Screen)):

The font for the code is Courier New and for the rest is Palatino Linotype. If you look closely at the screenshot you'll see that the letters are not completely black. This is because they were rendered using the Clear Type font smoothing technology.

The first problem is that there is no way to save this graphic to a file directly. I have to first paste it into another program. Okay, no problem, let's try Microsoft Paint:



WYSIWYG my ass! As you can the fonts and line spacing have changed drastically. The Java code inside the middle box and the "Program Elements" text have been cutoff. Okay, so next I try pasting into PowerPoint 2007. Here's what I got after trying all the different paste options:

As HTML

Above is the closest I get to the screenshot. Notice how the font is different and much darker.

As PNG (same As GIF and As Extended Metafile)

These (PNG, GIF, and Extended Metafile) all look the same as pasting into Microsoft Paint, that is, pretty bad.

As Microsoft Office Graphic Object




What's the most disturbing about the above is that this is Microsoft's own graphic object format for Microsoft Office, designed for compatibility with other Microsoft Office programs. As you can see, it looks horrible. The Windows Metafile format below, another one of Microsoft's compatability formats, also looks really bad:

As Windows Metafile

However, nothing prepared me for what came next:

As JPEG



I guess black is the new white.

It is sad that the best reproduction of a Word 2007 graphic is via ALT+Print Screen.

Thursday, February 14, 2008

Layout in Word 2007 sucks!

Layout of pictures, tables, drawing canvases, text boxes, spreadsheets, and equations is seriously broken in Word 2007. First, there's no universal way to layout non-text. For example, Drawing Canvases were a nice addition to Word 2007 but they are not very useful since you can't embed tables, spreadsheet, or equations. For tables, you can work around this by embedding the table in a text box, and then embedding the text box in the drawing canvas. However, for spreadsheets and equations, you're out of luck. Perhaps this is a problem when trying to embed any OLE document, although I would assume Microsoft could get this to work properly for their own office suite.

Far more annoying is the schizophrenic layout algorithm in Word 2007. I assume that behind the scenes it's trying to balance keeping paragraphs whole, avoiding orphaned section titles, anchoring, etc., but the outcome is often surprising and wrong. For example, I'll insert a graphic into a page and it will cause the previous page to now have a blank spot that takes up 90% of the page. Most surpising: the graphic could easily fit inside that blank spot!

Most of the time I want a block graph at the top or bottom of the page but Word seems to have a prediliction for inserting graphics inline (e.g., newspaper style) and moving the graphics with the text. To accomplish this Word appears to "anchor" images at the point of insertion. I wish there was a way to completely turn off the anchors (no, Lock Anchor and Top and Bottom Text Wrapping doesn't do this) and for Word to just flow text around the blocks.

I've been struggling with this issues for years. I wish I had learned LaTex!

Sunday, February 10, 2008

Table of Contents in Word 2007 sucks!

The Table of Contents feature in Word 2007 is seriously broken. Sometimes the entries for figures have different fonts, which makes the toc look like a ransom letter. I had to go to a correct figure caption and then copy-and-paste it into the incorrect captions to make all the entries consistent. What's most annoying is that the incorrect entries effectively ignore the style setting specified in "Insert Table of Contents..." -> Formats="From Template" -> "Modify..."

Worse, I'll save my document and then reopen it, and a bunch of seemingly random lines from the cover page, other parts of the document, etc. suddenly appear in the Document Map and TOC. For some unknown reason, the Outline Level for these lines is set to "Level 1." After I change the Outline Level for all the lines to "Body Text," everything looks fine. However, if I change the Outline Level for the "Table of Contents" line to "Body Text," and save and then reopen, all the lines are set back to Level 1 and show up in the TOC again!

Workaround
The field code for my TOC is

{TOC \o "1-3" \h \z}

This pulls in all headers at outline level 1-3 and all other text with Outline Level 1-3. To pull in things like "List of Figures" and "Bibliography" I create a new style and set the Outline Level to 1. Make sure the text "Table of Contents" that immediately preceeds the actual TOC is not a heading style.

I hope this helps! If anyone has a better solution, please leave a comment!