From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29759 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.text.pandoc Subject: Re: Custom styles in docx to markdown conversion. Date: Fri, 10 Dec 2021 20:39:06 +0100 Message-ID: <877dcckzsu.fsf@fastmail.fm> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4672"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.9; emacs 28.0.90 Cc: John MacFarlane To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCS7B5O6XUOBBSG5Z2GQMGQE65JK6TQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Dec 10 20:47:24 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f184.google.com ([209.85.208.184]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mvlrX-0000xZ-1l for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 10 Dec 2021 20:47:23 +0100 Original-Received: by mail-lj1-f184.google.com with SMTP id u28-20020a2ea17c000000b0021126b5cca2sf3291367ljl.19 for ; Fri, 10 Dec 2021 11:47:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639165642; cv=pass; d=google.com; s=arc-20160816; b=0f/ix2ZMNCmvvyHDxekjn29gWVUi7n27Lqu2DQkPfy0QFLlF5OHOXDUDMaCNY5cD1G S1OuV0EMB2er5UEmh56JVSyHaCLG/TP41FIuTJwY1sO14gQ+7JT//eWbs+TepzY9T3Rt 035As5o1iXEc6efqH6MND+EGm56FAfhRfBW0UmzdSRvpQjhidE7/Dh1AI2nwIUFvu508 jfbeOfOIjo9JX01cXIEwI+EngH3QVVnxO28X+vZotgoCmXg2xKOHFa++wy4XmunkO7v7 4WH2LP2uPwGR+hC92SAwqRBuNdD1dw4fnGUP9hu4G9joUp4zKLJexsukzBl7OEg/V7qE Apjg== 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:mime-version:message-id :in-reply-to:date:subject:cc:to:from:user-agent:references:sender :dkim-signature; bh=tB/yHnfPz+W9U0spjzMAJZ+UJSXTjObQuDyAeFPQ3WI=; b=ISEzZznXNtCtd+1LuqknbL6GY32bl7vO2207iv/a008RsGIsgnRbOy/r5L2uR1jZ/A 32qNcYRcEvqQSk2RkJwBwpLwkTKCkNKwX/n7NEVEyE8Nupl5HO6Js/+ZFqfcXpdyEiYo nb0ZJS3vu1pNy2oBJgLdzwzuJ3dOlpfUxh8yZ8tQo9uXrVL8uu+ZnVktnR/mrqvo8wZ9 KU62OhcxzDlzBe1Cp8c8tvCUOW87T5vh6qBH9Np4MKPuIWVWJeq8qh0NyKUPy/o9GLRk //K51vqAcBVYkCT8JzFAzXP2xod9eYJHv/Sg6Y7tOlW2v1Okzo3d23dvxZdT+34Elxtw kjiw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@fastmail.fm header.s=fm1 header.b=mD3gvIF2; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=N9WYTBvF; spf=pass (google.com: domain of joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org designates 64.147.123.20 as permitted sender) smtp.mailfrom=joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fastmail.fm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=tB/yHnfPz+W9U0spjzMAJZ+UJSXTjObQuDyAeFPQ3WI=; b=QIw4WxWINBsXNn8sJKZHAb+YvXQf2aS1QmLL5fDjuLGQRlkTvM/dg8V1in/7LXkEvW jVUp9EHDr0Lj9q+g7EuKPPsAZxu4QL0DmXqbdVMujLZ8FeFWXmL90nS0HPUqfrtfFhyS 4GWEXk3cyfgzC64KBQR1XAO5YX2/IGR9qkhkf8qR51FkmnuTBaDjqCd9Q2vKb6Ix3/mg Q6y2W4pcSC4r25rBz+OQ786NOribnIOC8lZAeCKuslg2DdjgAU2fL+njaksGVXExIna9 Suw7fBAg8aBh3XeCb3EukxDk/p9NelXuuqNPH8Rsl5Xd3+ulXVMTECXCQV+libunmZWn GNZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:references:user-agent:from:to:cc:subject :date:in-reply-to:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=tB/yHnfPz+W9U0spjzMAJZ+UJSXTjObQuDyAeFPQ3WI=; b=oUjd5s4c4/fjYRAX+j/J/yqrSaBxPwsIkuwVGi5ae7iH0aV9u32pa2qovpKPw3greI F4tf/7y9R3nHk/Cq1CNuyh/zoEsKcCbW+ruaRVpWnu9992Fh8jXfi37hcyd4I7OayhuL Zb5sYwgh999ZHYyFWbmS0VgMC4OsSeg7IhoiDgYrn/QntyA6h1FlHxc5ERurOcdNntGp UPqs7mbSVkFLY1eKTjGDl4Q76g/kUnPJPHpzECnl30XbK6VrUj3IPgmNnXkNUw4xg8dN Bd0QJd7GM9rIiai9y/ZGQB+EwfeMUs/pOyYV/lYSf6sUr3dDJGyePbo9h+w397NF4vcQ F6uw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532PQvyza7RQVHjfjZxJxB3lkxQgwEasDMnNN0PymMhxq733vVQN ZsN4+q9Hu8PsR3OZ+So1qwc= X-Google-Smtp-Source: ABdhPJzVHYjBv7LEKhvxMn4yTyx9XbHMzsgqwG64UEyUauUCkpXx0PMTkdq+c3jt5RPtsX+dsVKQWw== X-Received: by 2002:a2e:a413:: with SMTP id p19mr14437741ljn.252.1639165641957; Fri, 10 Dec 2021 11:47:21 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:a7c4:: with SMTP id x4ls1675652ljp.8.gmail; Fri, 10 Dec 2021 11:47:19 -0800 (PST) X-Received: by 2002:a05:651c:612:: with SMTP id k18mr15199112lje.260.1639165639341; Fri, 10 Dec 2021 11:47:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639165639; cv=none; d=google.com; s=arc-20160816; b=i2yqyfKU3JkSnbW0wMZtVMEjsDgOBmW9vbd+ZTuzbL8mgumKX7XKid2s2Dsh0b2Hr4 btXzEM6ZrTW0nChuWByyJojaYJZDDoc/qkMd/t2ed65GB0FcbwnOZ9mMFFcisjWtegbn LFpD38z/J8vMxXM29sky6bZyK8qPnpHI33C5VPhO+1Xp7C/L7HSOQTCYBGDhG84jUZJg e/J7GUO90A0Epp2NZR1lwhC2cmRwIMYMU5lRosYTAoxmF+yNgx7sDNuFa8iQJBUqzz1x ewtBtPqFoWxpUv+jEQq+YWi2Cze9O6Q5RuRyPHEB5UuVDugulLZfJfyg/mqO1rNcLF2A Ggfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:dkim-signature:dkim-signature; bh=BXS9naysN4ADl1Vcw8VBiP2hHFfVe9Fj6Goli4XtpIk=; b=Eks06CLDZ/7sZtc8bdxsNQiFM6TL7/fpy31t5Lxg1r1PmE2uH37MmejxJkGJifN3+v 8g2YT7ALWiuuYHY5UJvklhyJFFdDHwCWOwansPuZbQCkdLXygAyanyxY2jCpismhdQp1 ZOU1voEIPbGD3R+VGJgNavlxY0hq5RW+fKBQPJ27SJ0AbTJeY3fJ1ix7YSkoLSD39H3T f0W8Rmw5Iw/2vQ3hN++qlDmQkULJnjoYBvIjY2Rgzo+dRPEY+oE1fSh9JAdX3AdeJDDH vtshkgS8PBJsRhG0iKza5UHDLQKXPq3cdiW8k8opYsZqetf5g5L/7a3a5Dlo0SlGWpWF 6tGw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@fastmail.fm header.s=fm1 header.b=mD3gvIF2; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=N9WYTBvF; spf=pass (google.com: domain of joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org designates 64.147.123.20 as permitted sender) smtp.mailfrom=joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fastmail.fm Original-Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com. [64.147.123.20]) by gmr-mx.google.com with ESMTPS id f11si226811lfv.6.2021.12.10.11.47.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 11:47:18 -0800 (PST) Received-SPF: pass (google.com: domain of joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org designates 64.147.123.20 as permitted sender) client-ip=64.147.123.20; Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id CF36A3201F1E; Fri, 10 Dec 2021 14:47:16 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 10 Dec 2021 14:47:17 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrkedvgddufedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvffuffgjkfggtgesthdtre dttdertdenucfhrhhomheplfhoohhsthcumfhrvghmvghrshcuoehjohhoshhtkhhrvghm vghrshesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepvdeihfetueevke duteehudeihedvlefgieejhedvteefgeelleehhfejudeijeevnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgvmhgvrhhsse hfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Dec 2021 14:47:15 -0500 (EST) In-reply-to: X-Original-Sender: joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@fastmail.fm header.s=fm1 header.b=mD3gvIF2; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=N9WYTBvF; spf=pass (google.com: domain of joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org designates 64.147.123.20 as permitted sender) smtp.mailfrom=joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fastmail.fm 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:29759 Archived-At: On Fri, Dec 10 2021, John MacFarlane wrote: > "Joost Kremers" writes: >> I'm trying to convert some MS Word documents to markdown, which works >> surprisingly well, except for two issues I'm wondering about: >> >> 1. Section headings aren't converted to `## ...`. This, I assume, is due to >> the fact that they have a custom style. > > Hard to say without an example. Can you post a sample docx? No, unfortunately not, it's confidential material. When I convert with `-f docx+styles` I get things like: ``` ::: {custom-style="XYZ Minor Head (1.1)"} Lorem ipsum ::: ::: {custom-style="XYZ Body Text"} > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod > tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, > quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo > consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse > cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non > proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ::: ``` Etc., etc. Does that help? Thanks, Joost -- Joost Kremers Life has its moments