From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30382 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?SG/DoG5nLcOCbiBMw6o=?= Newsgroups: gmane.text.pandoc Subject: Re: Mathjax and TOC does not work with HTML custom lua writer Date: Thu, 24 Mar 2022 20:26:20 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c3684505dafbd2a0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24493"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pandoc-discuss To: John MacFarlane Original-X-From: pandoc-discuss+bncBD4KLCN4SIGBBZ4L6OIQMGQETEZKOOQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Mar 24 20:26:36 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f58.google.com ([209.85.160.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nXT6S-0006AF-7s for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 24 Mar 2022 20:26:36 +0100 Original-Received: by mail-oa1-f58.google.com with SMTP id 586e51a60fabf-ddaeb6d47esf569696fac.13 for ; Thu, 24 Mar 2022 12:26:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1648149995; cv=pass; d=google.com; s=arc-20160816; b=R31JZVkbwj8dcmAPFbs87KGZhBz+AdGFkjvPktVjT+QomaTrrHzTfjfkizHLoJvz6o GfCyY51ccIWNOh5KO26jf7hdF3UgZYlu5C4+REjlS1fByVmg1/2LoU+tkI3SuZsIKY+c YeYpAMT1KAAKJtFPqZcz4gYL2+9YiJIgJAJ2DeV+RHfq32bkU7XANgV4AhqzECPPVqoF 5kFMjnT3TKSOT9ZXCT8Ic8Y0c8Qj1ARNDmQQ9EgU97WRD/Vo8Tezw24t448k9hnJtV38 u1Aaadb47fsjtqcZAZg6ULSz4CPcrLQMMrXbxT8pcmHhREjb6GKyjulFg8NSK1+s9Ila kjsQ== 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:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=U0M7X2BU+lBhk0bWfxLZdUMlyoUHzzrkCMuEzbzr2TI=; b=ehcpH2PcL+14MdQH5cUF1/quQGo86VFqJ0v6dxVw5IFEBtstQ+AnAks357+bDKsr+S jBfBraHWx4DVBTr7lyaQhP2KQPXrg77PjAC5R4mG5yaQAXgWom6aH2+HRzcm2j9hXay7 4144oO8aLzwa3lUf0Xy8CFwpe6q0QtRiY6Sa6KSXNBc/bKQfXRHsRskqNqxhlHbnwsDQ f+3BvN1Grh+9TlQjOyXJB6C/65gqYTnU67FzPF2YybQRP8qK9S7D4uVqzr6PBwABAYZ2 4+YmX+0tsFnjPZdLr6Q2DBMZNfG2bUzO2XcR81DpjBbiNHFZyFi7znrnGwIioxP5XHxd v9Gw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lPJ3+S0l; spf=pass (google.com: domain of lhoangan.nl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::d2e as permitted sender) smtp.mailfrom=lhoangan.nl-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:cc: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=U0M7X2BU+lBhk0bWfxLZdUMlyoUHzzrkCMuEzbzr2TI=; b=tPsc+z5x21BIEWx5nfAerMUTUCX4D5feOyfwxjiEgxqZDZhYP/vlacHKjTyJoZIRT7 o81HltJ8BNwgFr4ey8+ZQEP95IKEpBTWqkGG+jL7tIE8Ad+unJRXUEFtOU9SaR6YNueT ngAQmDRkf15wbVbRURLJXLifxV9w2uxZKXr8zLWMPbhDkWlVWfYaF1/oU5eZcbQ5/tzS oPzo889dquj5kXX5cYj7yejQQWok0TEVepzAdG19uyqPYtR+RAcnU+uoIUFoV4T9FKyM Qizwh7AcRQ2hrSkNh6SeS85b14nDYm0OfMcaMYaTeeR0yze/kgu75ouRe4yZh/xRA/wm 5R2g== 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 :cc: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=U0M7X2BU+lBhk0bWfxLZdUMlyoUHzzrkCMuEzbzr2TI=; b=SwhGYeWNAOO2ki0Cnr/KnWSOMSMmaCwybazmA9iP3+0Ynni5shw2fUKEOPO0SB3tS4 3pdfzjrDxGyDf58MzwqwzChOttBHbXHZkAQMrvHPkPWaffjSxcNLL1YoUFfA1ulHsXwx h9OXxFCzVJIOfzSkaC0GvzGPt8sWXPcMyuK49nJAm/7V5DQGTD78RG86jUhLaE1ZDYqu JqGjfNWrhAnO2oL1io/O2ILz1HNehwRbyyWKOJ4HV61JWHGOW9v3B6bpu9h9yvDbMq0C ReApcB1pTjfwapXsX3OdlxPIQKs5yQ7U13bnO7BJGnLEski8wxJrRcKKi0+fwfoY3Sco owTg== 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:cc: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=U0M7X2BU+lBhk0bWfxLZdUMlyoUHzzrkCMuEzbzr2TI=; b=xLIMQY+0JVlhMW7awwlY6diXDHOKYVvTGN7JLgjxzAK8VfeRo1PkP148dU9hucUKx1 sIK3m2fzZezCy51k6anBdqSuxnyAdpdKraxju8txPrzBZQ0HpHeyW40tPNbAg7VKe/9X mvursnRhUFdCoys4TaVjn0/efQi6aKCy0k3bdTIR7u0ASg2twAdfes18Xol4uH60quqZ bm12WnJCTUt8S5sdN4kTl1xeclr2UVWrZ3i2nRaNFjiFZMJQ7OcIhp+B5KBYuyRCpGao vKePoPDX3Ey49fHf8IAJi3e95LYZwSM+iAylcXlt424EB5JseO4oKQZQn1qCXKG151mt xUPw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530eya+CbaW5pvI7Hf2338TyHpUunXhNNsnRkldG1eWFJdgJQD+0 YWo9K2pAYzLU/gMEYX+F1Dg= X-Google-Smtp-Source: ABdhPJy5YHRabCw3vbv1wtLsCWmyYldO5PJbhYzBvz+enbEy1RS15NFZCn1ooAsqcJ9d3MTt1n5ZnA== X-Received: by 2002:a05:6808:2083:b0:2da:146e:cb2b with SMTP id s3-20020a056808208300b002da146ecb2bmr3546684oiw.224.1648149993610; Thu, 24 Mar 2022 12:26:33 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:44a3:b0:5cd:a739:e902 with SMTP id r35-20020a05683044a300b005cda739e902ls723917otv.7.gmail; Thu, 24 Mar 2022 12:26:31 -0700 (PDT) X-Received: by 2002:a05:6830:304e:b0:5af:f66a:56ee with SMTP id p14-20020a056830304e00b005aff66a56eemr2892276otr.226.1648149991602; Thu, 24 Mar 2022 12:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648149991; cv=none; d=google.com; s=arc-20160816; b=SgsmLyL2nfyYEyR+QpoJrMd/W0CqBrnmznuEw7sH4p32qEFeQHTZciPQt/SSgsLnY/ GB01fB2Dp0nTxwgud6r5emfP66+zjMdXBB1Hi9SHd5vn1nprSOWEZl3E47UUhVCr5hzh cJ9tIp8aShbBUxInhhz88Q1qJZt1K7w0hSOaWpBym7dv1gzjRX8HEf/DhDmZLMEaw9N3 rueyb84rroxZ8Q06/pfa0JeVx7m/piT1Wb/8xngvBFXXfWTAP77vr+aouV31TnnkzZhi fic2fKDdPVAggN4Zk+XFl+siUnT0V/wgmiZSwjnR8GGCWgJcPPuYc9Rh4NwsRTBRFsqJ Y56A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=pqPrh0z6JRc6fj8+/SvIp4hrqbiym54eQ/yvKRdrnJw=; b=js108sCn5PmDgnmROuHecxiObVdlor8ADvGtoiy1T1kB+0/96rpyv8O1PtIfjlwaco FS/99dfmeQ9PQUX5lEJh2eSAMJ1/bwM/nltvaJ/NcAPMsf8vkC8y+rpP1wSqmWBibwdS eaDS5TcsZc13bX0h/ztDBbkDoudfLeJ2mOlqctQJpAJmtfmSzF2tFYmEwbPDq8bJJrd+ GlPH+2lCdDBSwmsWvV04m4StFM0XCCwVkAhHqNaeu6/o6GMSvp8gJmwW9FCJhFA8fmPZ 6/5yBA0zS0PF+e1NH3E2eJhQ3j/WrLh060szcp3y9QuOvuD/4GI+QxX7Rh2uVlkzSr9a 8i8w== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lPJ3+S0l; spf=pass (google.com: domain of lhoangan.nl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::d2e as permitted sender) smtp.mailfrom=lhoangan.nl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com. [2607:f8b0:4864:20::d2e]) by gmr-mx.google.com with ESMTPS id y19-20020a4ae713000000b003215b384eb1si249184oou.2.2022.03.24.12.26.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Mar 2022 12:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of lhoangan.nl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::d2e as permitted sender) client-ip=2607:f8b0:4864:20::d2e; Original-Received: by mail-io1-xd2e.google.com with SMTP id d62so6543121iog.13 for ; Thu, 24 Mar 2022 12:26:31 -0700 (PDT) X-Received: by 2002:a05:6638:3816:b0:31a:60:22c9 with SMTP id i22-20020a056638381600b0031a006022c9mr3490555jav.146.1648149991220; Thu, 24 Mar 2022 12:26:31 -0700 (PDT) In-Reply-To: X-Original-Sender: Lhoangan.nl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lPJ3+S0l; spf=pass (google.com: domain of lhoangan.nl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::d2e as permitted sender) smtp.mailfrom=lhoangan.nl-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:30382 Archived-At: --000000000000c3684505dafbd2a0 Content-Type: text/plain; charset="UTF-8" Well, I trust in the "that is very similar to that of pandoc's HTML writer". So I was confused when it's not that similar. I actually had to come up with all the elements that I thought could be different and went on to manually check the generated code one by one. Could you elaborate how TOC and Mathjax could be done? On Thu, 24 Mar 2022 at 19:35, John MacFarlane wrote: > > sample.lua is just what it says...an example. > You'll need to construct a TOC manually in Lua if you want one. > And you'll have to modify sample.lua to produce the math output > you want. > > > For small changes a Lua filter is probably what you want. > > AustinLe writes: > > > I was trying to generate the same HTML from Markdown with as one with > `-s > > -t html` using the default `sample.lua` writer and `default.html5` but > > found that the table of contents is missing and math formulas does not > > render correctly. This is the command I was using: > > ``` > > pandoc --standalone --toc --mathjax --citeproc -f markdown > > --template=default.html5 -t sample.lua my-markdown.md -o index.html > > --variable document-css --variable highlighting-css --variable > > displaymath-css --variable csl-css --variable csl-entry-spacing > > ``` > > Pandoc version: > > ``` > >> pandoc -v > > pandoc 2.17.1.1 > > Compiled with pandoc-types 1.22.1, texmath 0.12.4, skylighting 0.12.2, > > citeproc 0.6.0.1, ipynb 0.2 > > User data directory: /share/home/leh/.pandoc > > Copyright (C) 2006-2022 John MacFarlane. Web: https://pandoc.org > > This is free software; see the source for copying conditions. There is no > > warranty, not even for merchantability or fitness for a particular > purpose. > > ``` > > > > -- > > 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/b5250fc3-b431-4d07-9dcb-bb81ca43f825n%40googlegroups.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/CAKY_PKtOFRs085OJCCaAqjHyjo7BPSstUojaxGqE8vC3HFNrhg%40mail.gmail.com. --000000000000c3684505dafbd2a0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Well, I trust in the "that is very similar to that of pandoc's HTML writer". So I was confused when it's not that similar. I actually had to come u= p with all the elements that=C2=A0I thought could be different and went on = to manually check the generated code one by=C2=A0 one.

