public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Ioan Muntean <imuntean-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Docx reader and numbered customized styles
Date: Tue, 31 Oct 2023 08:09:52 -0700 (PDT)	[thread overview]
Message-ID: <b3c6042e-3843-4b0d-a431-bd8553c652d5n@googlegroups.com> (raw)
In-Reply-To: <ZTqYdVJGiZNBg_3P@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 1859 bytes --]

Dear Bastien
I investigated this matter and I ended up writing a special filter in LUA 
to read docx and convert styles to Latex. The reason is complex, but 
numbering paragraphs and refering to them is not replicated well in Latex. 
I am trying to use cross-references as bookmarks from Word as the \label 
\ref pair in Latex. I think I managed to do this through a filter

So here is what I accomplished:
- keep the numbering of all styles as they are converted by Pandoc by the 
-f styles option, except a list of special styles that are filtered 
differently
-special styles content is converted but not numbered.
- numbered lists are converted and adapted to enumerate packages in Latex. 
This is needed when a list element is refered to as a bookmark

I can post the Lua filter here if that is what people usually do.
Thanks for your input.
Best,
Ioan

On Thursday, October 26, 2023 at 11:49:05 AM UTC-5 Bastien DUMONT wrote:

> > So is the -f docx+styles working with the docx reader, too? If so, how?
>
> -f docx+styles means “use the docx reader and enable the ‘styles’ 
> extension”, so yes! As is written in the manual, it renders the styles as 
> divs and spans with a “custom-style” attribute. You will have to use a 
> filter to convert some of these divs and spans to whatever code you want in 
> your LaTeX file.
>
> Or are you talking about customized lists, not custom styles?
>

-- 
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/b3c6042e-3843-4b0d-a431-bd8553c652d5n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2450 bytes --]

  reply	other threads:[~2023-10-31 15:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 15:27 Ioan Muntean
     [not found] ` <53f12b55-0d77-42de-bba2-b88e91f59eecn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-10-26 15:36   ` Bastien DUMONT
2023-10-26 16:24     ` Ioan Muntean
     [not found]       ` <6bc0ec42-4f2b-4832-8b08-827b913669cen-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-10-26 16:48         ` Bastien DUMONT
2023-10-31 15:09           ` Ioan Muntean [this message]
2023-11-14 21:55           ` Ioan Muntean
     [not found]             ` <5652a76c-59ab-4056-ac00-92732e13698en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-14 22:12               ` Bastien DUMONT
2023-11-15  5:32                 ` Ioan Muntean
     [not found]                   ` <SN7PR15MB5635AB592F88C9B03F88840DF9B1A-xz2k8ToKDo8Cw+E34yPvHod3EbNNOtPMvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2023-11-15  8:06                     ` Bastien DUMONT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b3c6042e-3843-4b0d-a431-bd8553c652d5n@googlegroups.com \
    --to=imuntean-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).