From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30013 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 09:48:29 +0530 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000012d7d505d5fbcc24" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5924"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCY7JSF32YFRBIOFUOHQMGQEKLDPFMI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 20 05:18:44 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f63.google.com ([209.85.210.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nAOuK-0001PU-Ip for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 20 Jan 2022 05:18:44 +0100 Original-Received: by mail-ot1-f63.google.com with SMTP id y11-20020a056830070b00b00595da7db813sf2903971ots.16 for ; Wed, 19 Jan 2022 20:18:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642652323; cv=pass; d=google.com; s=arc-20160816; b=b6Fch6Ou2iuX3qiEEJRjkZJIRsNnYJ0EZtpuToB9rAxzg3Zb7RVIIVWW3ONALY1+KG Y8zGQ28Hv3I0qhg0pgfm/7LV/2jLsrl2NTqwohpbK+0shkBOfasHZUSNLiaW6E5piTJh t94X0NxoqiDljYPveb3XJ1pFW+IobCx6Bfa38ob8/sfePbLTXqcLkMgga8d+Tb/Ulo1z NBoc4GngYMgc97MZwOIviG9c+4rjtAJQrpRBxK6ctRBddvHHf7mHrYBJmdmOOqjjoAVN Vy8jRkcbj4hgili1Qt3d5j5FD9wYCd32ovzQbaPFeJVjpYvNgIo8V99msP7LZ8Zk73ia g/zg== 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=htHfcCJdqIdJYHaFoqNg+UNkJA1n5jyx3aPYM/gyi7o=; b=l3usDUtgW4tu96Hu1dqi2lkuezFPhKXgSvCl9b485bwkhr1rhbg00t/pNLSy6WM+VU OlfyvlSCi9z8wOCpwyp9sIoFBjlG6Ae33lXyYS2kWoxKn1ENrbYlYgGRDzrcow6ibrro ulbiHhC6fsHzy4bGr4uKxHACGqVBcDPsa0qc9CsnQpj0Pp3yGubt0yzFCiMd6TVHavU1 aDj5tVaAWYWL82Mcc3AK5r5KLZe266SCiguoOIFEbGxkKc8FXE3gLoXUV9b1WPPJmsTY eOGxPtZP9sMEwIZs2urmylLhC4cDq7F9m2ZJHXUNA12vEPTpkUKIjAoQb13Usf22QVlO +EXA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="a3+11t/a"; spf=pass (google.com: domain of navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b2c 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=htHfcCJdqIdJYHaFoqNg+UNkJA1n5jyx3aPYM/gyi7o=; b=fNrLtqKy5Z4dQgLH149jlpbdXrFd4vuNm2tVJHWjx/bDjEpOoumByfhfCRET44dSjF QJYsrCPFNS1XX5p9phiK74eUywQAQIjSY867CVbOVocQmgfhqYE771JGHGSF/Jabw9lz /cmLVgW6pJEXUJUVvewbbdatT2aAiJ0vzdTFL/iuxyY/lgKbXvThiOugWopSyAhzWN6B MUCHWC8LuR29JGsz8zspdFJJf/K2wgdtgYHLSAjipQSYBTaZxlSRGuqgqz9xt9gtRXZ5 HJJWonpExaEP7FDrbALzBMZcduV4IT0P9MYLivSkaiRYqSg/HDUU/JqenDqX3m6PFoNs gJXg== 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=htHfcCJdqIdJYHaFoqNg+UNkJA1n5jyx3aPYM/gyi7o=; b=IaJNnKgWxFZvaeqgRMssPbv6I8gXCQ9/kbfM31fm0KxKnqDGl534lOePIxdy+t7fEK HS0vERhPk+pzStYbMV67QRs6mD+DOrQBpuE+gp4b9DB2KEbtOBqGq6fgCHR8pgfN0CW/ oTB+LEiERM1oQHBYpCaclxaU74c9KiBPPzvqbsTCH7c3PxMiYfTNCkkaCKWkxQskPoPp 7tTf88Do/C66RUvqar+zsqP779bKY06BijJ73CY99OHnAqPBQe+CcVIByKkmiSA7fKzJ WOlYnywlAqebvyqtsS1sKmtlLauM6xLiqUo3V23UNOLQa6+oiVbW7i3k0JZWSTwhang4 2/Nw== 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=htHfcCJdqIdJYHaFoqNg+UNkJA1n5jyx3aPYM/gyi7o=; b=vjx2MeB23c/kcUY9KKJZKjZkHrQZBkOmeYtiHXoY6BWf2IkbwW0xKwuotiMonIpoZe y6eSOIMIv2nWsmljcCX8XPk+jTd9C8LLDpX1RLS9KeJLMxa4tyOELA6jOzsbsp2IaSsf IkK/JJzc/q+eX1TdCtWhK0PLb5UDeR/W65aUJGPaTMjFyEPn+tlfrK9goIo2GNSQXyaG CvYUdz728thzK4foeO8o6ow+DLYKr5ZL00pzAUcIQ4f4AFLI6koeMXXMOoUnxKqcOlNm b5n4Yi7m3nz4OBTJRb3MmSMNaGD/WoBnL38xwtwxVZH0Hdz23FjDslbwbqaSdPCW77B8 Dxjw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533MwOh27L9E3AFNnrPEnbj1BcZiCPLKSlyuJUzoIL1HFSr2BeB7 02tc9k58DcaH/8m7lULbRlg= X-Google-Smtp-Source: ABdhPJx2fihq0j2Vw28QTmls95XP8nPIcVKV1kfADLFbb9KmZ2dyQqS0R2EYslTrKFW9R98M1AiMrQ== X-Received: by 2002:a05:6830:244e:: with SMTP id x14mr21697033otr.225.1642652323508; Wed, 19 Jan 2022 20:18:43 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:bca:: with SMTP id 68ls1325203oth.8.gmail; Wed, 19 Jan 2022 20:18:41 -0800 (PST) X-Received: by 2002:a05:6830:318b:: with SMTP id p11mr26586813ots.129.1642652321226; Wed, 19 Jan 2022 20:18:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642652321; cv=none; d=google.com; s=arc-20160816; b=uYr2xXAAcAvXuff5qfJXand+BDzc4jlisgBzmXnlZ2k+bx7vjdVzs9UyfiqFuaWy+z xD+JeUSHwTZmLC4NCkvtwMzUrC3wHewXBRIT8vGqKHD2s7ZDqcLwYO2VvJwtreZRh3KP cxBDwC3eClO5fgqcfpfM7zT0NcLOKDqClN6J96+1H3SEsDpxpXK+XXzPnCJIweUAyO/9 YV52wMgRcRA6mGjoMt8XAoYMpPjKJToa1oNRleILLWr1PG4tQe9Sd5aR/XMxVFBFt6hc 5AupVKnlN8AJLNkrHJ0wWOYn9rlrTI3y2jL+RtX2UB3pKQee6sXfeZ9HYdYpZ5DPd9aD oPZw== 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=q0OibB9UraoerbxiP4agMz4xTdZZtsPZ3594tPafVg4=; b=S9c6uccA/+3wh5eg6CRX6AA7dXVQcNOJ4oT8+TdptnCh479IGISC6H4ZtpWMIoBiBT lQBp8I2Q943RX79jRZlq/HfP3LkVIRkwYfTMMIP9G6oV/gAxYkeGr1L/eNAIqT+N57aE GaV+UNZkq4DyCYJ5Hjdfz381wT0OhrMFA58OO77Gk4msH81fxL1sUvHsPa8Bo9FPWwMe K69ttVZqx29V6Wj7sLPHByHGYb7SMASboZjwhzYfqETaJg4Q/NTHMVNSUnAgc08EJcDD bBDECBmzP46Rwi562kof6eTXQdAFrP8/AjDQmLEhvChFDQx7Ztgyl8TspD8vxGAejZsR GozA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="a3+11t/a"; spf=pass (google.com: domain of navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b2c 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-xb2c.google.com (mail-yb1-xb2c.google.com. [2607:f8b0:4864:20::b2c]) by gmr-mx.google.com with ESMTPS id bf14si208765oib.0.2022.01.19.20.18.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jan 2022 20:18:41 -0800 (PST) Received-SPF: pass (google.com: domain of navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b2c as permitted sender) client-ip=2607:f8b0:4864:20::b2c; Original-Received: by mail-yb1-xb2c.google.com with SMTP id h14so13989555ybe.12 for ; Wed, 19 Jan 2022 20:18:41 -0800 (PST) X-Received: by 2002:a5b:790:: with SMTP id b16mr32751866ybq.74.1642652320845; Wed, 19 Jan 2022 20:18:40 -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="a3+11t/a"; spf=pass (google.com: domain of navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b2c 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:30013 Archived-At: --00000000000012d7d505d5fbcc24 Content-Type: text/plain; charset="UTF-8" @BPJ I tried out you code snippet as lua filter and it works! Thank you so much. Would it be possible to add this filter to the list of Pandoc filters and what would be the process to contribute? I do intend to keep this evolving while I learn Lua. On Thu, Jan 20, 2022 at 8:53 AM Nandakumar Chandrasekhar < navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > 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_pKthL%3D%2BXH6FA9gBE_rFCRdMxE3tLDPUtcbjKRVtdU7g%40mail.gmail.com. --00000000000012d7d505d5fbcc24 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
@BPJ I tried out you code snippet as lua filter and it wor= ks!

Thank you so much.

Would it be possible to ad= d this filter to the list of Pandoc filters and what would be the process t= o contribute? I do intend to keep this evolving while I learn Lua.

On = Thu, Jan 20, 2022 at 8:53 AM Nandakumar Chandrasekhar <navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Thanks fo= r the code snippet=C2=A0@BPJ.

I do not have too much exp= erience building my own Pandoc filter but definitely a way forward and a re= ason 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 st= yles but you can use a Lua filter to replace Pandoc's Strong elements w= ith Span elements with a custom named style.

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

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

Den ons 19 j= an. 2022 06:00Nandakumar Chandrasekhar <navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Dear Folks,

I am converting a markdown document to DOCX using a customized refe= rence doc initially procured from Pandoc according to the documentation her= e.

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

However, I do not see. a way of= setting all bolded text in paragraphs and bulleted lists to semibold.
<= br>
It looks like I need to set the=C2=A0strong style to semibold to achieve this but Pandoc does not supp= ort styling that element as far as I can tell.

Are there any workaro= unds available are will this feature be supported in the future?=C2=A0

I would prefer to not have to do any manual post-proce= ssing after Pandoc generates the document.

Tha= nks 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://gro= ups.google.com/d/msgid/pandoc-discuss/CAMhuDe_pKthL%3D%2BXH6FA9gBE_rFCRdMxE= 3tLDPUtcbjKRVtdU7g%40mail.gmail.com.
--00000000000012d7d505d5fbcc24--