From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30015 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Setting bold font to semibold font in generated docx Date: Thu, 20 Jan 2022 07:36:11 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000043b21f05d5fdb895" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37462"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBY4FUSHQMGQEYMMO7RQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 20 07:36:23 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f55.google.com ([209.85.128.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nAR3X-0009Zu-4e for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 20 Jan 2022 07:36:23 +0100 Original-Received: by mail-wm1-f55.google.com with SMTP id o193-20020a1ca5ca000000b0034d78423625sf4723516wme.3 for ; Wed, 19 Jan 2022 22:36:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642660582; cv=pass; d=google.com; s=arc-20160816; b=yjvrhca65aqxT2bY4i2LuebLN9dICWHIo10J8ghtgX1KRHYUn3xk+4cVvSGRwYQ+/D yrf8/yilGpgo49sJr8OJjy4GxxIO1c7NiorEWwdCJgJYwH3jvYWQeXlxNS2wNU/7TiBd cqxAQRReh77f8OAa8N0lNwwb8nqbAm1GMonEWLsYVSEBaqoMcgUNbIuXL0VNC9eRYLNI yFpPPCxfh4BsdEosDTQbKvTINTkXrCE9MwfgHkES/nnYkgQ1Eo//uxoK0PrQdICgeHmS Uic3gVSGRUfgZF66wR2xiXrJP4/wqYFEG967oRHxzqPqUKMG7+p5zJ1AsHS9Z8c5Xtxe MUkw== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=KXUrPieSxITFLOp6uk4Sxq99nZwcOUyd21Nt5IocKnc=; b=cVJJJO7Mf3Xp2ZeDpkj7LlrVOy2wFyYzwjMReK170VdsG4kBJqHS38h/ythfwH+d53 YosjCynpuF16LhKKNVZqikGciE9ESrTrFeN6pfhxyOFOWPukglHg/K5papICAcwIr3En C1dP1sTlckuwuXJawsmfEyJs3Kg9V7hoe78eZaHi8MAe1UXlOi8l4mSD315391b9kVYn 7fieuOTHTRcTUwG6tJQjTOm/AYB87oh8kmNa3P25IiUT9h/0UwMTEQImcKZ1l54FDGU+ bZ2GpekQxE9xaiu9CxzDkzvIsOmO7ZTIqxG8dWGr0ffAEJ2gAuU9vyHyxiWOTQjXs51b MRUA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M6OjRHau; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12c as permitted sender) smtp.mailfrom=melroch-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=20210112; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to: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=KXUrPieSxITFLOp6uk4Sxq99nZwcOUyd21Nt5IocKnc=; b=njNqUJFMjNCNEmXBbpk62wvnamOi33viBj3aSLCMEnfJ/nkVoPWeEO/B4nhX7OACam 7m49BdCGHBOieuNvy9nQoAQ8xH8Wcn9855SCI0Q9NCXlYy4OI0ere8/ONr+Y9UYMnc/W VceyuqSn3FcfmfPsBzfDsvdNI8II6RHEmNnXqydKn+L/Aw+bRfYucjP8CYp/D5CJdbuf 3/o7+OT/nC+VUvc0c23FhUTRhfNDjyT09dF89N46gnDqFb4GnDt6Loiei3Fy06ETyCjO 4KVg8XyQ4kigxUpmI2ZJFThWNNe7gwKnLX5zylVen/iCSMlejpUiRkeaGzI+MYXQ+tNx Rr+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :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=KXUrPieSxITFLOp6uk4Sxq99nZwcOUyd21Nt5IocKnc=; b=O5qQBpSvLGr0HIaaqpcsak1BCTBjcGgEJWJDXNm/PCL1NgW9uffg1oJ6xhHM9mtzwE LEP/gPb0NC4entBFcMZBb2Iv0pP7/ScmLeMLKhndGydNZaN4rFC62CSzjskLoREts/A/ FHdxwubViox+p1ifpItv5IRAC4hKvuUWxW966ZETW8XqRgPi/zcJPjuiGOTCR07XRLK6 ++9+JZiq2DwqA4nJFKOul50oizya63LhPZxitOzoczLjIrxBaXUUhO+snl05CuY0GaEr KclMOLUmMKFvOpdJquOGiYRSFTmG7zp9/J1c2spaOVJGBCWJbq3mCntJpRu13UtdYcNb pIoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to: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=KXUrPieSxITFLOp6uk4Sxq99nZwcOUyd21Nt5IocKnc=; b=esgTiFmacz0M/yac1hO45mXc69xhyg1Wc5DSPAIG7EFDJjJBdQWV6BmN/NpEYWa1Gs nsT9HnY2YG+8FMzzcc2gHrCFDZ52EpyRPbo4BDXuTZYcwuBSxJMNWWAArE4r96xjnfZL apAoLOQt0jkabt8j4Ykyj9ce2rPY53rFBNTtoBwSWToadUpDBfw3polRPqi51EaxtlZn fP9gfS/pd6PDrmATaEmWG5KNo6Bbaf/3JljqJOQj/2IszaIJ6OLYkq9QWDHLT0Sn65x5 1V1x4dmAHXkwBho65T0SMOsHrbM6C1N03h0nRe7Fxmxfp2SKacLViSc23Vvn5uA7y8s+ 9H4A== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531QFvL/yfBtTo3YH3l8UsU3EP0uK44pJcE6okXFjKRBwmOjYgUK H0KqVbaADXgWgbL0c8kMWzI= X-Google-Smtp-Source: ABdhPJx9yg69MhaV8j77+O2ZCWtcLVoGSZFL4KPl5UHQtvRt79w5KFz5vmQrXPRQpB8hlIPb6ncemQ== X-Received: by 2002:a7b:c389:: with SMTP id s9mr7242010wmj.187.1642660582832; Wed, 19 Jan 2022 22:36:22 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:adf:f80e:: with SMTP id s14ls972080wrp.2.gmail; Wed, 19 Jan 2022 22:36:19 -0800 (PST) X-Received: by 2002:adf:d1e7:: with SMTP id g7mr17183127wrd.642.1642660579064; Wed, 19 Jan 2022 22:36:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642660579; cv=none; d=google.com; s=arc-20160816; b=zPfFADLNJKe+L4Chwj4oTU6Oe/WhypBPNq+buu9/E94jF5N43LFRuqrdZowEHF4vN4 0PC1CqiVWoDfGV1kRdGKKbAX9xwAKllBbamVIt9Lqh134NU7dYv2RAT2foAdNQz3ACAU 5ZeCTVat/rZ3mxAhcLt9Bx2dh+Bmmx+JNhuRKJ+5i+LzYgSVxM8V21WcINCjFJ0DYORx xkVO2IwQ3IKTZvrm3mV65R0Zoul3UPsH1piy25cj+NFJGnlZP478eRKbxzAuimSaa1j9 80PH0005V6aIwQIxE8wKDURP7gqg7ifbLWZfbi6BIrCrL6lzKLSpelf0q2ydf8E7wFjx 31Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xNgY1VpGb302C6Pw4SnU51Lxhr2MKiBvF3fsVvg6e/E=; b=DSeXmhk4Lk1ND59uEOLszT5udJVB+jyqZ9t3eatayRj1y2F6Tuk7B2g7Xp9OjP/12N eVrnCa0Foya5RxRzZRY64RrNXp9VHXnRRcMuVS13ITT+p5hBpYzC2sqcx96rsX4i/rzj HSK+rZCTE2JwYfY4nzUo9bDmlxJoSbJUi3TEX7lYHtVMJoP7VU2X3bp9k/xc/DEqaUic hsfyvvxuVJ5xxOGVGQ2PkZVngR0epgx8SUdQdyQ+4egVxig9L4hV/eWE+QflQIrGm9GP 28dRQi4yLcBujxnZIUIjWiid/glNl6LvPZ+nvbnNv+JahsSEWwfs8AlN5miJyqh9AoIT ji6A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M6OjRHau; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12c as permitted sender) smtp.mailfrom=melroch-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 h16si104659wml.0.2022.01.19.22.36.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jan 2022 22:36:19 -0800 (PST) Received-SPF: pass (google.com: domain of melroch-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 b14so17816916lff.3 for ; Wed, 19 Jan 2022 22:36:19 -0800 (PST) X-Received: by 2002:a05:6512:128e:: with SMTP id u14mr32299533lfs.239.1642660578438; Wed, 19 Jan 2022 22:36:18 -0800 (PST) In-Reply-To: X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M6OjRHau; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12c as permitted sender) smtp.mailfrom=melroch-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:30015 Archived-At: --00000000000043b21f05d5fdb895 Content-Type: text/plain; charset="UTF-8" I hope it works with bold italics too. If not it might need quite some adjustment, but I think that the automatic italics will mix with the named semibold. Den tors 20 jan. 2022 04:24Nandakumar Chandrasekhar skrev: > Thanks for the code snippet @BPJ. > > I do not have too much experience building my own Pandoc filter but > definitely a way forward and a reason to learn Lua. :-) > > Cheers. > > On Wed, Jan 19, 2022 at 11:47 PM BPJ wrote: > >> AFAIK you can't change automatic styles but you can use a Lua filter to >> replace Pandoc's Strong elements with Span elements with a custom named >> style. >> >> ``````lua >> function Strong (elem) >> return pandoc.Span(elem.content, { ['custom-style'] = 'Semibold' }) >> end >> `````` >> >> Now define a named character style 'Semibold' in your reference doc and >> run pandoc with that reference doc and this filter. >> >> Den ons 19 jan. 2022 06:00Nandakumar Chandrasekhar < >> navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: >> >>> Dear Folks, >>> >>> I am converting a markdown document to DOCX using a customized reference >>> doc initially procured from Pandoc according to the documentation here. >>> >>> I am able to set the bold font-weight to semibold for the title and >>> heading fields. >>> >>> However, I do not see. a way of setting all bolded text in paragraphs >>> and bulleted lists to semibold. >>> >>> It looks like I need to set the strong style to semibold to achieve >>> this but Pandoc does not support styling that element as far as I can tell. >>> >>> Are there any workarounds available are will this feature be supported >>> in the future? >>> >>> I would prefer to not have to do any manual post-processing after Pandoc >>> generates the document. >>> >>> Thanks in advance. >>> >>> -- >>> 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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/c041b5d2-b11f-409b-8f45-815263626111n%40googlegroups.com >>> >>> . >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "pandoc-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/pandoc-discuss/7fAcgbAgnXc/unsubscribe. >> To unsubscribe from this group and all its topics, send an email 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/CADAJKhAtEK5%3DyBm9U51O6jRsUJBVufaXr6nVPafMH%2B85Hao1gg%40mail.gmail.com >> >> . >> > -- > 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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/CAMhuDe-oo_sh4V3gwqmAp3DwhdX4%2BpROyXt-sZJo_ciRivvbcw%40mail.gmail.com > > . > -- 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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAzSk%2Bq8h41YTnFuSAhCkj4eNion3vK_nq65BwyiJuw4g%40mail.gmail.com. --00000000000043b21f05d5fdb895 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I hope it works with bold italics too. If not it might ne= ed quite some adjustment, but I think that the automatic italics will mix w= ith the named semibold.

Den tors 20 jan. 2022 04:24Nandakumar Chandrasekhar = <navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org&= gt; skrev:
Thanks = for the code snippet=C2=A0@BPJ.

I do not have too much e= xperience building my own Pandoc filter but definitely a way forward and a = reason to learn Lua. :-)

Cheers.

On Wed, Jan 19, 2022 at 11:47 = PM BPJ <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> wrote:
AFAIK you can'= t change automatic styles but you can use a Lua filter to replace Pandoc= 9;s Strong elements with Span elements with a custom named style.

``````lua
= function Strong (elem)
=C2=A0 return pandoc.Span(ele= m.content, { ['custom-style'] =3D 'Semibold' })
end
``````

Now define a named character style 'Semibold'= in your reference doc and run pandoc with that reference doc and this filt= er.

Den ons 19 jan. 2022 06:00Nandakumar Chandrasekhar <navani= tachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Dear Folks,

I am converting a markdown = document to DOCX using a customized reference doc initially procured from P= andoc according to the documentation here.

I am able to set the bold= font-weight to semibold for the title and heading fields.

However, I do not see. a way of setting all bolded text in paragra= phs and bulleted lists to semibold.

It looks like I need = to set the=C2=A0strong style to semibold = to achieve this but Pandoc does not support styling that element as far as = I can tell.

Are there any workarounds available are will this featur= e be supported in the future?=C2=A0

I would prefer= to not have to do any manual post-processing after Pandoc generates the do= cument.

Thanks in advance.

--
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 pandoc-discuss+unsubscribe@goo= glegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c= 041b5d2-b11f-409b-8f45-815263626111n%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-discuss/7fAcgbAgnXc/unsu= bscribe.
To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-dis= cuss/CADAJKhAtEK5%3DyBm9U51O6jRsUJBVufaXr6nVPafMH%2B85Hao1gg%40mail.gmail.c= om.

--
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 pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discus= s/CAMhuDe-oo_sh4V3gwqmAp3DwhdX4%2BpROyXt-sZJo_ciRivvbcw%40mail.gmail.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://group= s.google.com/d/msgid/pandoc-discuss/CADAJKhAzSk%2Bq8h41YTnFuSAhCkj4eNion3vK= _nq65BwyiJuw4g%40mail.gmail.com.
--00000000000043b21f05d5fdb895--