none
Why are the tables relative to the margin instead of the page? RRS feed

  • Question

  • Please take a look at http://1drv.ms/1LlgD3O

    The table properties are:

    			<w:tblPr>
    				<w:tblStyle w:val="TableGrid"/>
    				<w:tblpPr w:leftFromText="187" w:rightFromText="187" w:vertAnchor="text" w:tblpY="1"/>
    				<w:tblOverlap w:val="never"/>
    				<w:tblW w:w="8725" w:type="dxa"/>
    				<w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/>
    			</w:tblPr>

    According to 17.4.57 if horzAnchor is not specified (it isn't), then it is set to page. And if tblpX is not specified (it isn't), then it is set to 0. So the left of the tables should be the left edge of the paper.

    However, it's actually the left margin. Why?

    In addition, they do not align on the left, yet both have the exact same tblPr. Why the shift?

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing


    • Edited by DavidThi808 Saturday, March 5, 2016 4:46 PM
    Saturday, March 5, 2016 4:44 PM

Answers

  • Hello Dave :

    Word has a deviation from standard and it’s specified in section 2.1.160 of MS-OI29500, pasting relevant excerpt.

    The standard states that the default values of vertAnchor and horzAnchor are page.

    In Word, the default value for vertAnchor is margin and the default value for horzAnchor is text.

    The shifting behavior you are observing is due to ‘leftFromText’ attribute specified in floating table positioning i.e. tblpPr. After this 1st table, you have a para with text ‘234’.  Now when you insert 2nd table and specifies  ‘leftFromText’’ attribute as 187, this table will be placed 187 twentieth of a point right of the para ‘234’

    <w:p w:rsidR="006C4AB3" w:rsidRDefault="006C4AB3">
                <w:r>
                    <w:t>234</w:t>
                </w:r>
            </w:p>
            <w:tbl>
                <w:tblPr>
                    <w:tblStyle w:val="TableGrid"/>
                    <w:tblpPr w:leftFromText="187" w:rightFromText="187" w:vertAnchor="text" w:tblpY="1"/>
                    <w:tblOverlap w:val="never"/>
                    <w:tblW w:w="0" w:type="auto"/>
                    <w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/>
                </w:tblPr>
    
    

    To fix the issue, either remove the para between 1st and 2nd table OR set the ‘leftFromText’’ to 0 for 2nd table; we recommend later approach. In addition, we request you to please go through MS-OI29500 specification for all other deviations specific to table properties.

    Thanks.



    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Tuesday, March 8, 2016 6:05 PM

All replies

  • Hi David,

    Thank you for the inquiry.  A case has been created and under review.  Someone from the Microsoft Open Specifications Support team will be in contact.

    Thanks,

    Nathan

    Sunday, March 6, 2016 5:01 AM
    Moderator
  • Hello David :

    Thank you for contacting Microsoft Support. I'm researching this for you and will get back.

    Regards

    Tarun.


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Sunday, March 6, 2016 8:19 AM
  • Hello Dave :

    Word has a deviation from standard and it’s specified in section 2.1.160 of MS-OI29500, pasting relevant excerpt.

    The standard states that the default values of vertAnchor and horzAnchor are page.

    In Word, the default value for vertAnchor is margin and the default value for horzAnchor is text.

    The shifting behavior you are observing is due to ‘leftFromText’ attribute specified in floating table positioning i.e. tblpPr. After this 1st table, you have a para with text ‘234’.  Now when you insert 2nd table and specifies  ‘leftFromText’’ attribute as 187, this table will be placed 187 twentieth of a point right of the para ‘234’

    <w:p w:rsidR="006C4AB3" w:rsidRDefault="006C4AB3">
                <w:r>
                    <w:t>234</w:t>
                </w:r>
            </w:p>
            <w:tbl>
                <w:tblPr>
                    <w:tblStyle w:val="TableGrid"/>
                    <w:tblpPr w:leftFromText="187" w:rightFromText="187" w:vertAnchor="text" w:tblpY="1"/>
                    <w:tblOverlap w:val="never"/>
                    <w:tblW w:w="0" w:type="auto"/>
                    <w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/>
                </w:tblPr>
    
    

    To fix the issue, either remove the para between 1st and 2nd table OR set the ‘leftFromText’’ to 0 for 2nd table; we recommend later approach. In addition, we request you to please go through MS-OI29500 specification for all other deviations specific to table properties.

    Thanks.



    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Tuesday, March 8, 2016 6:05 PM
  • Thank you.

    Also, by any chance is there a DOCX spec that is DOCX as implemented by Word. I know there's the list of Word exceptions but that is a royla PITA to use and means checking two sources for everything. It would be nice to have a single source.

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Tuesday, March 8, 2016 6:23 PM
  • Hello Dave :

    We are working on your follow up query and will get back .

    Thanks


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Wednesday, March 9, 2016 9:00 PM