From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32928 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sylvain Hubert Newsgroups: gmane.text.pandoc Subject: Re: Customize CodeBlock font size in docx Date: Tue, 11 Jul 2023 02:39:47 -0700 (PDT) Message-ID: <7e333365-fe50-4652-8274-aa83c66e213an@googlegroups.com> References: <71cbadfc-e399-4cd2-becd-95fc94278adfn@googlegroups.com> <3fe3c11f-bed0-fa56-4c2a-a4a96793f4a3@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_43543_1103684461.1689068387182" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32875"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDX6LT7YRQIBBZGGWSSQMGQE7O5P2KQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jul 11 11:39:52 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f62.google.com ([209.85.210.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qJ9qa-0008Qe-3L for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 11 Jul 2023 11:39:52 +0200 Original-Received: by mail-ot1-f62.google.com with SMTP id 46e09a7af769-6b8cc7351f0sf3731528a34.0 for ; Tue, 11 Jul 2023 02:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1689068391; x=1691660391; 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=7r34S0hWSDkP5iD+XyGSBkriJwtQ6YDzjDG/Rt7jlkE=; b=dLGGxjmIoo7VCNlX3fYswZ8+t/NhfELz4EhJ2EtTw2Iqzk4L2YQg5jyf14ZgKxaKMu mO9uxvn1oblk+Un3OyYWotaHfs9bdVccP4Wwe17yVqJth1uml3X8tSEVb/4TOaZALBDM gp6+DoKZHs7zTUtsS7hVD149V+pF51ZfAUp+yfcdD425VDA+TQ8gZatmplYmGp7KiP8L YGPaHxBFrzPvsXTE1/S3xWvyQL6uMqjL4jcA7TCMUGhwJPp7pZ3MMUe+bYDnG7hsf5TW qIv7GDWM3oseGLkxfhKnauGj7+cV5qgcUY9CeONX4x3g2yttCYsj8vAE4Qi3eFMOqeWD kVRQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689068391; x=1691660391; 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=7r34S0hWSDkP5iD+XyGSBkriJwtQ6YDzjDG/Rt7jlkE=; b=L+fN3rjzxheLhqHR5agWG3vFsOdXGmfJa95Le+uGKqcQBv4DiQ/xPdZrmmNHKWs8jo yUwAOY5+4Bd3KYUsObqRIZJTDx8im4veInitFwc2PIHtXLFS9Bmfn35nJD8kfttNA6zA sUq6MSjhieuy8JV8RI07lC+JhyDb2WCOv6h8N7E/tlrZ4POGEnKCR4piHPRqo49XY1BI GcUIPcXbXtBxgnkpdx27l1nazGnYt2bvhDqQcgrOuR0M5ZsWlhjZ07vSnbHK1yY1nTQx +LfgG02XCRc40TG1FwEM8v+7+KqKCrjL/0TSBvPW5ycDue8Aykp46ubua7B/jJNhVZb9 BhWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689068391; x=1691660391; 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=7r34S0hWSDkP5iD+XyGSBkriJwtQ6YDzjDG/Rt7jlkE=; b=kNH8T12K9OplqL8sLNdHuvQGgnMrZQYn3EhDQW+Asr231QZFf0jrrRI+Yo78qMi7NR LixBwy0lusi1zwZ4fZ5uNYvDRGFtzCpQeGfEdRIUGpM+p+lH83INJvLE54NBvW4Wk294 Of3FQy45VaLt5JpWtpn28mX6XOgK1F8hSd3UNVg+iiod0oSHAp6h+45WQLw0ASF9tA6R OJ9XGN1oDjYPnq239q/SL4CCsAXfWMmTF6/D3HW4qxKj70nI87qo4DHJ2ZGVNPQkxKk0 F2/70JxJlcTZMIM2qKQa5Beb0fqiX8u5qkuY+SSYKt8blZ+5/n Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ABy/qLYO6TJAGHnCRqB6Kegl25iG1laFOH1pIX0HZCpy8G0oZu7V8Oa3 UazjIVZYIaiCsGXZQJnimXs= X-Google-Smtp-Source: APBJJlE1Q+bYogmBNQ3mjDiohoZ/whMmCGWqx1PjxQFaQVPi8v1WhAt5colEumHFUHFgUz1VUgXPmg== X-Received: by 2002:a05:6830:4103:b0:6b7:4f77:727a with SMTP id w3-20020a056830410300b006b74f77727amr14521370ott.9.1689068390951; Tue, 11 Jul 2023 02:39:50 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a4a:41d5:0:b0:560:abe3:c26a with SMTP id x204-20020a4a41d5000000b00560abe3c26als1200970ooa.2.-pod-prod-03-us; Tue, 11 Jul 2023 02:39:48 -0700 (PDT) X-Received: by 2002:a9d:7582:0:b0:6ab:8d3:5209 with SMTP id s2-20020a9d7582000000b006ab08d35209mr853480otk.5.1689068387890; Tue, 11 Jul 2023 02:39:47 -0700 (PDT) In-Reply-To: X-Original-Sender: champignoom-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:32928 Archived-At: ------=_Part_43543_1103684461.1689068387182 Content-Type: multipart/alternative; boundary="----=_Part_43544_1135461680.1689068387182" ------=_Part_43544_1135461680.1689068387182 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks, I do see the "Source Code" style now. But changing it seems to affect not just code blocks but inline code as=20 well, which is unwanted: pandoc -o code-block.docx <<<' `inline code` ```c #include int main() { return 0; } ``` ' Is it possible to customize code blocks *only*? On Tuesday, 11 July 2023 at 15:17:03 UTC+8 Bastien DUMONT wrote: > pandoc -o code-block.docx <<< ' > ~~~ > print("Hello World!") > ~~~ > ' > > You get a document with a code block that you can copy-paste into your=20 > reference doc and customize there (its Paragraph style). > > Le Monday 10 July 2023 =C3=A0 11:51:26PM, Sylvain Hubert a =C3=A9crit : > > Thanks, but I can't find any code block in the default reference docx. > >=20 > > On Saturday, 1 July 2023 at 18:34:39 UTC+8 mf wrote: > >=20 > > Il 01/07/23 11:07, Sylvain Hubert ha scritto: > > > Hi all, > > > > > > Does anyone know how to reduce the font size of code blocks in the do= cx > > > output? > >=20 > > You may try this: > >=20 > > - export the code block in a, say, reference.docx > >=20 > > - open reference.docx with Word and customize the paragraph style of th= e > > code block, then save > >=20 > > - export again the code block in another docx file, using the option > > --reference-doc=3Dreference.docx > >=20 > > Pandoc should use the styles it finds in reference.docx, so the block > > code should look the way you customized it with Word. > >=20 > >=20 > > > > > > I know I could customize the Verbatim style in the reference doc, > > > but that would also unwantedly affect the inline code. > > > > > > Ideally it should be done with custom styles, without too much hacks = of > > > raw docx. > > > > > > Thanks! > > > > >=20 > > -- > > You received this message because you are subscribed to the Google Grou= ps > > "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send= =20 > an email > > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [2] > https://groups.google.com/d/msgid/ > > pandoc-discuss/cff22eb0-a9d4-4e03-aa77-b83c42c04a57n%40googlegroups.com= . > >=20 > > References: > >=20 > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [2]=20 > https://groups.google.com/d/msgid/pandoc-discuss/cff22eb0-a9d4-4e03-aa77-= b83c42c04a57n%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/7e333365-fe50-4652-8274-aa83c66e213an%40googlegroups.com. ------=_Part_43544_1135461680.1689068387182 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks, I do see the "Source Code" style now.

But chan= ging it seems to affect not just code blocks but inline code as well, which= is unwanted:

pandoc -o code-block.docx <<= <'
`inline code`

```c
#include <stdio.h>
int main() {
=C2=A0 =C2=A0 return 0;
}
```
'

Is it possible to customize code blocks *only*?
On Tuesday, 11 Jul= y 2023 at 15:17:03 UTC+8 Bastien DUMONT wrote:
pandoc -o code-block.docx <<< &= #39;
~~~
print("Hello World!")
~~~
'

You get a document with a code block that you can copy-paste into your = reference doc and customize there (its Paragraph style).

Le Monday 10 July 2023 =C3=A0 11:51:26PM, Sylvain Hubert a =C3=A9crit :
> Thanks, but I can't find any code block in the default referen= ce docx.
>=20
> On Saturday, 1 July 2023 at 18:34:39 UTC+8 mf wrote:
>=20
> Il 01/07/23 11:07, Sylvain Hubert ha scritto:
> > Hi all,
> >
> > Does anyone know how to reduce the font size of code bloc= ks in the docx
> > output?
>=20
> You may try this:
>=20
> - export the code block in a, say, reference.docx
>=20
> - open reference.docx with Word and customize the paragraph st= yle of the
> code block, then save
>=20
> - export again the code block in another docx file, using the = option
> --reference-doc=3Dreference.docx
>=20
> Pandoc should use the styles it finds in reference.docx, so th= e block
> code should look the way you customized it with Word.
>=20
>=20
> >
> > I know I could customize the Verbatim style in the refere= nce doc,
> > but that would also unwantedly affect the inline code.
> >
> > Ideally it should be done with custom styles, without too= much hacks of
> > raw docx.
> >
> > Thanks!
> >
>=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-discus...@= googlegroups.com.
> To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
> pandoc-discuss/cff22eb0-a9d4-4e03-aa77-b83c42c04a57n%40googlegroups.com.
>=20
> References:
>=20
> [1] mailto:pandoc-discu= s...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://gro= ups.google.com/d/msgid/pandoc-discuss/cff22eb0-a9d4-4e03-aa77-b83c42c04a57n= %40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter

--
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/7e333365-fe50-4652-8274-aa83c66e213an%40googlegroups.= com.
------=_Part_43544_1135461680.1689068387182-- ------=_Part_43543_1103684461.1689068387182--