public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: MyriaCore <me-iMRNxolsNr8QFTY0IWPKwg@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Katex
Date: Thu, 3 Sep 2020 13:15:19 -0700 (PDT)	[thread overview]
Message-ID: <a228855b-e00e-48f0-8bfb-768ce2199b29n@googlegroups.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2706 bytes --]



Hi all!

I’m really struggling setting up gitlab ci/cd 
<https://gitlab.com/myriacore/gitlab-markdown-ci> to render with my notes. 
Everything works perfectly when I generate the html locally on my laptop, 
but the gitlab runner / pages copy seems to have perpetual issues that my 
laptop really doesn’t seem to have. 

The bug I’m experiencing is that my math is displaying *twice* - once in a 
semi-formatted way, and again beneath it, without any coherent formatting 
whatsoever:

When I took a peek into the head, I saw that katex’s scripts and styles 
*did* seem to be present, but for whatever reason, they don’t seem to be 
running. In my local copy, I have fonts and styles associated with the 
katex-html element that just aren’t even there with the katex-html one 
served up by gitlab pages. 

This is the command I’m using:

    pandoc --from markdown --to html5 \
        --self-contained --standalone \
        --filter pandoc-plantuml \
        --filter pandoc-mermaid \
        --lua-filter gitlab-math.lua \
        --lua-filter fix-links.lua \
        --katex=https://cdn.jsdelivr.net/npm/katex@latest/dist/ \
        --template=GitHub.html5  \
        $(MARKDOWN)

I’m not sure why this is happening on the runner, and not on my laptop. 
This is something that I’d really like to have working by the end of the 
week. 

It’s clear things aren’t being incorrectly parsed (for example, by some of 
the wonky filters 
<https://gist.github.com/MyriaCore/75729707404cba1c0de89cc03b7a6adf> I’ve 
setup), since the raw test output appears to be doing things correctly. For 
example, this:

{{m+n} \choose m } = \frac{(m+n)!}{m!n!}

… is translated into this, when output to stdout:

<p><span class="math display">\[{{m+n} \choose m } = \frac{(m+n)!}{m!n!}\]</span></p>

The only big difference that I’ve been able to spot is that on the pages 
copy, when viewed through a web browser, there seems to be a weird 
classless span between the math display span and the katex-display span. 
Maybe this is preventing the script from recognizing the katex structures? 
Either way, I have no clue how to prevent this from happening, or why it’s 
even happening at all.

Any insight? Thanks so much!

-- 
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/a228855b-e00e-48f0-8bfb-768ce2199b29n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 12271 bytes --]

             reply	other threads:[~2020-09-03 20:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 20:15 MyriaCore [this message]
2020-09-03 20:34 ` Katex MyriaCore
     [not found]   ` <3fea3a24-cdff-41a0-9c3e-ffcfadaff90en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-03 20:49     ` Katex MyriaCore
     [not found]       ` <0e1b938d-3665-4be2-9681-c835d596aba2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-03 21:03         ` Katex MyriaCore
     [not found]           ` <ba631a7b-0fc3-4964-846b-2583a707c850n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-04  1:34             ` Katex John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a228855b-e00e-48f0-8bfb-768ce2199b29n@googlegroups.com \
    --to=me-imrnxolsnr8qfty0iwpkwg@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).