From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32853 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: How to prevent CSS from being embedded? Date: Tue, 20 Jun 2023 18:27:03 -0700 Message-ID: <7D726040-F99B-44F5-A9CD-B256F4BD1AE5@gmail.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_C2695107-4081-4FF4-A772-220FF7C67A58" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2709"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBB5NDZGSAMGQEPQKWDWY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 21 03:27:22 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pl1-f188.google.com ([209.85.214.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qBmd0-0000RL-03 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 21 Jun 2023 03:27:22 +0200 Original-Received: by mail-pl1-f188.google.com with SMTP id d9443c01a7336-1b508a0873esf28618075ad.3 for ; Tue, 20 Jun 2023 18:27:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687310840; cv=pass; d=google.com; s=arc-20160816; b=q55iMu6PvOdJKCw81mrUv2OyHi6/mWImSyIQTMXYlLpe0ki7DXxB4kbI1i0PH5StDJ RjC1LUi3Aie1XspMKaiLfiArZP8yIvaNvaJ2UzED8lDdItLjMr2mhFOphMkn3T7jCq0T +kOgpipa0NdfvRWMQQrVE9EKjyMErTxRPmY87Nj1Ea8SxcTulafoRUhWj/naXAbKqptc pIFoQHeAz1QlyStwx7FpkvPl+PZeSffZy+7eRHdh1Q79ukIYdipPiqI7t3/c+/EfXJ5u 8DexM668gDPFjlDEwbez/MS5x1H2WsqR1j2JQ8NcKxBnHEKkw6B6snYM+8F/ouLjLxFx Mzwg== 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:message-id:in-reply-to:to :references:date:subject:mime-version:from:sender:dkim-signature :dkim-signature; bh=f9goZmODLvpRFZPBWByk23occ9RKl4t/aMw1zH7L50k=; b=Ox5s4PHxIu5PYa/dmM2PyGzUJPEhOMKa8MF7qM5L9C+lRtDpIW9MwjrGFYbjf5w2n2 n1TkkBF22ev/cXCUEsm05GUlVGPHNdH/3LkGt4B8DdPotsT0dIxo4tf6OGptmJmuwvZG pxjSfDV+HknMP8oj1TZwdv0EkDevi86UtiqRJuIQYZJkayAhyrQgnf7JWNEixLGAa8+H hK9FcWCN1JXXlibDzk8jGht7yk5rACzNEBjPJhwrrmfRnWG7+dhq/MeExDyoNVHA0wHq QjdzK+VVuGxnTT32tzucovRmid0kfflQcL5/2AYQP/1wpJ9dgZLPb7Z92e8ffP1aajqG MdSQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=NeWY7OXk; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::32c as permitted sender) smtp.mailfrom=fiddlosopher-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=1687310840; x=1689902840; 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:message-id :in-reply-to:to:references:date:subject:mime-version:from:sender :from:to:cc:subject:date:message-id:reply-to; bh=f9goZmODLvpRFZPBWByk23occ9RKl4t/aMw1zH7L50k=; b=Pvh+BbmOR7Nd2RVkwYjtqaTFapnR4xcU/qojRX/Ptee+FHfWteGUlqnWX5BXqSNaRF o9FiyGiAaEdq7qShugTUJZGGVbvMmNeCWnKhMa2cUaAX8/TD7V8JhPj6fRKAixYEox9C Q1rEFP6uDWV/KK+sNHWoEYfVcKmGP0JYARHZGmg2+N0ByqD8GyWp40+OOSjpzwApGEmO fCH7A15a+YdE9qQ4lU2v6DAzRNDb5IRKSCr9S53n/PPNRLFb4iUUUY14LMvfnJzApPCB QyBwpX2815MFEGSOdIWJpCNwGgUu9o6HUvm3nF/f9I+6hCehcPqLMLRYBWfAOgRmK5mX DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687310840; x=1689902840; 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:message-id :in-reply-to:to:references:date:subject:mime-version:from:from:to:cc :subject:date:message-id:reply-to; bh=f9goZmODLvpRFZPBWByk23occ9RKl4t/aMw1zH7L50k=; b=m3UVRyoDn/Cwrkx0wgdiK/nXRlQU4HMDJOAcRKHpJrTB8c3CSodZmctfHtTi/qOORu vpakkBRV7uVTF65IRn5o/8r449oUVLl0HUZGP2+IXUvdy0jt5zHuTFRwsB42lcstffBt JZdrGNFEacg5Bpdk6V3eraG1am3bwOJ3ALtvNqLLyJhZUxQjkmrCYS7Zw3QuGZ7OikOu Zi52S/4igdrXj02CtZJfkCyTBuuueW+Bmj1J3nmdOEvw9twSQ/iWacSwlwcUsWUSNuak QquTjDOeDKhqBkLitGrpUYhr0ogySpEXAozwC94CkYc86FMi0zrmEmJ4gSvOUg0XJ1kR j7Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687310840; x=1689902840; 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:message-id :in-reply-to:to:references:date:subject:mime-version:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=f9goZmODLvpRFZPBWByk23occ9RKl4t/aMw1zH7L50k=; b=f7qPTxNS4yfNxx5Cmm8RWRyeNVfD8J8xiR3mXfFKjIDUcA8UtQifoEpGC5qxpgZ2P3 n4n9XqFWZE7/ZUA5kJFAL0PxD7dgmC99kv7zGNsXLOPUmLYS3Gqf7OxM80krnAEeAI/L Nl1BGfHErw0CGGUtTS3VIgRHWBt3Xl0TE2E08mH2s/OJlf7EKDxJH7/YyTsamBYtmw7F 93b+n/i+Nn5eIHo1+KEJTOcmgwHlb81IM5k8AObbUOcZzXuHE39pTY3y/qasqpJAgo4x wXn6As Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDyAucAgP6vQBB7DcqyuI4LpqmZJyLMQCExLjWB0mo208uMhCMsp 9yYxpemnmvDf0JDyad2/5xM= X-Google-Smtp-Source: ACHHUZ5ES+7DmIxjg2aknOvn+rvSqajgPEcnDiilcWN3tI9jyPy2vO7xG2nZRhmMKpSy1E5NbjQ/rA== X-Received: by 2002:a17:903:11cd:b0:1b3:815b:cf02 with SMTP id q13-20020a17090311cd00b001b3815bcf02mr13626273plh.19.1687310840577; Tue, 20 Jun 2023 18:27:20 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:903:340f:b0:1b0:36bf:b725 with SMTP id ke15-20020a170903340f00b001b036bfb725ls2939411plb.1.-pod-prod-05-us; Tue, 20 Jun 2023 18:27:16 -0700 (PDT) X-Received: by 2002:a05:6a20:6a26:b0:121:f190:e5ba with SMTP id p38-20020a056a206a2600b00121f190e5bamr5568311pzk.16.1687310836882; Tue, 20 Jun 2023 18:27:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687310836; cv=none; d=google.com; s=arc-20160816; b=pyvLrChRumDQhBz+O+QdpsZ4dToYNEu7MbT39FYKHRoTwVFRDvQxQ9otq6MzP0QSFu C7z01Q4K3e1i2E4ApwFVWVWEjs/NzJmavFBQvxKU7Am24AHIxbam/Nx5r0DLSnt6WYMX 3xIdkMg84GMT8FypL5miQBiqhmEA28+Rtau85DEyvqF/SRIjXdn+yglNj0H40TBikG9r a76XuBLqXhcJxe0aFrrx3+oSh4kGA22dS6VHAZI6mB0i0JbvgJYXnF/iLbxVlgdW8p0E qg26yfnmzEvRecUqJ9MoRQMYfJieFaFBXX+uS+UXtWi84BdgbwT0DaugNwIqRRPqrw1I cLKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version:from :dkim-signature; bh=XHzGYDhTCfpej4PrQtOaVVik4lxoTWCUnuApENci0Tc=; b=HiEUI98K2AwD7ecLZtoHx5nfyAmyDTcV10VwNFa9l3yo7JHCmhQhOsq34AX8W/31Hy ZCyAXcAFqYqg4gkQwT1sZZ1C6InTQAcgP0HgInmvuWhTdzEk6fQ2wDGjr/gZ39FmrtKv iMsdOQChIQQLkSBQQJStNGtvB4/yE9pC72yPrhpoyW8aesXkNqj8v6MllKoviUYBlJKe gxStIcLMSmln/HcxDl1/faflpewrYAj5P+0o1ExEGZKRGrwJ4bp0y/kcVRTnyEIV0BnP 4Y/eqTNenafBAnlrpPe/BlxvbIajl1j1U4S5Y+Gb4UFZ4LJlTDsLL5zr3A+fL4Wmsf5L IrdQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=NeWY7OXk; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::32c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com. [2607:f8b0:4864:20::32c]) by gmr-mx.google.com with ESMTPS id u6-20020a17090341c600b001ab1f250b2fsi184209ple.1.2023.06.20.18.27.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jun 2023 18:27:16 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::32c as permitted sender) client-ip=2607:f8b0:4864:20::32c; Original-Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6b2e1023f30so4581839a34.1 for ; Tue, 20 Jun 2023 18:27:16 -0700 (PDT) X-Received: by 2002:a05:6358:cc24:b0:130:df0e:6502 with SMTP id gx36-20020a056358cc2400b00130df0e6502mr5601102rwb.32.1687310835283; Tue, 20 Jun 2023 18:27:15 -0700 (PDT) Original-Received: from smtpclient.apple ([2607:f140:4208:8000:c0c3:d9be:1085:b5b]) by smtp.gmail.com with ESMTPSA id x19-20020aa793b3000000b0065da94fe917sm1852867pff.36.2023.06.20.18.27.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2023 18:27:14 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3731.600.7) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=NeWY7OXk; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::32c as permitted sender) smtp.mailfrom=fiddlosopher-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:32853 Archived-At: --Apple-Mail=_C2695107-4081-4FF4-A772-220FF7C67A58 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Does adding data-external=3D"1" to your tag for the stylesheet do th= e trick? If it's true, though, that browsers can't handle data URIs in the ta= g, then we should change how pandoc embeds stylesheets. I hadn't heard tha= t before. It would be worth putting up an issue on the tracker. > 7@gmail.com> wrote: >=20 > Hello. > I am using pandoc to convert some markdown study notes to html. > The final html is hosted on GitHub pages so that I can access it from any= where. > Becuase my notes contain images, I have to use the=20 > --embed-resources option with pandoc in order for the html to display cor= rectly. >=20 > The problem arises when I went to add CSS to style the notes. > I have found many css sheets to style the html. (https://markdowncss.gith= ub.io/) >=20 > However, because of the --embed-sources pandoc encodes the CSS as base 64= and somehow the CSS in the rendered HTML does not render on any browsers. > I know the raw CSS itself works because I manually added the CSS to the h= tml and it formats the page properly. >=20 > I feel that if I can prevent the CSS from being encoded (even when using = the --embed- resources option) and preserve it as a link to an external css= , my page should display properly.=20 > I have searched for possible solutions and some posts suggest using a=20 > data-external=3D"1" flag to prevent a source from being embedded. >=20 > See here: https://github.com/jgm/pandoc/issues/8362#issuecomment-12726128= 51 >=20 > But that describes how to do it for mathjax, not css.=20 > Could someone show me an example of how to do the same thing for css? >=20 > Thank you! >=20 >=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= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/CAPfJ9TiL1sEvMaMOa_Z1UVW_u6%3DDz8xZOMaN_vqw36SP%2BA1EzQ%40= mail.gmail.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/7D726040-F99B-44F5-A9CD-B256F4BD1AE5%40gmail.com. --Apple-Mail=_C2695107-4081-4FF4-A772-220FF7C67A58 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="UTF-8" Does adding data-external=3D"1= " to your <link> tag for the stylesheet do the trick?

