That would be unpossible, as margins and page sizes are defined per section of the document and thus independent of styles..

Being naive and not familiar with all the prior work done and conventions decided upon (seriously! newbie uttering silliness here), I do wonder though, where emerges the difficulty in adding a couple of children and attributes to the last child of an element called "body"  within an xml file?

On Monday, November 18, 2013 7:01:19 PM UTC+1, fiddlosopher wrote:
I think I got that far myself.  But remember, the only thing that is
carried over from the reference docx are styles.  So we'd need to do
this in the context of a style...  Can you see how to do that?


+++ CFCF [Nov 18 13 09:41 ]:
>    Update: I just had pandoc generate an empty docx from an empty .txt
>    file, without reference.docx. In this file, when unzipped, document.xml
>    had an empty body element <w:body/>.
>    I then replaced the empty body element with this:
>    <w:body><w:sectPr><w:pgSz w:w="9638" w:h="13606"/><w:pgMar w:top="850"
>    w:right="850" w:bottom="567" w:left="850" w:header="283" w:footer="283"
>    w:gutter="0"/><w:cols w:space="720"/><w:docGrid
>    w:linePitch="360"/></w:sectPr></w:body>
>    ...and rezipped it with docx extension. Voila, custom margins were set.
>    On Monday, November 18, 2013 6:15:55 PM UTC+1, CFCF wrote:
>
>    Have a look at [1]http://officeopenxml.com/WPsectionPgMar.php
>    At the end of document.xml generated in Pandoc then saved from Word
>    2013 with custom margins and paper size I found this:
>    <w:sectPr w:rsidR="00E50FC8" w:rsidSect="00D938EE">
>    <w:pgSz w:w="9638" w:h="13606"/>
>    <w:pgMar w:top="850" w:right="850" w:bottom="567" w:left="850"
>    w:header="283" w:footer="283"w:gutter="0"/>
>    <w:cols w:space="720"/>
>    <w:titlePg/>
>    <w:docGrid w:linePitch="360"/>
>    </w:sectPr>
>    </w:body>
>    All measurements are in twips,i.e. twentieths of a point (?!?).
>     So <w:pgSz w:w="9638" w:h="13606" translates to 170x240mm paper size.
>    On Thursday, October 31, 2013 7:18:53 PM UTC+1, fiddlosopher wrote:
>
>      I'm agreed about its usefulness!  I just haven't been able to figure
>      out yet how to do this in docx.  Again, I'd invite help from any
>      ooxml experts out there.
>      +++ Paul D. Walker [Oct 30 13 01:19 ]:
>      >    This would still be a useful feature.
>      >    On Thursday, October 17, 2013 9:49:27 PM UTC+8, Michael Nestrud
>      wrote:
>      >
>      >    I'd like to second that I would love the ability to set word
>      margins to
>      >    something besides default, either through the reference.docx or
>      other
>      >    means.
>      >    Thanks,
>      >    -Michael
>      >    On Tuesday, February 14, 2012 7:26:36 PM UTC-5, Matt Burton
>      wrote:
>      >
>      >      Good enough then; I'll try to modify my content so that it
>      works
>      >      better with the default styles.  Thanks!
>      >      On Feb 14, 11:25 am, John MacFarlane <fiddlosop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>      wrote:
>      >      > You can modify styles, but page margins are not (currently
>      at
>      >      least)
>      >      > in any styles, so changes to them won't persist.  It would
>      be good
>      >      > to make this modifiable, but I haven't had any luck putting
>      page
>      >      > margins in the styles in the reference.docx. Maybe someone
>      with
>      >      more
>      >      > ooxml experience can help.
>      >      >
>      >      > +++ Matt Burton [Feb 13 12 18:25 ]:
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      > > Hello,
>      >      >
>      >      > > Is it possible to set non-default document margins for
>      the docx
>      >      > > writer?  I modified the margins in the Page Layout
>      section of
>      >      > > Microsoft Word, but the settings are not carried over
>      from the
>      >      > > 'reference.docx' file.  Other style settings are copied
>      as
>      >      expected,
>      >      > > but the resulting Word document has standard (1 inch)
>      margins.
>      >      >
>      >      > > Thanks very much,
>      >      > > Matt Burton
>      >      >
>      >      > > --
>      >      > > You received this message because you are subscribed to
>      the
>      >      Google Groups "pandoc-discuss" group.
>      >      > > To post to this group, send email to
>      >      pandoc-...@googlegroups.com.
>      >      > > To unsubscribe from this group, send email to
>      >      pandoc-discus...@googlegroups.com.
>      >      > > For more options, visit this group
>      >      athttp://[1][2]groups.google.com/group/pandoc-discuss?hl=en.
>      >
>      >    --
>      >    You received this message because you are subscribed to the
>      Google
>      >    Groups "pandoc-discuss" group.
>      >    To unsubscribe from this group and stop receiving emails from
>      it, send
>      >    an email to pandoc-discus...@googlegroups.com.
>      >    To post to this group, send email to
>      pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>      >    To view this discussion on the web visit
>      >    [2][3]https://groups.google.com/d/msgid/pandoc-discuss/
>      6d37e7c4-1ae5-407b-
>      >    ae32-1253885d37c2%[4]40googlegroups.com.
>      >    For more options, visit [3][5]https://groups.google.com/
>      groups/opt_out.
>      >
>      > References
>      >
>      >    1. [6]http://groups.google.com/group/pandoc-discuss?hl=en
>      >    2. [7]https://groups.google.com/d/
>      msgid/pandoc-discuss/6d37e7c4-1ae5-407b-ae32-1253885d37c2%
>      40googlegroups.com
>      >    3. [8]https://groups.google.com/groups/opt_out
>
>    --
>    You received this message because you are subscribed to the Google
>    Groups "pandoc-discuss" group.
>    To unsubscribe from this group and stop receiving emails from it, send
>    an email to pandoc-discus...@googlegroups.com.
>    To post to this group, send email to pandoc-...@googlegroups.com.
>    To view this discussion on the web visit
>    [9]https://groups.google.com/d/msgid/pandoc-discuss/5cdf6ff1-9117-4025-
>    8833-958e39f82020%40googlegroups.com.
>    For more options, visit [10]https://groups.google.com/groups/opt_out.
>
> References
>
>    1. http://officeopenxml.com/WPsectionPgMar.php
>    2. http://groups.google.com/group/pandoc-discuss?hl=en
>    3. https://groups.google.com/d/msgid/pandoc-discuss/6d37e7c4-1ae5-407b-
>    4. http://40googlegroups.com/
>    5. https://groups.google.com/groups/opt_out
>    6. http://groups.google.com/group/pandoc-discuss?hl=en
>    7. https://groups.google.com/d/msgid/pandoc-discuss/6d37e7c4-1ae5-407b-ae32-1253885d37c2%40googlegroups.com
>    8. https://groups.google.com/groups/opt_out
>    9. https://groups.google.com/d/msgid/pandoc-discuss/5cdf6ff1-9117-4025-8833-958e39f82020%40googlegroups.com
>   10. https://groups.google.com/groups/opt_out

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/9010aaa2-9907-4adf-a902-6ad19ab64fb8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.