yagarea / jektex

A Jekyll plugin for fast server-side cached LaTeX rendering, with support for macros. Enjoy the comfort of LaTeX and Markdown without cluttering your site with bloated JavaScript.
https://rubygems.org/gems/jektex
GNU General Public License v3.0
24 stars 5 forks source link

Can't build: KaTeX parse error: #6

Closed unennhexium closed 4 months ago

unennhexium commented 4 months ago

When try to bundle exec jekyll serve get the error:

 KaTeX parse error: Expected 'EOF', got '}' at position 32: … display: true }̲,-->
<!--      …
        test.md
             LaTeX: 0 expressions rendered (0 already cached)         
                    done in 0.813 seconds.

The resulting page has an empty <body> </body>. Contents of test.md:

---
layout: page
title: test
---

$$\alpha$$
Tool Version
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]
node v20.11.1
jekyll ~> 3.9.5
unennhexium commented 4 months ago

I was able to solve the problem. It was due to commented lines in my base html template. This was stated in the error message, but I didn't realize it from the beginning. The position points in the wrong direction at all. Is it a line or col number? Perhaps it means a position in an already preprocessed file. Anyway, build works now.