If it's true, though, that browsers can't handle data URIs in the &= lt;link> tag, then we should change how pandoc embeds stylesheets.  = ;I hadn't heard that before.  It would be worth putting up an issue on= the tracker.


7@gmail.com&= gt; wrote:

Hello.
I am using pandoc to convert some markdown stud= y notes to html.
The final html is hosted on GitHub = pages so that I can access it from anywhere.
Becuase= my notes contain images, I have to use the 
--= embed-resources option with pandoc in order for the html to display correct= ly.

The problem arises w= hen I went to add CSS to style the notes.
I have fou= nd many css sheets to style the html. (https://markdowncss.github.io/)

However, because of the --embed-sources pandoc encodes t= he CSS as base 64 and somehow the CSS in the rendered HTML does not render = on any browsers.
I know the raw CSS itself works bec= ause I manually added the CSS to the html and it formats the page properly.=

I feel that if I can pr= event the CSS from being encoded (even when using the --embed- resources op= tion) and preserve it as a link to an external css, my page should display = properly. 
I have searched for possible solutio= ns and some posts suggest using a 
data-externa= l=3D"1" flag to prevent a source from being embedded.


But that describes how to do it for mathjax, not css.&nb= sp;
Could someone show me an example of how to do th= e same thing for css?

Th= ank you!


--
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 pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https:/= /groups.google.com/d/msgid/pandoc-discuss/CAPfJ9TiL1sEvMaMOa_Z1UVW_u6%3DDz8= xZOMaN_vqw36SP%2BA1EzQ%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://groups.google.com/d/msgid/p= andoc-discuss/7D726040-F99B-44F5-A9CD-B256F4BD1AE5%40gmail.com.
--Apple-Mail=_C2695107-4081-4FF4-A772-220FF7C67A58--