From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32949 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Kelleher Newsgroups: gmane.text.pandoc Subject: Re: Table styles when outputing DOCX Date: Thu, 13 Jul 2023 14:05:39 -0700 (PDT) Message-ID: <58ee6de7-40ad-4728-a784-76d96c046a32n@googlegroups.com> References: <7234d3c7-0325-40ad-a10d-3d9b70de9ef0n@googlegroups.com> <30740175-CAF1-4423-A413-F6DF4A05D2D9@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5298_861796476.1689282339323" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25370"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDYKNHHAVIJBBJGOYGSQMGQEDS2ENOQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jul 13 23:05:45 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f60.google.com ([209.85.160.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qK3VQ-0006Pw-GD for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 13 Jul 2023 23:05:44 +0200 Original-Received: by mail-oa1-f60.google.com with SMTP id 586e51a60fabf-1b03f7fb970sf2047006fac.1 for ; Thu, 13 Jul 2023 14:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1689282343; x=1691874343; 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=m/mD++Rtu1Ar6bYb0NZv5PWoICKsU1j2UK+5x1nBZP8=; b=atS8ujyx3su93qrd7zRf1Y2hqgAxslMVn7vdoA2tE+t+CbYbumOBxDhvM/8k7UXLjD 5h7MejIUiJMH62IaygFiz+ZM2bO7hqWVc5cUISwUbGWXIjor41+zxxAdi3BJEsK8szRk KCvo61UEfiUZ3UlFT603K4Zp2yyjs88A9KPAMCf4wqccg1mpXsERCg2Nau6YmdYGeYzt A5B0gd2Gkv31g7H4rlyzrK/1fPrL2W/pbYqhdfrkt3x+oBIGhI/t8L2GgbuJ2Ab3D28j HKW770bosGaAVB9+qB+OTtRMudLysv11cSNpEQNDIgnOjrMuDBn2LVCJZdzVDQS8NOiA JSkw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulkelleher-net.20221208.gappssmtp.com; s=20221208; t=1689282343; x=1691874343; 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=m/mD++Rtu1Ar6bYb0NZv5PWoICKsU1j2UK+5x1nBZP8=; b=voH7q/9Sgu3gDchYvFB63jGVwQEM2bU6RNUB6kuAvIgOxRntcBmPOyoCBdAANWqHEB sS27jouHJSymuR7VawjHh2VUHItDPeOuXbvWP3KcjonC5QF/m63s3USyJ+at+Yn9cnhe d95iy1Ot7OTSI377vd7aipqKjPyaSuqqksgrIiaU1BE+WzPxOfe4HyR0K/evQ+JeFQbm 3qvsuEyqgnR5tGZWPRHzT4rLAF2rtN8M23VJkjk3ZGdhyXM4LqOv/N9MjjwOi4Dfyeqt g0XyNYYd8Ory33yZccQX4OQ77Fm7idXlOMkaNx3DTBnM36L0hbpZEZgryDKFG/syLx7X JyNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689282343; x=1691874343; 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=m/mD++Rtu1Ar6bYb0NZv5PWoICKsU1j2UK+5x1nBZP8=; b=HRey6l5k6olhL4IrTnH2+vl1PbXycscbeW5lMD4Wyv6tdL/2hCrCNLINJOd21/8Zvc YsuEXfgf+K2jFzwYZn4cUJuvRAWmovKK4sxRc33IohDDBRpEbPWuNRcQuGcf+hSA2Yhm aX6RbkUfa3iS29ybJHLNGdU/Xc0hZYm7Fa1s1SyvoNX8an6aTrq2eGjrDVnb+gXl5fuw ASmYA8xtLkBuA1gJm9TY8JE1GraXtHjzcoX8OJYGIVahrAUCmg2qV4alFbPmh+e+hH8v kC1nfDGuUL+FCwcgVR01YVdvNODSIjj8BhZ7Nmnf9ZBT5mPmG2 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ABy/qLZjfYDjOUifkHv0RCa9leFKhhlKQENeoVESGNg9QL9fusUu2OiY 6Pslka8zzuJF7+G77QhQQ38= X-Google-Smtp-Source: APBJJlHBxIc2H4jRrQQY5xU6NBq+MFdo+tW3vcqYd3zb8ngBaoDb3iPgTOZN7GmlFWAEHAmKdQIwsQ== X-Received: by 2002:a05:6870:4396:b0:1b7:5f27:5c52 with SMTP id r22-20020a056870439600b001b75f275c52mr3629106oah.2.1689282343262; Thu, 13 Jul 2023 14:05:43 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a4a:3314:0:b0:565:f8df:30d8 with SMTP id q20-20020a4a3314000000b00565f8df30d8ls899844ooq.0.-pod-prod-00-us; Thu, 13 Jul 2023 14:05:40 -0700 (PDT) X-Received: by 2002:a05:6808:2383:b0:3a4:316f:37cd with SMTP id bp3-20020a056808238300b003a4316f37cdmr1328271oib.5.1689282339937; Thu, 13 Jul 2023 14:05:39 -0700 (PDT) In-Reply-To: X-Original-Sender: paul-JZTKsBFbLNkkm2bSNb+QWw@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:32949 Archived-At: ------=_Part_5298_861796476.1689282339323 Content-Type: multipart/alternative; boundary="----=_Part_5299_773391244.1689282339323" ------=_Part_5299_773391244.1689282339323 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, one can do this. As the user's guide = =20 notes:=20 > produce the custom docx reference file with the terminal command `pandoc= =20 -o custom-reference.docx --print-default-data-file reference.docx`. Then=20 open custom-reference.docx in Word, modify the styles as you wish, and save= =20 the file.=20 To achieve your desired change, in Word go to Format > Style... , and then= =20 under the Styles list in the window that pops up scroll down to select=20 `Table`. Then click `Modify...` From there you can format aspects of the=20 custom-reference docx's table, choosing either to apply the formatting to= =20 the whole table or to just a part of it. You can use this method to make=20 just your header rows have green backgrounds. (I assume that whatever=20 formatting you choose here, it will be applied to all tables in your=20 document and that there's no way to have different formatting for different= =20 tables.) When you're ready to convert your source document to docx with pandoc, add= =20 `--reference-doc=3D` this to your terminal command, with the path to your= =20 updated custom-reference docx following the `=3D`. =20 On Thursday, July 13, 2023 at 2:24:02=E2=80=AFPM UTC-5 Zaur Molotnikov wrot= e: > Thanks for the hints. > > I'd like to get some more advice from the authors is the docx writer.=20 > > With the rest of the styles, the answer above works for me. But not with= =20 > tables. I'm not sure, which table style is used by default and how to=20 > change it.=20 > > On Thu, Jul 13, 2023, 8:21 PM John MacFarlane wrote= : > >> See https://pandoc.org/MANUAL.html#option--reference-doc >> >> The only way to customize docx output is to adjust the styles listed=20 >> there in a referenece.docx. I imagine the Table style is the one you wa= nt=20 >> to adjust, but I'm not a Word user so I can't give further details, nor = am=20 >> I sure that this particular customization is possible. >> >> >> > On Jul 13, 2023, at 5:56 AM, Zaur Molotnikov wrote= : >> >=20 >> > Hello all. I would highly appreciate a hint from the group, on how to= =20 >> give some styling to MS Words tables. In particular, I'd like the header= =20 >> rows to have green background. Is there a way to achieve it? >> >=20 >> > --=20 >> > You received this message because you are subscribed to the Google=20 >> Groups "pandoc-discuss" group. >> > To unsubscribe from this group and stop receiving emails from it, send= =20 >> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/7234d3c7-0325-40ad-a10d= -3d9b70de9ef0n%40googlegroups.com >> . >> >> --=20 >> > You received this message because you are subscribed to a topic in the=20 >> Google Groups "pandoc-discuss" group. >> To unsubscribe from this topic, visit=20 >> https://groups.google.com/d/topic/pandoc-discuss/e9wZSf1pBbc/unsubscribe= . >> To unsubscribe from this group and all its topics, send an email to=20 >> pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/30740175-CAF1-4423-A413= -F6DF4A05D2D9%40gmail.com >> . >> > --=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/58ee6de7-40ad-4728-a784-76d96c046a32n%40googlegroups.com. ------=_Part_5299_773391244.1689282339323 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, one can do this. As the use= r's guide notes:=C2=A0

> produce the custom doc= x reference file with the terminal command `pandoc -o custom-reference.docx= --print-default-data-file reference.docx`. Then open custom-reference.docx= in Word, modify the styles as you wish, and save the file.=C2=A0

To achieve your desired change, in Word go to Format > Styl= e... , and then under the Styles list in the window that pops up scroll dow= n to select `Table`. Then click `Modify...` From there you can format aspec= ts of the custom-reference docx's table, choosing either to apply the forma= tting to the whole table or to just a part of it. You can use this method t= o make just your header rows have green backgrounds. (I assume that whateve= r formatting you choose here, it will be applied to all tables in your docu= ment and that there's no way to have different formatting for different tab= les.)

When you're ready to convert your source d= ocument to docx with pandoc, add `--reference-doc=3D` this to your terminal= command, with the path to your updated custom-reference docx following the= `=3D`.=C2=A0 =C2=A0
On Thursday, July 13, 2023 at 2:24:02=E2=80=AFPM UTC-5 Zau= r Molotnikov wrote:
Thanks for the hints.

<= div dir=3D"auto">I'd like to get some more advice from the authors is t= he docx writer.=C2=A0

Wi= th the rest of the styles, the answer above works=C2=A0for me. But not with= tables. I'm not sure, which table style is used by default and how to = change it.=C2=A0

On Thu, Jul 13, 2023= , 8:21 PM John MacFarlane <fi= ddlo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
=
See https://pa= ndoc.org/MANUAL.html#option--reference-doc

The only way to customize docx output is to adjust the styles listed there = in a referenece.docx.=C2=A0 I imagine the Table style is the one you want t= o adjust, but I'm not a Word user so I can't give further details, = nor am I sure that this particular customization is possible.


> On Jul 13, 2023, at 5:56 AM, Zaur Molotnikov <quto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> Hello all. I would highly appreciate a hint from the group, on how to = give some styling to MS Words tables. In particular, I'd like the heade= r rows to have green background. Is there a way to achieve it?
>
> --
> You received this message because you are subscribed to the Google Gro= ups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send= an email to pandoc-d= iscus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-d= iscuss/7234d3c7-0325-40ad-a10d-3d9b70de9ef0n%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Goog= le Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-d= iscuss/e9wZSf1pBbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pandoc-discus...@googlegroup= s.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/30740175-CAF1-4= 423-A413-F6DF4A05D2D9%40gmail.com.

--
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/58ee6de7-40ad-4728-a784-76d96c046a32n%40googlegroups.= com.
------=_Part_5299_773391244.1689282339323-- ------=_Part_5298_861796476.1689282339323--