From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33250 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ioan Muntean Newsgroups: gmane.text.pandoc Subject: Re: Docx reader and numbered customized styles Date: Tue, 31 Oct 2023 08:09:52 -0700 (PDT) Message-ID: References: <53f12b55-0d77-42de-bba2-b88e91f59eecn@googlegroups.com> <6bc0ec42-4f2b-4832-8b08-827b913669cen@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5448_884452161.1698764992309" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31759"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDFZBUNSQQLBBQNRQSVAMGQEW5TKIKY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Oct 31 16:09:58 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f59.google.com ([209.85.210.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qxqNR-00080j-Ea for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 31 Oct 2023 16:09:57 +0100 Original-Received: by mail-ot1-f59.google.com with SMTP id 46e09a7af769-6ce25ad9ef2sf7824875a34.3 for ; Tue, 31 Oct 2023 08:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1698764996; x=1699369796; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=qpCyB2kqmMej223pjk1gDsb1aEyrdYAsetd0NN5isY4=; b=AYvy2/RX0cOSd0jGtQ2ADZ/ZRmQnlabqx9IM6r+SWWl1hwxIMjP8A8Sse2IPdjV4qC U1hqxQnBxgP3mthz/yeep6jyTFE++VEEUhIaoigGPD424kucfCRwukygqIAVPi5eP4vR 5UoQAWeajYtnXNz5mfCABLS5kehTAF1TzT03bHEMr4jev3sKvAL2iZmKaHeDLJSdJBWt T5jWS2nYYHGroQ4rniBW/v61/A9r7+iDopWD03EQGTjWsNDa7fg7GSTvj7lGIZe+uMux lyLnQnB+FIELH8FlXL4tGgi+pq0HeUvIq0X6ukqASy3Po60kmGWYNy6EKnSj78F0YRdp 8q1A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698764996; x=1699369796; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=qpCyB2kqmMej223pjk1gDsb1aEyrdYAsetd0NN5isY4=; b=DnSNAc2eTEcaRElqDazLoD2h71nhrsx4qCrq6zfXs81fE17fJ4omZxfnIMdr1lt3DX aYxAYVri/StdgtZgTvelhe+X/3pWqYNgZWDLkTexdZiXV6J8eQTUYeRQeGl1jAAJyyEK GLgyMDpYLXVM+qwo3ww3zg2OeebYNHbj+2RelymiT49biGJsMc3sBh/3OhwNkUJ381Io LK2fpsvkTqVfSAiydrvQ6JzW4BGYXA/trYhhWS5GiN72gXU2HK+xi2EvWqspERUFVHf3 siDGeT7v7fTNo4YSdcPABNoCPjbwXjPEg6XpYm/IOHJAhKlV872zNm2fJqD0xl41OOia S4CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698764996; x=1699369796; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=qpCyB2kqmMej223pjk1gDsb1aEyrdYAsetd0NN5isY4=; b=QOPXUZskhE+/c7H4GMk6hRau+LlW1xE/7l1nTv5uM9TWBHpvsUf+vgU9dL8QoWqzVc r9v9oe4B6cJwZuO9bai7fzKfg+/Rgz91TIEeB+RDVn9vv/AlV/d14zZblNYr+N1TLNHh la6aPWOPpt2ri+ViwHv3Ts7K0/G44VkSd9TTqRKnCTahsCc45xbDMpQnJeuoNOBTxwAx Rd3X7+yv7ngss+7CuMjZ21c+eoutB6jJPSpZkLI940vCl6xxlH0GFVAlqtwSO+WFrs9U YDWWWcu7TVE4BrD9cgfxPVbC8G0mMBAKf8IZ9byYGAVYlKDY2N Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YzyY9m6SDi0unJmxvBra4UCf/im4jxDLG7hISJ653252YD2IGKO 615oukhkAnKVtkmkcX43bmk= X-Google-Smtp-Source: AGHT+IGlTM+9A8MFRBDLEKjNNT8VgKDIGK5JigE74VFR8u7N7MtKfvzsANUixRuWXAlsOC3eJY8tyQ== X-Received: by 2002:a05:6870:9f11:b0:1e9:b840:9c4b with SMTP id xl17-20020a0568709f1100b001e9b8409c4bmr14602987oab.26.1698764996230; Tue, 31 Oct 2023 08:09:56 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:9f0f:b0:1ea:d76a:4f28 with SMTP id xl15-20020a0568709f0f00b001ead76a4f28ls605901oab.1.-pod-prod-04-us; Tue, 31 Oct 2023 08:09:53 -0700 (PDT) X-Received: by 2002:a05:6870:2249:b0:1e9:adc3:c31c with SMTP id j9-20020a056870224900b001e9adc3c31cmr6366474oaf.0.1698764993113; Tue, 31 Oct 2023 08:09:53 -0700 (PDT) In-Reply-To: X-Original-Sender: imuntean-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:33250 Archived-At: ------=_Part_5448_884452161.1698764992309 Content-Type: multipart/alternative; boundary="----=_Part_5449_313156888.1698764992309" ------=_Part_5449_313156888.1698764992309 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Bastien I investigated this matter and I ended up writing a special filter in LUA= =20 to read docx and convert styles to Latex. The reason is complex, but=20 numbering paragraphs and refering to them is not replicated well in Latex.= =20 I am trying to use cross-references as bookmarks from Word as the \label=20 \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= =20 -f styles option, except a list of special styles that are filtered=20 differently -special styles content is converted but not numbered. - numbered lists are converted and adapted to enumerate packages in Latex.= =20 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=E2=80=AFAM UTC-5 Bastien DUMONT w= rote: > > So is the -f docx+styles working with the docx reader, too? If so, how? > > -f docx+styles means =E2=80=9Cuse the docx reader and enable the =E2=80= =98styles=E2=80=99=20 > extension=E2=80=9D, so yes! As is written in the manual, it renders the s= tyles as=20 > divs and spans with a =E2=80=9Ccustom-style=E2=80=9D attribute. You will = have to use a=20 > filter to convert some of these divs and spans to whatever code you want = in=20 > your LaTeX file. > > Or are you talking about customized lists, not custom styles? > --=20 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 e= mail 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. ------=_Part_5449_313156888.1698764992309 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Bastien
I investigated this matter and I ended up writing a specia= l filter in LUA to read docx and convert styles to Latex. The reason is com= plex, 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 style= s option, except a list of special styles that are filtered differently
-special styles content is converted but not numbered.
- n= umbered lists are converted and adapted to enumerate packages in Latex. Thi= s 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 d= o.
Thanks for your input.
Best,
Ioan
= On Thursday, October 26, 2023 at 11:49:05=E2=80=AFAM UTC-5 Bastien DUMONT w= rote:
> So= is the -f docx+styles working with the docx reader, too? If so, how?

-f docx+styles means =E2=80=9Cuse the docx reader and enable the =E2=80= =98styles=E2=80=99 extension=E2=80=9D, so yes! As is written in the manual,= it renders the styles as divs and spans with a =E2=80=9Ccustom-style=E2=80= =9D 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 &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_5449_313156888.1698764992309-- ------=_Part_5448_884452161.1698764992309--