From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33325 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Docx reader and numbered customized styles Date: Tue, 14 Nov 2023 22:12:36 +0000 Message-ID: References: <53f12b55-0d77-42de-bba2-b88e91f59eecn@googlegroups.com> <6bc0ec42-4f2b-4832-8b08-827b913669cen@googlegroups.com> <5652a76c-59ab-4056-ac00-92732e13698en@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22720"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBXXBZ6VAMGQEMXSN6BQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Nov 14 23:12:50 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f55.google.com ([209.85.210.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1r31eL-0005k9-IR for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 14 Nov 2023 23:12:49 +0100 Original-Received: by mail-ot1-f55.google.com with SMTP id 46e09a7af769-6d344fc5d53sf6113790a34.2 for ; Tue, 14 Nov 2023 14:12:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699999968; cv=pass; d=google.com; s=arc-20160816; b=FB1kJUsoxqyFM5JhLBTAldTuhl01xdNUJND09W589NwIsXaNWmQH9EU3xzLoj1QhPx qxorCnYnP5mf6qQ/VQcKfsglsPObPAD5MYgSx+6TLXYUO79u5IdD+m4jG23EAW13vmvA wxcXax3MVi/rNIsOe3aIx8NoqKkH1mHOZiaFtuQwFWm2Bpuuwc+U3X4o8qItySJybaEe 5h6LrqA4jumMBvsXgLWoSAtezXwV5fUk0GuGd9vNTw8sucXTiHqCANnng6tlIvzoAMGS N4wGf2HF9c1v3sWQGZqBL30ieUGsP+v8d3IJKPbp0uBINl3z0QtaGcwutJun4cDoFdk9 2i/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=STK9BlLPsk0q032n7Bq5hiIQTnXDpTrepNiqxw86xJA=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=RGVjBrA3GYWRgLG7Wy7Z0kt9sHJjfJyg03hLCSf/v6ouWYdplFSZwttfRWTawW+KQE J8Z+Yrek+QnF21oeDQTHvlymSRc1HnD1pUj/XVdMXjTUXjESSbziM4evEMSiPPkOe5gy O4qwzdj3E1rwaWSG0o0cLSJTAC5ZGFczbXDIzdYK/4GgTc0tNH2X0CUsztsbjcN2+Pje JaY8GAmIBfCaAN26qgfmYbWY1nqzeIt4lwjU2LeLEJgTQs2bCxjgvvy0offMWM6eYdmc qoB0r2cudnKLb/I8LfKLRGkFm/llQ+CzjAXZ59YAGtToF8OhKY+oi/9bTDnbWZUxhfHM BFcA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=VKq9iW9Y; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1699999968; x=1700604768; 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-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=STK9BlLPsk0q032n7Bq5hiIQTnXDpTrepNiqxw86xJA=; b=Lq9YCmXgqHx847Cmo0orbFCLHA7fYHhGoItC2JVpotCvU4H17d+ioab11oBkpk5poA zIvfmPqdg/lGgGE+oKH5sdLWKSRZkFtM0AzDJ+UdSWfC00MMzko29MS8RefrX2Sj+eTQ mK+01NOSebgu0Nmh8DP/wDUUY0+P+cQtWGNA3+y7v5+UaLi1uhFpqzQv3w/Z48qYE+gw mSb8c9bUFuJjZzfAofeNLxpRodBzgD/EFBHJ524TRioKqwTVndd59IwV2BeHJla5KtAx X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699999968; x=1700604768; 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-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=STK9BlLPsk0q032n7Bq5hiIQTnXDpTrepNiqxw86xJA=; b=Bh8ir7Qbh3vFFf9xFz01jQun/uEnv/2N1V2uc8ls2NTGcPf3nNQfGNI1XzRHCQlFV0 iYgLsS7Q2Cxx7AbePjK3UquIu7bhbCA3TdHQk25gTVL4gErgcKj9l6EYJDhlghsfDsFo Tyz+wlL1uUYi9gF0fRlDtwVZaXTyC5BnLMOjxMPcGyYc5zdq6NEnB8vh1n6bWxFuH7sg 8Z7rjXNPK9dcC41BlFgQs//nI1iH Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YzdSIwnb9nHrQ1Je+NElN6MF8q4KdXE771GyWV+QoqAfBfYMSfP UYnfIVOf8Z0B2BgY+9Gn8ww= X-Google-Smtp-Source: AGHT+IHXBj0EYMX8Nv+/dx8EZldJisilZYlpiHmuyGQ44A8lpXxtI1F6RbNW7VAZlxalUI7fvjAgiA== X-Received: by 2002:a05:6870:9213:b0:1d5:d8f0:7d7e with SMTP id e19-20020a056870921300b001d5d8f07d7emr14175103oaf.53.1699999968337; Tue, 14 Nov 2023 14:12:48 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:9b07:b0:1f2:9e6f:586f with SMTP id hq7-20020a0568709b0700b001f29e6f586fls5027121oab.0.-pod-prod-01-us; Tue, 14 Nov 2023 14:12:46 -0800 (PST) X-Received: by 2002:a05:6871:5c7:b0:1e9:9aa5:997b with SMTP id v7-20020a05687105c700b001e99aa5997bmr13876513oan.20.1699999966074; Tue, 14 Nov 2023 14:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699999966; cv=none; d=google.com; s=arc-20160816; b=GIZN3VvUTRA3A1zTReOWpiqVv9HDDu82Ie5Kpa+oVbIqqusdhzzunHfkGEX65idpTQ swuGrKzbRYuo1QJaAugMnVQaLhPPv/uZ/MLSYy8uBta9rgfsHODfSILsqYbDTowSUAJK Jl2aE7S6I41VM8ITcwcl4if/NC9yDr2F7mUyd7Os/BaTv4VAbu4ATJXlArAHACt2V8ac gj0DKC0hwSYVuEecfaATAY2hIJ8B4pTV4X0UQz7FOaAcwfX4MD28bA4Ih3VQZAw1ynHH CcYShNUvD65wLq8MlUg4Wp4uVQcsQiiiTQe/S4E1EzOSHvYNxIFJKGKfKNUEks29zAfQ fX6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=xlsu28Q/piDouiYtybNlK6eehGqWqSoH/UUvYy/bfq8=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=mpAWqByl5sbKlcuJPDwM1x5LpfvsHRxAg+vqhrx/564yYKsUCIRz75Eq75KyMnn+Pq Y2aa4GPQWtJ+SnKFSMJUfkQtSL+i8QTjBfsd/Thxiid4IVzrKN3GPG0yJ6DPYaLRupWO qV6JMQ9/Ueob0dZiKrV18cOINrPbtQBCl7UHOOks9hVsZgzAgX/D8QyANChuMyiJi/ts HUyin6i4py4KKH4hjkCRdIZu43fhO9lqoyCtfVC9zLALU8llvlLZ5FuLkrYBeMbb511I FYVKGJTqhu0xJGHNcf1xB5NIsXeK7Kx50+jl8LRHjRbU294x1uIGdfPu/kO42y6A8suS QdiA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=VKq9iW9Y; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id pt5-20020a0568709e4500b001c8bbdda1a5si782365oab.1.2023.11.14.14.12.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 14:12:45 -0800 (PST) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 5479B240101 for ; Tue, 14 Nov 2023 23:12:44 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SVLBz6d2xz9rxB for ; Tue, 14 Nov 2023 23:12:43 +0100 (CET) Content-Disposition: inline In-Reply-To: <5652a76c-59ab-4056-ac00-92732e13698en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=VKq9iW9Y; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:33325 Archived-At: I guess that it could involve writing a custom reader for the docx format t= hat would do `pandoc.read(input, 'docx')` to get the Pandoc AST of the docu= ment, uncompress the DOCX file, read the "styles" file, and set global meta= data in the AST matching the configuration of the Headings styles. Then, th= is metadata may be used by a filter while exporting to LaTeX. Well, I think that it would be easier to rename the heading styles or to in= sert some information at the beginning of your file to be processed and rem= oved by the filter for LaTeX export. Le Tuesday 14 November 2023 =C3=A0 01:55:56PM, Ioan Muntean a =C3=A9crit : > Hi Bastien > I have a related question that is not immediately connected to special st= yles, > but the Headings 1, Headings 2 etc. > In my MS Word document, Headings 1 and so on are numbered with a specific= set > of multilist levels. I am curious whether there is a way to pass the type= of > numbering from Headings 1 style in Word to markdown or later to Latex. I = work > often with LUA filters, but in the -t native format of docx, Headings do = not > have any specification, online numbered list or special paragraphs. So ho= w do > we recover the numbering of Headings styles? > One way to deal with it would be to rename Headings 1 to headingsnumbered= 1 and > deal with that special style. Is there any other way to do this? > Thanks in advance! > Ioan >=20 > On Thursday, October 26, 2023 at 11:49:05=E2=80=AFAM UTC-5 Bastien DUMONT= wrote: >=20 > > So is the -f docx+styles working with the docx reader, too? If so, = how? >=20 > -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 t= he styles as > divs and spans with a =E2=80=9Ccustom-style=E2=80=9D attribute. You w= ill have to use a > filter to convert some of these divs and spans to whatever code you w= ant in > your LaTeX file. >=20 > 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= email > to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [2]https://groups.google.com/d/m= sgid/ > pandoc-discuss/5652a76c-59ab-4056-ac00-92732e13698en%40googlegroups.com. >=20 > References: >=20 > [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [2] https://groups.google.com/d/msgid/pandoc-discuss/5652a76c-59ab-4056-a= c00-92732e13698en%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter --=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/ZVPw1A54Xry2zGHT%40localhost.