* How to control indentation of lists in docx with Pandoc?
@ 2020-08-11 8:09 Mikhail Matrosov
2020-08-11 9:01 ` Anton Shepelev
[not found] ` <575de665-9241-4c1b-86a2-a20c5fd4dd7bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 2 replies; 4+ messages in thread
From: Mikhail Matrosov @ 2020-08-11 8:09 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1801 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.
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/575de665-9241-4c1b-86a2-a20c5fd4dd7bn%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2989 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to control indentation of lists in docx with Pandoc?
2020-08-11 8:09 How to control indentation of lists in docx with Pandoc? Mikhail Matrosov
@ 2020-08-11 9:01 ` Anton Shepelev
[not found] ` <20200811120121.958dff2b6a07c4537e6f399b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[not found] ` <575de665-9241-4c1b-86a2-a20c5fd4dd7bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
1 sibling, 1 reply; 4+ messages in thread
From: Anton Shepelev @ 2020-08-11 9:01 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
Mikhail Matrosov:
> 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.
>
> While digging through the contents of the generat-
> ed docx I discovered that you cannot control in-
> dentation of list items directly. [...]
I have the same problem, but did not dig into it so
deep. Thanks for the research.
My problem has been discussed here in a thread ti-
tled:
Adjusting the indentation of nested numbered lists in docx
( https://groups.google.com/forum/#!topic/pandoc-discuss/F9MaKcb5xZo )
where the experts told be the indentation is cur-
rently hardcoded(!). I created a Github issue with
some proposals of how to fix it (in terms of outward
behavoir, not implementation):
Support customisable indentation of nested lists in .docx output
( https://github.com/jgm/pandoc/issues/6586 )
I far as I understand, it is somewhat hard to do and
requires extra coupling between the general pandoc
engine and the DOCX renderer. Yet is not a reason to
leave the indentation hardcoded.
A similar difficulty arises when putting code blocks
and lists inside definitions. If the definition
style has an indent, the code and lists are still
unindented, which is of course unintended.
--
Please, do not forward replies to the list to my e-mail.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to control indentation of lists in docx with Pandoc?
[not found] ` <575de665-9241-4c1b-86a2-a20c5fd4dd7bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-08-11 9:09 ` Tomáš Kruliš
0 siblings, 0 replies; 4+ messages in thread
From: Tomáš Kruliš @ 2020-08-11 9:09 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2178 bytes --]
Have you tryed to create a style only for lists? If you would assign it as
a `fenced_div`, it could work.
Look at user manual, part about "Custom styles."
Dne úterý 11. srpna 2020 10:09:14 UTC+2 Mikhail Matrosov napsal(a):
>
> 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.
>
> 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/8de2163d-8a9e-46ad-aa87-708d4dd01a24o%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 3213 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to control indentation of lists in docx with Pandoc?
[not found] ` <20200811120121.958dff2b6a07c4537e6f399b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-08-11 13:09 ` Mikhail Matrosov
0 siblings, 0 replies; 4+ messages in thread
From: Mikhail Matrosov @ 2020-08-11 13:09 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 56 bytes --]
Thanks for the link. I posted my findings as a comment.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-11 13:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 8:09 How to control indentation of lists in docx with Pandoc? Mikhail Matrosov
2020-08-11 9:01 ` Anton Shepelev
[not found] ` <20200811120121.958dff2b6a07c4537e6f399b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-08-11 13:09 ` Mikhail Matrosov
[not found] ` <575de665-9241-4c1b-86a2-a20c5fd4dd7bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-08-11 9:09 ` Tomáš Kruliš
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).