Bugs notification, please read.

Oct 7, 2008 at 8:42 PM
I have found two problems in current release:
1) in IEEE style with table for numbers and bib entries, first column with numbers is really narrow, so after number 10 it is already too small, and is being divided in two lines, which requires manual correction every time bibliography is updated.
2) when I use save as PDF or XPS addon to save docx to pdf, I get 'x' character printed before and after bibliography. It seems like there is some special character inserted, which does not have printable representation, or something like that...
Oct 7, 2008 at 9:57 PM
Sorry but I can not reproduce either of your problems. The only reason I can see for them is that you are doing something weird with the style of the bibliography. A bibliography has a style called "Bibliography" (or a language dependant equivalent).

Regarding your second remark. The HTML returned by the style is handled incorrectly by Word 2007, it adds a blank paragraph both in front and at the end of the table. So my "dirty hack" to get rid of those paragraphs, consists of creating dummy paragraphs which contain just one character: "x". By setting the line height of those paragraphs to 0, the "x" characters are concealed (they are in the document, but you can't see them).

I just retried both the save as pdf and save as xps options with a new document and in both cases the "x"'s stay hidden. Both xps and pdf converters seem to grasp the concept of line-height:0. If you really can't hide the "x"'s, you can always remove them from the stylesheet. Just remove the line:  <p class="MsoBibliography" style="line-height:0;">x</p>
from the code (it appears twice). You might get an extra white line in front and at the end of your bibliography though.

As the issue about the "x"'s showing up is bothering me, I would appreciate it if you could send an example docx to my e-mail which will show the "x" in the pdf (or xps) when I open the docx it and select "Save As" => "PDF or XPS".
Oct 7, 2008 at 10:20 PM

Hi Yves,

Enclosed is an example of both issues. I have not done anything to the styles. It is all in normal style in a fresh new document.

I simply inserted bibliography field using IEEE Reference Order format to display 10+ sources.

It would be great if it was possible to fix these small bugs, as I like your styles very much.

Best Regards,


Oct 8, 2008 at 6:24 AM
I did not receive any example docx. If you mailed it to this discussion, then the attachments were most likely removed along the way. Mail it to me directly. You can find my email at the top of the stylesheets.

Oct 10, 2008 at 4:37 PM

Thanks for the example.

It seems your default formatting is different from any document I have seen so far. In Word 2007, it is possible to define some default values for the line-height. Normally it is never set, but in your case, it is. According to the document you send me, a line in a paragraph has to have a height of 276 (which equals a line spacing of 1,15). When I hide the x's in my document, I set the line height for the specific paragraph to 0 (as shown in the code below). Unfortunately, it seems when printing your text, the locally defined value is ignored, and the default value is used. It has to do with Word 2007 not accepting 0 as a valid value (although according to the Office OpenXML specification, 0 is a perfectly valid value). You can see this behaviour when you try to set the line spacing for a paragraph to 0 by hand.

As the output of the stylesheet is actually HTML (with CSS), I looked for alternatives for "line-height:0". I had 3 options:

  • style="line-height:0;"
  • style="visibility:hidden;"
  • style="display:none"

According to the MSDN article at http://msdn.microsoft.com/en-us/library/aa338201.aspx only the first solution should be working (but your example demonstrated it doesn't always). The third alternative seems to be working in all cases I tried so far although it shouldn't according to Microsoft. So I used that as a bug fix. 

I updated both BibWord and all styles with this fix. Thanks again for reporting the issue.


Oct 11, 2008 at 4:19 PM

Hi Yves,

Could you please explain to me in a more clear way what is wrong with my default settings? Are you saying that my Normal.dot template is not normal?

I did not change any default format of any style. So this must be how it works out of the box. I have all the SPs and patches for office from MS Update.

Perhaps you could send me your Normal.dot file, so I can try it out?

Best Regards,


Oct 11, 2008 at 5:40 PM
There is nothing wrong with your default template.

A docx file is actually nothing more than a zip file. If you would rename it and open it, you would find a couple of subdirectory all filled with xml files (sometimes they have a .rels extension but are still zip files). One of the files is called styles.xml. In it there is an element docDefaults which contains some default values for runs (rPrDefault) and paragraphs (pPrDefault). Yours looked like this: 

w:docDefaults><?xml:namespace prefix = o /><o:p></o:p>



        <w:rFonts w:asciiTheme="minorHAnsi" w:eastAsiaTheme="minorHAnsi" w:hAnsiTheme="minorHAnsi" w:cstheme="minorBidi"/><o:p></o:p>

        <w:sz w:val="22"/><o:p></o:p>

        <w:szCs w:val="22"/><o:p></o:p>

        <w:lang w:val="en-US" w:eastAsia="en-US" w:bidi="ar-SA"/><o:p></o:p>





        <w:spacing w:after="200" w:line="276" w:lineRule="auto"/><o:p></o:p>




Basically what yours says is that by default after each paragraph 200 'points' should be left open before the next paragraph starts. Also, each line should have a spacing of 276 points. Since 240 is the value for a line spacing of 1, 276 comes down to 1.15. This is actually the default value for the normal style on my version of Word as well. I checked my normal.dotm template and found out that it actually has the line <w:spacing w:after="200" w:line="276" w:lineRule="auto"/> in it. For some reason, yours get saved to the final document while mine does not and hence the w:pPr element does not contain the line. So sending you my dotm is of no use. Yours is already correct.

So it seems that if the line is given in w:pPr, it picks 276 over 0 because it thinks 0 is not valid. If the line isn't there, it accepts 0.