Answered Why is the line spacing greater than expected?

  • Tuesday, March 20, 2012 9:53 PM
     
     

    Hi all;

    Please look at the file http://www.windward.net/temp/toc4-out.docx - the spacing between lines is 441 twips (give or take a couple - I printed and measured with a ruler).

    However, looking at the DOCX file, the spacing is the line height + 200 twips after (the 1.15 x the line height is less than the spacing after). The text in the line has an ascent of 184 twips + descent of 39 twips + leading of 6 twips = 229 twips. Add the 200 after and you have 429 twips, not 441. 

    Where are the additional 12 twips coming from?

    thanks - dave


    Who will win The International Collegiate Programming Championships?

All Replies

  • Wednesday, March 21, 2012 3:42 PM
    Moderator
     
     

    Hi David,

    Thanks for your question.

    Someone from our team will contact you shortly to follow up on
    your request.

    Regards,

    Sebastian


    SEBASTIAN CANEVARI - MSFT Escalation Engineer Protocol Documentation Team

  • Wednesday, March 21, 2012 8:11 PM
    Moderator
     
     

    Hi Dave,

    I'm looking into this.  I suspect that this is similar to other cases we've covered where there is logic for aesthetics or other reasons which don't strictly fall into the scope of the standard.  Let me do some checking.  Can you please email me at dochelp at microsoft dot com in the meantime?

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

  • Tuesday, May 15, 2012 4:06 PM
    Moderator
     
     Answered

    David,
     
    The spacing difference you observe in the document layout after many paragraphs are displayed is due to a variation between the specification and Word: Word adds the inter-line spacing defined by the line attribute to each line of a paragraph including the first and last line, even in cases where the paragraph consists of a single line.  This is something we will document in the implementer notes, since it’s different from the spec (which itself is internally inconsistent on the topic, so we’ll follow up on that as well). 
     
    Also, the standard makes reference to the height of a line when calculating the value of the line attribute when lineRule attribute is ‘auto’: 
     
    Section 17.3.1.33: “If the value of the lineRule attribute is auto, then the value of the line attribute shall be interpreted as 240ths of a line, in the manner described by the simple type's values.”

    The base height of a line is not defined by the standard and is an implementation detail left to the specific application based on the visualization they’re targeting, so that’s not something we plan to document (it can vary based on many factors): for example, in Word 2010 SP1 on Windows with no compatibility settings, it is ascent + descent + leading of the type face, but that’s not a guarantee, nor is it always the case.

    Tom

  • Tuesday, May 15, 2012 5:15 PM