From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32931 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: mf Newsgroups: gmane.text.pandoc Subject: Re: Customize CodeBlock font size in docx Date: Tue, 11 Jul 2023 14:51:32 +0200 Message-ID: <5303aa80-f729-f4c2-0e38-96e3d90a80af@gmail.com> References: <71cbadfc-e399-4cd2-becd-95fc94278adfn@googlegroups.com> <3fe3c11f-bed0-fa56-4c2a-a4a96793f4a3@gmail.com> <7e333365-fe50-4652-8274-aa83c66e213an@googlegroups.com> <782d9773-1c50-9b79-b05f-361a9df87127@gmail.com> <1244cd1b-72a6-4c8b-9b15-830bbd36ab6dn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21207"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDZYJ4HW2QPBBV5AWWSQMGQEKGOSQJI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jul 11 14:51:41 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f63.google.com ([209.85.167.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qJCqC-0005Ki-KL for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 11 Jul 2023 14:51:40 +0200 Original-Received: by mail-lf1-f63.google.com with SMTP id 2adb3069b0e04-4fb9087a677sf5042958e87.1 for ; Tue, 11 Jul 2023 05:51:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689079900; cv=pass; d=google.com; s=arc-20160816; b=04E7vGmu9qHRKljwGT7pW4xgqnoo22cEwFo7EwDJVZRYBMJbhnQrM3vmZHcPiDj5bH +gLX0B8Lu7YWPjwOcTuoGFzJIAx0TTWQ80u7xD7ldBwa0j8x+hQpB4oM6dFGp2g7YfWZ VbTYfvpWGa2hLfOI7vn7WOC9tG4/JpjxHYvu+h0AF1q02Crk6/rYWhn/vx3EbcDt+jad RSEXOeDRmAzPlZ6sQiMfnWi6iMLvObNX3k+libgbwhNd3B/YDvJgRhxxA0JDZuWTH0ex sQ1L1EorPJLbdyObIL/fjrGXABartY1KBMY3YSk7lzF5AknYroSn64XISWzobVZdL+dA EgBw== 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:content-transfer-encoding :in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:sender:dkim-signature:dkim-signature; bh=p5XjwY+ZR/EfJLuTYF0n0ybK6/SKOlJKd+7V19rrqVM=; fh=9r34WoOhqzq5q0wAFSQFgKCRgk4jnkyKIsuVBsoxsp0=; b=xUuIlVwVg0xK4277ANcCtEJyVt3d0RCLgvDDDe4wxW2KxkLPEHPlPGjbeQVz6gF9ct FG3GALQ7aJnnlw3vy+1G7ZGDoDSk+D5rPud6uOsnJ/BM5SE28QXiNZ0Y93PlaAa0HdIw SElfWNSYJnl/zHnDzHcp53Lab4Z6eOZ55SKr2xSpYRKlquPwrvdgzV0JuwgdTHks4mcr alENqvDyhaOjsZ2ggiMsUn9ZLwjqfnrXP8HvntzCA+P5jAVXow9wz8sX3YUJYOwUXTA0 1w3x5nbHKh8tKaYGDeX6MCvx8lsa52N/fGj0LK4AzRs7dWcxlkP75xjibMzAExx9VSUc ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=oYkAfXZe; spf=pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12c as permitted sender) smtp.mailfrom=massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1689079900; x=1691671900; 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 :content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=p5XjwY+ZR/EfJLuTYF0n0ybK6/SKOlJKd+7V19rrqVM=; b=ZeE2R3RyaG6JexYj4hO20/k51zDZjgQVKy1Ii0oMYfW5bVLPaw0IPiSGy4O4FW+Vpe EMUqeVjpEbViHWdP7udy6YydXNOaj1gDnS93xORBsjTskUxk9AsC4KYSdFBbLH8hS7PR evacpjhOO+c8WCaKR1HGpJLHmur+E2qrG//pJp7L2mTnOf7epx//FxsjTuFv4hpEE57u BTS6Mw5Ts9hOW32ZYAXfovq9wy9mp6ASZV5bq86CADAYFupsY3hGg0SEsaCTk8eNEgID DHbgRBZOh DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689079900; x=1691671900; 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 :content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=p5XjwY+ZR/EfJLuTYF0n0ybK6/SKOlJKd+7V19rrqVM=; b=ROAvT3Zgqx+N3w9OkwgjMWcG2elXOprk1H2jxrvCZkpJRVwpsV+4m+j04YkkG12Gyj RH7qiPG8S8QsByy/s6VXECFdlZszbDn6Q+6JQ98tgdtWrErSPJKuqe+xdHDIc8L7WLEs DLk7cjei8zGGZ8Z1bc+WbnTv56pyg8gYVMqtiv8bnTdCLRkiimzbpO1H0YSZcxATLRL4 Bs9S1mSTWPcM6c4QvfgwWXpoyxQH+Op9ZFHIBTmRNihxKDKj8aDVJNeVEMbF1NmxW7yc Ia8R3ak8OPAe17ubi9eP9Mc X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689079900; x=1691671900; 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 :content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=p5XjwY+ZR/EfJLuTYF0n0ybK6/SKOlJKd+7V19rrqVM=; b=arV9SlVp68baiCVkto0YD54hRidsexIQdi46SteRKTgUo5RIerP5DapFZUM96bHcxD o7ypi66hUtcubnviEvlsKBBmihHF67AQQjhaeAB9K2SKJ4YZsfODMF/riiSz4djw3WN4 lY1T6TNKjxiwagGybGnusG8mrTHvcJx6N7GYGjiXoJuUjmiLmMVR1hioLP5GrsfL1oaY Y3IvNuh53Dlq+/a+oECx Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ABy/qLaEcp18v8zIaESuQoDv7QdXlKcIZJ2y9xX2w6UKnqYvnfLQI3ce ZksDDEvFvjHP0FZ2mMZvjsE= X-Google-Smtp-Source: APBJJlG3QO9ACWiMsjUz7mRaiFOAdpwDq0wkZNfFbXtOHcnuYNGPutJWkIJeJDW5KfzJ8sAWwLJ3EQ== X-Received: by 2002:a05:6512:3190:b0:4fb:96ed:93b3 with SMTP id i16-20020a056512319000b004fb96ed93b3mr15061711lfe.65.1689079899549; Tue, 11 Jul 2023 05:51:39 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a19:6d1c:0:b0:4fb:a37b:86a7 with SMTP id i28-20020a196d1c000000b004fba37b86a7ls203316lfc.1.-pod-prod-09-eu; Tue, 11 Jul 2023 05:51:34 -0700 (PDT) X-Received: by 2002:a05:6512:12c7:b0:4fb:772a:af13 with SMTP id p7-20020a05651212c700b004fb772aaf13mr16289376lfg.28.1689079894308; Tue, 11 Jul 2023 05:51:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689079894; cv=none; d=google.com; s=arc-20160816; b=j1zv7KLPNkbcCk5TylUc6bAVGcNgjxpKAUI+npPjtI4WI5Lhj+SMWl3CnqhH1RxKgr +qkPUxmGEgV5MG4HG4Q3Qr4yxdR+29/oan9WVSyrGlbnNzmxeVdQVT2nb3jGJJWmW11+ 0hXQNZ25HNEhHmAkeYgpEJGZh+5qp8HzvNX936j2P6uGWJtBW9McxHP91EBBoky2y09i DQm1PCcqdg7RVgfkFyB56mCAdby9RnFZqBBYIhTjZhqOlj2X8djZ8APyryESxQTipg0F LtE3XLnkeuGxO3IE7wfjEmTaXSIICknWK19NjWNXAGsVTypyUE92FWuSyBSV4o+xVig/ Sg3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=4UY8zejqucr70/+Hst4WwST7Vwoc08y3+raCqPp3cw4=; fh=9r34WoOhqzq5q0wAFSQFgKCRgk4jnkyKIsuVBsoxsp0=; b=M8y1PHKgWYgHGWgdFnSa8ZoALwpGghOhqrNZ0XMJ4YQjbDmIUiA8kzQcJS6nUET7XL VH3FmTM7ktdSEhuVbgHfjFLW+vK/ZcLcsQE0kbO1hJlm5VmcazsVtx5Way8aETXxwymq RRnFl4ADSoGquUX8mhbJHAPSTPVTuoLHs7n+8hGGYRYM4IcTWFTHN3eROPNxBKWgxgOl o9yyR4UGCmUlZHBROupsNoGl/VmkLGPXzyaDH9qroXAPacIiuNCJfG1T/rIunBkupsR5 /GQm3dHS0VLBVZ9gG004REuzyb9WCVwyjmABRBL5q5u4JcBYe+OFiGj6iDkd74LhfnJt uJOA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=oYkAfXZe; spf=pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12c as permitted sender) smtp.mailfrom=massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com. [2a00:1450:4864:20::12c]) by gmr-mx.google.com with ESMTPS id y11-20020a056402440b00b0051e29ed9cdbsi133480eda.2.2023.07.11.05.51.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jul 2023 05:51:34 -0700 (PDT) Received-SPF: pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12c as permitted sender) client-ip=2a00:1450:4864:20::12c; Original-Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4f96d680399so8290368e87.0 for ; Tue, 11 Jul 2023 05:51:34 -0700 (PDT) X-Received: by 2002:a19:8c14:0:b0:4f8:7781:9875 with SMTP id o20-20020a198c14000000b004f877819875mr12017324lfd.60.1689079893314; Tue, 11 Jul 2023 05:51:33 -0700 (PDT) Original-Received: from [192.168.1.52] (host-95-229-108-50.business.telecomitalia.it. [95.229.108.50]) by smtp.gmail.com with ESMTPSA id v8-20020a056512048800b004fac93bdaecsm306571lfq.242.2023.07.11.05.51.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jul 2023 05:51:32 -0700 (PDT) Content-Language: en-US, it-IT In-Reply-To: <1244cd1b-72a6-4c8b-9b15-830bbd36ab6dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=oYkAfXZe; spf=pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12c as permitted sender) smtp.mailfrom=massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:32931 Archived-At: Sorry for the mistake, please read "'Source Code' paragraph style"=20 instead of "'Code Block' paragraph style". I have no MS Word, I'm using Softmaker Office, but you can see the=20 styles anyway. In the screenshot I see that you are displaying only the styles in use,=20 please show all the styles and you'll see "Verbatim Char" too. In your example I see "NormalTok", "OperatorTok", "PreprocessorTok" that=20 are character styles derived from "Verbatim Char". You see those because=20 you specified the language of the block code, so you get syntax=20 highlighting. Il 11/07/23 14:24, Sylvain Hubert ha scritto: > I can only find the "Source Code" style but no "Code Block", even in=20 > "All styles". Please find attached the screenshot. >=20 > Could it have anything to do with the version of MS word? > pandoc-code-docx.png >=20 >=20 > On Tuesday, 11 July 2023 at 19:14:06 UTC+8 mf wrote: >=20 > There are two styles: >=20 > - "Code Block" paragraph style, that I made smallcaps in my example >=20 > - "Verbatim Char" character style, that I made blue >=20 > I did not check, but I suspect inline code is blue but not smallcaps, > because it should take only the "Verbatim Char" character style. >=20 > You should also notice that "Verbatim Char" has many derived styles f= or > syntax highlighting, that are used once you specify the language of > your > code block. >=20 > So if you want to change only code blocks, you'll work on the "Code > Block" paragraph style, leaving the character styles untouched. >=20 >=20 >=20 > Il 11/07/23 11:39, Sylvain Hubert ha scritto: > > Thanks, I do see the "Source Code" style now. > > > > But changing 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 > > int main() { > > =C2=A0 =C2=A0 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 reference doc and customize there (its Paragraph style). > > > > Le Monday 10 July 2023 =C3=A0 11:51:26PM, Sylvain Hubert a =C3=A9c= rit : > > > Thanks, but I can't find any code block in the default reference > > docx. > > > > > > On Saturday, 1 July 2023 at 18:34:39 UTC+8 mf wrote: > > > > > > 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 docx > > > > output? > > > > > > You may try this: > > > > > > - export the code block in a, say, reference.docx > > > > > > - open reference.docx with Word and customize the paragraph styl= e > > of the > > > code block, then save > > > > > > - export again the code block in another docx file, using the > option > > > --reference-doc=3Dreference.docx > > > > > > Pandoc should use the styles it finds in reference.docx, so the > > block > > > code should look the way you customized it with Word. > > > > > > > > > > > > > > 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! > > > > > > > > > > -- > > > 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...-/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.c= om >. > > > > > > References: > > > > > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [2] > > > https://groups.google.com/d/msgid/pandoc-discuss/cff22eb0-a9d4-4e03-a= a77-b83c42c04a57n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter= > > > > > -- > > 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 pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > . > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/pandoc-discuss/7e333365-fe50-4652-8= 274-aa83c66e213an%40googlegroups.com >. >=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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=20 > . > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/1244cd1b-72a6-4c8b-9b15-= 830bbd36ab6dn%40googlegroups.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/5303aa80-f729-f4c2-0e38-96e3d90a80af%40gmail.com.