= =C2=A0Could you elaborate how TOC and Mathjax could be done?=C2=A0

On = Thu, 24 Mar 2022 at 19:35, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:

sample.lua is just what it says...an example.
You'll need to construct a TOC manually in Lua if you want one.
And you'll have to modify sample.lua to produce the math output
you want.


For small changes a Lua filter is probably what you want.

AustinLe <lho= angan.nl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I was trying to generate the same HTML from Markdown with as one with = `-s
> -t html` using the default `sample.lua` writer and `default.html5` but=
> found that the table of contents is missing and math formulas does not=
> render correctly. This is the command I was using:
> ```
> pandoc --standalone --toc --mathjax --citeproc -f markdown
> --template=3Ddefault.html5 -t sample.lua my-markdown.md -o index.html =
> --variable document-css --variable highlighting-css --variable
> displaymath-css --variable csl-css --variable csl-entry-spacing
> ```
> Pandoc version:
> ```
>> pandoc -v
> pandoc 2.17.1.1
> Compiled with pandoc-types 1.22.1, texmath 0.12.4, skylighting 0.12.2,=
> citeproc 0.6.0.1, ipynb 0.2
> User data directory: /share/home/leh/.pandoc
> Copyright (C) 2006-2022 John MacFarlane. Web:=C2=A0 https://pandoc.org > This is free software; see the source for copying conditions. There is= no
> warranty, not even for merchantability or fitness for a particular pur= pose.
> ```
>
> --
> You received this message because you are subscribed to the Google Gro= ups "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.co= m/d/msgid/pandoc-discuss/b5250fc3-b431-4d07-9dcb-bb81ca43f825n%40googlegrou= ps.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/CAKY_PKtOFRs085OJCCaAqjHyjo7BPSstUojaxGqE= 8vC3HFNrhg%40mail.gmail.com.
--000000000000c3684505dafbd2a0--