* How to control indentation of lists in docx?
@ 2020-08-10 15:01 Mikhail Matrosov
0 siblings, 0 replies; 2+ messages in thread
From: Mikhail Matrosov @ 2020-08-10 15:01 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1939 bytes --]
I convert AsciiDoc to Word via DocBook. The db->docx conversion is done
with Pandoc and is the most interesting.
I provide a reference file with --reference-doc. I specified indentation
for the Body Text style in the reference file. Now text is indented. But
lists are not:
[image: enter image description here] <https://i.stack.imgur.com/DgIGi.png>
While digging through the contents of the generated docx I discovered that
you cannot control indentation of list items directly. Instead, you specify
numPr/numId. From document.xml:
<w:p>
<w:pPr>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="1002"/>
</w:numPr>
</w:pPr>
<w:r>
<w:t xml:space="preserve">This is the list</w:t>
</w:r>
</w:p>
There is a corresponding definition in numbering.xml:
<w:num w:numId="1002">
<w:abstractNumId w:val="99401"/>
...
</w:num>
And there is the definition of w:abstractNum in the same file:
<w:abstractNum w:abstractNumId="99401">
<w:multiLevelType w:val="multilevel"/>
<w:lvl w:ilvl="0">
...
<w:pPr>
<w:ind w:left="480" w:hanging="480"/>
</w:pPr>
</w:lvl>
Here we finally have the indentation. If I edit it here in the generated
docx, it works, I can see how the lists are indented.
But how do I do this in the reference docx? I don't even see this strange
w:abstractNumId="99401" in it. And if I add it, it gets overwritten.
PS Cross-posted from https://stackoverflow.com/q/63342743/261217
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1c471df6-f901-42ec-8fd1-46b05a93e70co%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 14467 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* How to control indentation of lists in docx?
@ 2020-08-11 8:07 Mikhail Matrosov
0 siblings, 0 replies; 2+ messages in thread
From: Mikhail Matrosov @ 2020-08-11 8:07 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1862 bytes --]
I convert AsciiDoc to Word via DocBook. The db->docx conversion is done
with Pandoc and is the most interesting.
I provide a reference file with --reference-doc. I specified indentation
for the Body Text style in the reference file. Now text is indented. But
lists are not:
[image: DgIGi[1].png]
<https://i.stack.imgur.com/DgIGi.png>
While digging through the contents of the generated docx I discovered that
you cannot control indentation of list items directly. Instead, you
specify numPr/numId. From document.xml:
<w:p>
<w:pPr>
<w:numPr>
<w:ilvl w:val="0"/>
* <w:numId w:val="1002"/>*
</w:numPr>
</w:pPr>
<w:r>
<w:t xml:space="preserve">This is the list</w:t>
</w:r>
</w:p>
There is a corresponding definition in numbering.xml:
<w:num w:numId="*1002*">
<w:abstractNumId w:val="*99401*"/>
...
</w:num>
And there is the definition of w:abstractNum in the same file:
<w:abstractNum w:abstractNumId="*99401*">
<w:multiLevelType w:val="multilevel"/>
<w:lvl w:ilvl="0">
...
<w:pPr>
* <w:ind w:left="480" w:hanging="480"/>*
</w:pPr>
</w:lvl>
Here we finally have the indentation. If I edit it here in the
generated docx, it works, I can see how the lists are indented.
But how do I do this in the reference docx? I don't even see this
strange w:abstractNumId="99401" in it. And if I add it, it gets overwritten.
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5dc14bb5-e5b8-4ad4-bce6-6d3b1a209974n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 3159 bytes --]
[-- Attachment #2: DgIGi[1].png --]
[-- Type: image/png, Size: 28876 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-11 8:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 15:01 How to control indentation of lists in docx? Mikhail Matrosov
2020-08-11 8:07 Mikhail Matrosov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).