From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30617 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Shane Liesegang Newsgroups: gmane.text.pandoc Subject: Re: Manually apply styles to output docx? Date: Wed, 25 May 2022 13:18:49 -0700 (PDT) Message-ID: <68b882c7-aeb6-47dc-9308-2d1054fdc119n@googlegroups.com> References: <2a9a59ee-359b-4670-a140-234fb4c52311n@googlegroups.com> <3b8d1a41518f4384a6087ac54b826b3c@unibe.ch> <56357d0c-ae70-44bc-8e53-25c686fa73f0n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1378_115898659.1653509929461" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35896"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC2OTJELV4GRBKU6XKKAMGQEJV7PJDY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed May 25 22:18:54 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 1ntxT3-00097u-OA for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 25 May 2022 22:18:53 +0200 Original-Received: by mail-ot1-f63.google.com with SMTP id 104-20020a9d0bf1000000b0060aee3fc1a9sf5462034oth.19 for ; Wed, 25 May 2022 13:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=phC0x9UFVaK7QXFas1DgMjurZfrVm7Z+eXMCig3uUhs=; b=qZc0+6S1rJZk6JSl7Vq6qdWdmwKpbikGuUPGONCfskZJ5jf5/Y5bKQPaGFiM/ZHKhr w78hCctqUIm5qL4yycaieo0bPbTuc0ocIyzuG6TSFV5/7+++8m8dnkxeF/mx3aemBCC1 XYyUIOqQ8fXJeq3CbD0jeK0dVAGqgwR1lMxsUDevNq+9nGHpF7HvK8NTaVEcvEAGh2HB CnXWG3G0glRcaUvm8YFzpf1ZqPx8qh7F+f4y+kxy9U8YdpJujugSySmV0WCj1PptjXAP 7pMhp1Ql97qL0W60XTW5knFPtZAf8IdCCo4Ggrx/4Y/7Rz0ThQIGYPUcJkbXvf5nfsAE SNaQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=phC0x9UFVaK7QXFas1DgMjurZfrVm7Z+eXMCig3uUhs=; b=bjvmzbzM2GzY5afCV03dlDtKGns0Lciug4ZLX5ZH3JaEX63nUGzFucw2YpKbCgfh2p y9Ula7yCZyAEJS+02ej+4apt4dCBmRKw9/b7aBChmpIzKgQByohRprbCMDmbYLkVnraO qKEjDOgXfzQZaDTd7JlgSortNom6tzFjShahaPQV07pc82Tm0tVjI9hhiWSXRCZjWh/q KD+QGTXcggeWU2XE/zx8RyV6sdTHxwLVMZtCBB9MQIfTCY/T8DLVGADOXtVuEFshKBn/ nUtuvtvXwEuhxjdag6V093+ZbJvpj754JdNTiI5gcwcV0l7jHaeh+XYhVEPMHg2YKD0Y X1Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=phC0x9UFVaK7QXFas1DgMjurZfrVm7Z+eXMCig3uUhs=; b=n5id4JtaDENOL3QCZ3teZDX862Gego1a1tdcLNfR2astD2JwONecGrhus3m3tAaJH9 PNfiMginVsPdXVm/a8vvOETbzxWZzLTrjTBAkZNGBvMejZ5HadFOPiw/7PoYk5ALr+XH X8TtwVTb0uUXkm4ezpGZMFsDi9AJqs1ELrtRbO3w3iPyP4VNihPZtv3Av4nYXxYu2vGo RIB3U57ItB4CDkpsmOaNevGV0h1Y0JPbkb+B7BH4xJhi+Y6nlCO9oD8XQgy0EXmig7xY cCwmQjlB52ieOtkRJdlhHIYSuht7ir2AXrVvsqX++nEuvGVdGOYx28DmzaY3HyHXGvmx jfcQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533F1SrpF7HYwRrHyY9RO/KQfZr6TUntdfHmp9osAulkc14R8TUW OQSy0H58Sx2pRj+T+s+2Ga8= X-Google-Smtp-Source: ABdhPJwHYhv/FxVHEO8AQyctj+cSl7/UN6VVdhijf2McoybFOGaRFd+eCEIwK5dPSlwjHhFs1L+Eaw== X-Received: by 2002:a9d:69d7:0:b0:60b:cee:4cd0 with SMTP id v23-20020a9d69d7000000b0060b0cee4cd0mr7307246oto.145.1653509932692; Wed, 25 May 2022 13:18:52 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:1885:b0:326:a83a:293c with SMTP id bi5-20020a056808188500b00326a83a293cls8124727oib.3.gmail; Wed, 25 May 2022 13:18:50 -0700 (PDT) X-Received: by 2002:aca:1e16:0:b0:2ef:4b94:2cda with SMTP id m22-20020aca1e16000000b002ef4b942cdamr6013157oic.149.1653509930105; Wed, 25 May 2022 13:18:50 -0700 (PDT) In-Reply-To: <56357d0c-ae70-44bc-8e53-25c686fa73f0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: liesegang-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:30617 Archived-At: ------=_Part_1378_115898659.1653509929461 Content-Type: multipart/alternative; boundary="----=_Part_1379_128919299.1653509929461" ------=_Part_1379_128919299.1653509929461 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable After a bunch of investigation, I wanted to post what I figured out in case= =20 someone else comes across this.=20 Pandoc will happily apply a custom style on whatever span or div you tell= =20 it to, but in this case the built-in "Strong" style is for a paragraph, not= =20 a character. Since I was trying to apply it to a span, Pandoc made a new=20 style for characters, and then incremented the name so it wouldn't clash=20 with the existing paragraph one.=20 The same thing happens in reverse, if you try to apply a character style to= =20 a div.=20 It makes sense once you understand it, but was definitely confusing to try= =20 and figure out. Maybe worth adding some admonitions in the document, but I= =20 know it's not meant as a tutorial for the docx format.=20 On Thursday, May 19, 2022 at 6:33:53 AM UTC+3 Shane Liesegang wrote: > That was my understanding of that line in the documentation, too. But I'm= =20 > not sure if my understanding is wrong (and I can't do this), or if the=20 > documentation is wrong (and the current behavior is intended), or if the= =20 > current behavior is wrong (and it's a bug).=20 > > On Monday, May 16, 2022 at 12:43:11 PM UTC+3 denis...-NSENcxR/0n0@public.gmane.org wrote: > >> I would have expected the same given the documentation says =C2=ABFor do= cx=20 >> output, styles will be defined in the output file as inheriting from nor= mal=20 >> text, if the styles are not yet in your reference.docx. If they are alre= ady=20 >> defined, pandoc will not alter the definition.=C2=BB=20 >> >> =20 >> >> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 >> Auftrag von *Shane Liesegang >> *Gesendet:* Sonntag, 15. Mai 2022 14:28 >> *An:* pandoc-discuss >> *Betreff:* Manually apply styles to output docx? >> >> =20 >> >> I've customized a reference.docx file for applying styles to an exported= =20 >> Word document, and am attempting to follow the instructions from the Cus= tom=20 >> Styles section of the=20 >> manual. If I'm reading the documentation right (and I may not be!) if I= =20 >> attempt to apply a custom style that is already defined in the reference= =20 >> document, it will not redefine it but apply the existing style.=20 >> >> =20 >> >> However, when I do something like this in markdown+bracketed_spans:=20 >> >> =20 >> >> [my strong text]{custom-style=3D"Strong"} >> >> =20 >> >> And there is already a "Strong" style in the reference file, I find the= =20 >> span instead has a new style applied to it called "Strong1".=20 >> >> =20 >> >> Is there any way I can manually apply styles to Markdown text for docx= =20 >> output?=20 >> >> =20 >> >> Thanks for any help / letting me know where I misunderstand.=20 >> >> --=20 >> You received this message because you are subscribed to the Google Group= s=20 >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n=20 >> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/2a9a59ee-359b-4670-a140= -234fb4c52311n%40googlegroups.com=20 >> >> . >> > --=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/68b882c7-aeb6-47dc-9308-2d1054fdc119n%40googlegroups.com. ------=_Part_1379_128919299.1653509929461 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
After a bunch of investigation, I wanted to post what I figured out in= case someone else comes across this.

Pandoc = will happily apply a custom style on whatever span or div you tell it to, b= ut in this case the built-in "Strong" style is for a paragraph, not a chara= cter. Since I was trying to apply it to a span, Pandoc made a new style for= characters, and then incremented the name so it wouldn't clash with the ex= isting paragraph one.

The same thing happens = in reverse, if you try to apply a character style to a div.
=
It makes sense once you understand it, but was definitely co= nfusing to try and figure out. Maybe worth adding some admonitions in the d= ocument, but I know it's not meant as a tutorial for the docx format.
<= /div>
On T= hursday, May 19, 2022 at 6:33:53 AM UTC+3 Shane Liesegang wrote:
=
That was my understandi= ng of that line in the documentation, too. But I'm not sure if my under= standing is wrong (and I can't do this), or if the documentation is wro= ng (and the current behavior is intended), or if the current behavior is wr= ong (and it's a bug).

On Monday, May 16, 2022 at 12:43:11 PM UTC+3 denis...-NSENcxR/0n0@public.gmane.org wrote:

I would have expected the same given the docum= entation says =C2=ABFor docx output, styles will be defined in the o= utput file as inheriting from normal text, if the styles are not yet in you= r reference.docx. If they are already defined, pandoc will not alter the definition.=C2=BB <= span>

=C2=A0

Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von Shane Liesegang
Gesendet: Sonntag, 15. Mai 2022 14:28
An: pandoc-discuss <pandoc-...@googlegroups.c= om>
Betreff: Manually apply styles to output docx?
<= /p>

=C2=A0

I've customized a reference.docx file for applying styles to an = exported Word document, and am attempting to follow the instructions from t= he Custom S= tyles section of the manual. If I'm reading the documentation right= (and I may not be!) if I attempt to apply a custom style that is already d= efined in the reference document, it will not redefine it but apply the existing style.

=C2=A0

However, when I do something like this in markdown+b= racketed_spans:

=C2=A0

= [my strong text]{custom-style=3D"Strong"}

=C2=A0

And there is already a "Strong" style in t= he reference file, I find the span instead has a new style applied to it ca= lled "Strong1".

=C2=A0

Is there any way I can manually apply styles to Mark= down text for docx output?

=C2=A0

Thanks for any help / letting me know where I misund= erstand.

--
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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2a9a59ee-359b-4670-a140-23= 4fb4c52311n%40googlegroups.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://groups.google.com/d= /msgid/pandoc-discuss/68b882c7-aeb6-47dc-9308-2d1054fdc119n%40googlegroups.= com.
------=_Part_1379_128919299.1653509929461-- ------=_Part_1378_115898659.1653509929461--