From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28176 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Henning Schwentner Newsgroups: gmane.text.pandoc Subject: Configurable default styles for docx reader and writer as extension to custom styles Date: Fri, 16 Apr 2021 03:59:25 -0700 (PDT) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_176_166256607.1618570765010" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32546"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD2LBN4FV4KRBDW44WBQMGQE2TCV2QY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Apr 16 12:59:28 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f56.google.com ([209.85.210.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lXMC8-0008Kv-9v for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 16 Apr 2021 12:59:28 +0200 Original-Received: by mail-ot1-f56.google.com with SMTP id o62-20020a9d22440000b029027e30deed3fsf4500987ota.12 for ; Fri, 16 Apr 2021 03:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=Pfj+HfDGNd2mQtaoywiOJlV4oVpWxBghn/zG0KBwt5U=; b=Eu52h4/3qLk/n8qr1oEzST770s5qeV+I2ksfejnNZ0wWOP5QoKv6ZJ326MN7DYqoEK Z6Moz+0tn6h4GY5WbWNtNAXE8cLKo09bQx9D0SrF+57PDgJJynAAU07ZRK1wmfdlsCzc tzdFvaI2n6XsHogAqJW/UOHcdidUfUACJXIMgZArLFueDa3jAuj0K1yVZoV+58lp0Mxi ZlY+XwrrslF+pTRrNqjnuGIEzojWV0syfzcJUaASWpovWvGZ8P45aES6NA91LIka3ziE ZeOElNY0wq24EZE7akANYa+W+ye5v+hcKCwbb18RrZIezNKtvCa7ktniE783z2ck2GG7 //DQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=Pfj+HfDGNd2mQtaoywiOJlV4oVpWxBghn/zG0KBwt5U=; b=DnjFXprf6HgEtsj/W7l83/ydBmXepis6xspkX36wZYUzrjadiK9up9NPEzYmgcHBZ/ tnkWbUT6H3Pf0C61Tqj4rQLOy3hjj3c9iEzI9JxKCzpai1bsVE9nUdTXYyW+MmSf3cuA zt/1zlqRjINqi/Gk6+1vN6m8er2srgfXHALi4OEbgxbOzReJL2lGODXlM8TfPlsNo82T /zKamBe9NB6zZMcHxsbEQHmYlAgH30HRSaFh4NTLyKtd0zRCB8dMahm6gsYTpMLJKzJi T3xxh3+lFZVjbZj08boHmdSNA6AfagTedRxDKo53oR+j7UZm/nk+GtopYtqzqKjX3MxQ ZkdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=Pfj+HfDGNd2mQtaoywiOJlV4oVpWxBghn/zG0KBwt5U=; b=tiFpAGCXujJOllCvOynx0rzYOhCrr4df3hxyvegaAhc5H0Tp6ndrC/4PB2mVk1hp0o KVGy8JqLss3521M8+524S98tuyhFUOTzGTCBe6ACckoy05qDsRs3XaNFkltnRRhrAGkf NYAZxbd2qAiYC8AhS3pJ13OU2hbhuT/mv1NwSQ6iqEOUXyDfrTDVXC64lgh1NsZ6k3oJ bahLUR0Z8USYu1MGYwdQeR5cMZqtqlUCgUqfQr93NOe2ctzGH3gw6PzlQctOraAN4Dvj /O2Hs9ptasDYDwS6536ng6NGaA5yU0+a519IxnfrQJ42cFO0sgK5Yticx+c385nbOtc1 KM1Q== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532yOkMd6aaZ7/WzVmS91M55Af8EStVJRltwO/WCjmZ6FcDU7LfC BNXnt2l5/f6QMX6k5E65lUM= X-Google-Smtp-Source: ABdhPJzppL6MrqS0UqZqZsWN+sslBqxmwFK/dyPYTxU5apNhDO790KLESlombcAh33o2bk0h5TxZdg== X-Received: by 2002:a9d:220a:: with SMTP id o10mr1534827ota.199.1618570767272; Fri, 16 Apr 2021 03:59:27 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:71cf:: with SMTP id z15ls2243450otj.2.gmail; Fri, 16 Apr 2021 03:59:25 -0700 (PDT) X-Received: by 2002:a9d:7848:: with SMTP id c8mr3153979otm.117.1618570765655; Fri, 16 Apr 2021 03:59:25 -0700 (PDT) X-Original-Sender: henning.schwentner-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:28176 Archived-At: ------=_Part_176_166256607.1618570765010 Content-Type: multipart/alternative; boundary="----=_Part_177_2114149862.1618570765010" ------=_Part_177_2114149862.1618570765010 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The custom style mechanism of the docx writer is great and makes my life as= =20 author much easier. A further improvement could be the following. What do= =20 you think? So far, when converting to and from docx, a fixed set of styles is used by= =20 both the reader and writer. So we have styles =E2=80=9CBody Text=E2=80=9D, = =E2=80=9CHeading 1=E2=80=9D,=20 =E2=80=9CCaption=E2=80=9D, =E2=80=9CFigure=E2=80=9D, and so on. These corre= spond (of course) to the=20 Markdown elements. This works great with using Pandoc=E2=80=99s standard=20 reference.docx. But most publishers provide templates with their their=20 own styles and their own names for them. Example: Pearson uses CHAP_TTL for= =20 chapter titles and CHAP_BM for body text. My idea is to make the styles (in fact style names) configurable. So we=20 could have a config file that defines the mapping. Something like: Body Text =3D CHAP_BM First Paragraph =3D HEADFIRST Heading 1 =3D CHAP_TTL Heading 2 =3D H1 Footnote Text =3D FN =E2=80=A6 This mapping file could then be used by both the reader and writer for=20 convenient conversion. Would that make sense to you? Best, Henning --=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/a548419c-194f-4b31-9f49-fa0ebafab7fbn%40googlegroups.com. ------=_Part_177_2114149862.1618570765010 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The custom style mechanism of the docx writer is great an= d makes my life as author much easier. A further improvement could be the f= ollowing. What do you think?

So far, when converting to and from docx, a fixed set of styles is use= d by both the reader and writer. So we have styles =E2=80=9CBody Text=E2=80= =9D, =E2=80=9CHeading 1=E2=80=9D, =E2=80=9CCaption=E2=80=9D, =E2=80=9CFigur= e=E2=80=9D, and so on. These correspond (of course) to the Markdown element= s. This works great with using Pandoc=E2=80=99s standard reference.docx. Bu= t most publishers provide templates with their their own styles a= nd their own names for them. Example: Pearson uses CHAP_TTL for chapter tit= les and CHAP_BM for body text.

My idea is to make the styles (in fact style names) configurable. So= we could have a config file that defines the mapping. Something like:

Body Text =3D CHAP_BM
<= div dir=3D"auto">First Paragraph =3D HEADFIRST
Headi= ng 1 =3D CHAP_TTL
Heading 2 =3D H1
Footnote Text =3D FN
=E2=80=A6

This mapping file could then be used by both the reader and w= riter for convenient conversion.

Would that make sense to you?


Best,
Henning

--
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/a548419c-194f-4b31-9f49-fa0ebafab7fbn%40googlegroups.= com.
------=_Part_177_2114149862.1618570765010-- ------=_Part_176_166256607.1618570765010--