public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Katex
@ 2020-09-03 20:15 MyriaCore
  2020-09-03 20:34 ` Katex MyriaCore
  0 siblings, 1 reply; 5+ messages in thread
From: MyriaCore @ 2020-09-03 20:15 UTC (permalink / raw)
  To: pandoc-discuss


[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-04  1:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 20:15 Katex MyriaCore
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

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).