From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30012 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nandakumar Chandrasekhar Newsgroups: gmane.text.pandoc Subject: Re: Setting bold font to semibold font in generated docx Date: Thu, 20 Jan 2022 08:53:34 +0530 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000afaa6705d5fb074f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32809"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCY7JSF32YFRBQ5LUOHQMGQEQSW5RYI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 20 04:23:50 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-il1-f185.google.com ([209.85.166.185]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nAO3C-0008La-62 for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 20 Jan 2022 04:23:50 +0100 Original-Received: by mail-il1-f185.google.com with SMTP id d8-20020a056e02214800b002b766d01bf5sf2993899ilv.18 for ; Wed, 19 Jan 2022 19:23:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642649029; cv=pass; d=google.com; s=arc-20160816; b=r3AYV0Pf1Y+f27HiEdzfeFhYaCTuzJS4yX1DUsvq6D976A1/xJ2xnbW8VOX2dRROP5 BTBUIa88/ScJ/t7XeMAtRcYvpXREBfVPzMlUMXMRma6+Pqg7L4QPFOdswWN61Jeld2O8 2btn8mrCxNXCAYtZ98Efno2CcuymkPxdKejiRDLRv7G/iPTuPCz4qd8H+0m523gwYL0H E/E47XZtwJti4Z22M0uOKdZ3YIUHi4Vk8lg8yOxosaV48zKkgl67E8w0fOeIpstzovCp TyBPFxrSUlICIr577s/5U9pLWybazymyxLhjB8lDwkLfoXCOmmTKKS5mEEiZcz5AAk4v yvRg== 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=LrbAzKnwTzj+7js+uATFqD++jooA+rJ4tPIY5SuyQx4=; b=Sgi5IkrBJJakDOId/QBs3rwLpqKRKACrSslmfZkuUkh26I78fAN5uj8+CvQyqB3PnJ 46KraIKvsqmYPvyFhjy8nfhILMPz1HbkSnewfK3lTu2GRczMHMOyjpMnUPX6fjX5zkYs d6mGsS0UiA8S0U1Ueqwx0mSepdxqZ0hNdVlAa4xDA9MBbIufHIHFhMiNSdzOhEAB3N5I +af6iApnycdqb6BxaZqEF+l0UCvOJquceflP2CziO0FZTxaLN9BOOmFJXemUKNCXzohs f9EgNQsZYTSuhUqligX3O9xmPdrlrYev+rC+90kMBHK6AKB2xhXlO3ZaP3YeB60d5PxC ur6g== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mYBqBYzZ; spf=pass (google.com: domain of navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b36 as permitted sender) smtp.mailfrom=navanitachora-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=LrbAzKnwTzj+7js+uATFqD++jooA+rJ4tPIY5SuyQx4=; b=aQGN9cIv+buXsSDFoZ/wIdA3uFZChHZJiFTKycRaj/rsSxKVnlqZJZJdiwWOpjbR0y bBq/98hiCm8T7MyyvTMmnkQC/3u0uDw5v6wIOHxw9A26fAQou89/AcNnfLBVJ6Jb+UdI OZyqtk0KdzPyvSJLJMMnWXDTLJxEDfY8bFyf0lXkOrqE4v0ys9aHKCiRSwfDr+mJTsTs 9Ar9cXzORIhDZwE+f5iy1gPBqg9GZJZXXiDRKa6FeOt37dzCONxwEiBFaEJe+8+Ly/+G Hk2NUsBcJNS7PmxjUitGFzBshSd3Iz/vsCgkmq+DrU/OcDdW5AndB7Ki0thqz42YQX5b S7Uw== 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=LrbAzKnwTzj+7js+uATFqD++jooA+rJ4tPIY5SuyQx4=; b=anXqKJpMpCJyPYSgjQTGZmagvqudIsuyNesoQjMLIRIJoo4HcxZgnoh20qQLLJqB/5 v15uQ6+zSrMW0Lo08sTJfajKNsCac8pJp1WiDIW6uorbz6Xxq2IE/1kjsJvi8nLVoy+y bueYkgq0hs3qjRLge108ugxwWza2M4KFvdF4l89/t4c5mTyotR0VHItUetGWbhdIKSvz cZetywxaWTYwwgzEDC6NUjhdF+AFDeXxGF8ISpHGYTxQao4YL66+8n+a90CGd0QwTel8 YWY8rbSN46VRX8jfFPCotBt9FWvRBLJNUGu3LtgSdWf/ALWLln/ej+gpXKSaOm8vXVtm +m1w== 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=LrbAzKnwTzj+7js+uATFqD++jooA+rJ4tPIY5SuyQx4=; b=B/L4rqplXBxeoFF0ywh8kQou+rvWPyPGrVA1y66UHQX1+9yse1g1rd3ISht2WDxsCP JIm0mBOTjJqXl+kMDCDLaWJkFfVJ3Gt8zAA5U4bkUtHaeB6yqEM8jKa5Jk8mgw+bFGVB M6V483pY1zTUIlqWR1+rgnr+b4VyhzCUS7fIY2+slP5DkPMVNZpKC221atcfZIHqWSsk +XLzOachoF1jSJxPsnsXX1FgWnKswVOnAR0YJphytGMAsRqaocdM5zJEGHxPbCL17zA8 /X3QrMyi6Yi7QF51oe6xv61BA0NgzMnldRUBwBtVl4zYtDU2s9VOvUrMnfy0juEab9me N9ug== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530ewk4jfp+ZVGl0jSk6eCeSXQIvbpS5rF6qfgochOk6lk+/zycp 5w4yPxOm5TLl6AGlggDdoBI= X-Google-Smtp-Source: ABdhPJykWZ/xDl0iffdzIQ2oAi/VmovCbRCE2Fp05YFQPAX4TCUzGG/8oJWor8xnkJgyeX/KGLc6zg== X-Received: by 2002:a05:6638:627:: with SMTP id h7mr17007575jar.49.1642649029047; Wed, 19 Jan 2022 19:23:49 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6e02:2165:: with SMTP id s5ls809581ilv.3.gmail; Wed, 19 Jan 2022 19:23:46 -0800 (PST) X-Received: by 2002:a05:6e02:1548:: with SMTP id j8mr6395969ilu.104.1642649026580; Wed, 19 Jan 2022 19:23:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642649026; cv=none; d=google.com; s=arc-20160816; b=BHUJ7umh0/OjIHvBOEK1OqIaJpWgpSO+ilGjQMp0ffPEAM6ryTinQaTDnD8/nJIl/V +ooH0S18pKcIP9ClMBj+khDLY7bzdMbv60xfxLHJYGMpR3PuK9abIrPIFl2lh8cI/OlA AEHKzY41gs2zoIPX1D41U33SBbFUtRr5er92VbBvpHmeBlD3bcbi6uzyebAXcpkwg3Ms DafMb+aR/sgSmj9aW+WxXMiJuYxCZXVB2w14ASlI3/Tir4lvwhahOwoeNT2zSkGzOJP6 NW6cnunxyps0mRBJyqSMh4ApWlje3AnBjK2H25NWr/0+v9JTUW3SpoER6eCMiQ+OuyXN UmOw== 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=tVAd2tuMGY/V4IX35236rKLEYUunwY+E6Y54XZlSGG4=; b=f6ecVzQNQG1lfOnzKKhbfiCjrvvdud/rJylZLdvgHOTGDMFJzaJy/e0+J9x9p5PAEE hapOTNh3uHfy9FwGz4Ou9T1nnqU6Vp5uP7THB1JluXg1OjuGqcIoal0RCtkD1B5LW+9a oYl/cj5GQ5JLfM5GT4+PE4x8n7X/M0/sc9Ps86vkR74gvOxSSTXPNnNJjFyf85LLnMeR 3n+gYph+pihtQimBNaHLncoCqLE7SCn68agyxWa4w/Be3eH4nY3R/bUIGxXhRFGLlWBU 6CdRJwX/9f60dh3wjtw1PhT3fXQ8BiPG18O9crjCTyNAh91Q81xOHMP+uWWKNR37O/3D jmPA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mYBqBYzZ; spf=pass (google.com: domain of navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b36 as permitted sender) smtp.mailfrom=navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com. [2607:f8b0:4864:20::b36]) by gmr-mx.google.com with ESMTPS id t15si148610jal.4.2022.01.19.19.23.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jan 2022 19:23:46 -0800 (PST) Received-SPF: pass (google.com: domain of navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b36 as permitted sender) client-ip=2607:f8b0:4864:20::b36; Original-Received: by mail-yb1-xb36.google.com with SMTP id v186so13861494ybg.1 for ; Wed, 19 Jan 2022 19:23:46 -0800 (PST) X-Received: by 2002:a25:2886:: with SMTP id o128mr7957428ybo.453.1642649026012; Wed, 19 Jan 2022 19:23:46 -0800 (PST) In-Reply-To: X-Original-Sender: navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mYBqBYzZ; spf=pass (google.com: domain of navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b36 as permitted sender) smtp.mailfrom=navanitachora-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:30012 Archived-At: --000000000000afaa6705d5fb074f Content-Type: text/plain; charset="UTF-8" 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. --000000000000afaa6705d5fb074f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the code snippet=C2=A0@BPJ.

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

Cheers.
=
On Wed= , Jan 19, 2022 at 11:47 PM BPJ <bpj@me= lroch.se> wrote:
AFAIK you can't change auto= matic styles but you can use a Lua filter to replace Pandoc's Strong el= ements with Span elements with a custom named style.

``````lua
function Stro= ng (elem)
=C2=A0 return pandoc.Span(elem.content, { = ['custom-style'] =3D 'Semibold' })
e= nd
``````

Now define a named character style 'Semibold' in your ref= erence 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 custom= ized reference doc initially procured from Pandoc according to the document= ation here.

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

However, I do not see.= a way of setting all bolded text in paragraphs and bulleted lists to semib= old.

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 an= y workarounds available are will this feature be supported in the future?= =C2=A0

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 &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe@googlegroups.c= om.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c041b5d2-b11= f-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://g= roups.google.com/d/topic/pandoc-discuss/7fAcgbAgnXc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to p= andoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAtEK5%3= DyBm9U51O6jRsUJBVufaXr6nVPafMH%2B85Hao1gg%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/CAMhuDe-oo_sh4V3gwqmAp3DwhdX4%2BpROyXt-= sZJo_ciRivvbcw%40mail.gmail.com.
--000000000000afaa6705d5fb074f--