Open RevanthRameshkumar opened 4 years ago
Fixed my adding
<!-- Mathjax Support -->
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
to head.html. But is there a fix via jekyll-spaceship so that I don't have to manually edit the themes when switching?
Hi @RevanthRameshkumar
Actually, the single dollar sign is used for inline expression. You could try to put the matrix expression inside double dollar signs, as below:
$$ \begin{bmatrix}a & b \\ c & d\end{bmatrix} $$
Thanks and regards.
Hi @RevanthRameshkumar
For better settling this issue, could I know where you put the Matrix expression in, .html
file or .markdown
file?
Thanks and regards
Hi @RevanthRameshkumar
This is caused by rendering \\
as \
by default in markdown parser. And \
is an escape character commonly used across many programming languages.
You could use a \
before every actual \
you want to use. So if you wanted \begin{bmatrix}
you would have to write \\begin{bmatrix}
and if you want \\
you need to use \\\\
.
$ \\begin{bmatrix}a & b \\\\ c & d\\end{bmatrix} $
Thanks and regards
Thanks for the response! Hi, tried the $$ but that straight up doesn't render anything. I put it in the markdown file under a draft post. Since I was able to fix this by putting mathjax in the head html (and then I had no need to add \ escape or use $$), is there a way the plugin itself could do that process?
Hi @RevanthRameshkumar
Thanks for your issue, now I am perfecting the mathjax-processor
for using the math expression without \
escape easily.
Thanks and regards
Thanks! Looking forward to using this.
Hi @RevanthRameshkumar
🎉 The latest gem version v0.9.6 has been released. This version has fixed the issue. Welcome to update to this version.
Thanks and regards
Hi thanks!
So I deleted my changes in the html file and this works:
$\begin{pmatrix}a & b \\ c & d\end{pmatrix}$
but this does not:
$$
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
$$
Am I doing something wrong in the second case? To add more detail, if I put the mathjax script back in the html file then the double $$ also works.
Hi @RevanthRameshkumar
$\begin{pmatrix}a & b \\ c & d\end{pmatrix}$
and
$$
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
$$
Above math experssions were normally rendered as below in my side:
Could you provider furthermore information for your enviroment? Or whether I could get your project code for better debugging?
Thanks and regards
Hi what info do you need? I can give you the gemfile?
I'm using minima 2.5.0 and here is the project code (the template is just the base minima, no changes other than that head html change that I reverted) https://github.com/RevanthRameshkumar/gwurdblog
Hi @RevanthRameshkumar
It is better for me that you provider me a minimal project on this issue.
Thanks and regards
Hi @RevanthRameshkumar
I have cloned and built the site with your repositoy code
and it rendered normally as below:
Here is your repository:
I'm using minima 2.5.0 and here is the project code (the template is just the base minima, no changes other than that head html change that I reverted) https://github.com/RevanthRameshkumar/gwurdblog
Thanks and regards
Weird, maybe it my jekyll version. Which are you using?
I tried in the exact spot as you above and it is not rendering (but no error in the shell either, so I'm assuming it is due to some versioning issue). Here is the contents of my local gemfile:
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 3.8.5"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem 'jekyll-spaceship', "~> 0.9.6"
gem 'jekyll-sitemap'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?
Hi @RevanthRameshkumar
You can use below command to check all the gems version:
bundle install
Here is mine:
❯ bundle install
Using concurrent-ruby 1.1.7
Using i18n 0.9.5
Using multi_json 1.15.0
Using activesupport 3.2.22.5
Using public_suffix 3.1.1
Using addressable 2.7.0
Using bundler 2.1.4
Using coffee-script-source 1.11.1
Using execjs 2.7.0
Using coffee-script 2.4.1
Using colorator 1.1.0
Using ruby-enum 0.8.0
Using commonmarker 0.17.13
Using unf_ext 0.0.7.7
Using unf 0.1.4
Using simpleidn 0.1.1
Using dnsruby 1.61.5
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.2
Using ffi 1.13.1
Using ethon 0.12.0
Using multipart-post 2.1.1
Using ruby2_keywords 0.0.2
Using faraday 1.1.0
Using forwardable-extended 2.6.0
Using gemoji 3.0.1
Using sawyer 0.8.2
Using octokit 4.19.0
Using typhoeus 1.4.0
Using github-pages-health-check 1.16.1
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using sass-listen 4.0.0
Using sass 3.7.4
Using jekyll-sass-converter 1.5.2
Using listen 3.3.3
Using jekyll-watch 2.2.1
Using rexml 3.2.4
Using kramdown 2.3.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 3.23.0
Using safe_yaml 1.0.5
Using jekyll 3.9.0
Using jekyll-avatar 0.7.0
Using jekyll-coffeescript 1.1.1
Using jekyll-commonmark 1.3.1
Using jekyll-commonmark-ghpages 0.1.6
Using jekyll-default-layout 0.1.4
Using jekyll-feed 0.15.1
Using jekyll-gist 1.5.0
Using jekyll-github-metadata 2.13.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.10
Using html-pipeline 2.14.0
Using jekyll-mentions 1.6.0
Using jekyll-optional-front-matter 0.3.2
Using jekyll-paginate 1.1.0
Using jekyll-readme-index 0.3.0
Using jekyll-redirect-from 0.16.0
Using jekyll-relative-links 0.6.1
Using rubyzip 2.3.0
Using jekyll-remote-theme 0.4.2
Using jekyll-seo-tag 2.6.1
Using jekyll-sitemap 1.4.0
Using jekyll-swiss 1.0.0
Using jekyll-theme-architect 0.1.1
Using jekyll-theme-cayman 0.1.1
Using jekyll-theme-dinky 0.1.1
Using jekyll-theme-hacker 0.1.2
Using jekyll-theme-leap-day 0.1.1
Using jekyll-theme-merlot 0.1.1
Using jekyll-theme-midnight 0.1.1
Using jekyll-theme-minimal 0.1.1
Using jekyll-theme-modernist 0.1.1
Using jekyll-theme-primer 0.5.4
Using jekyll-theme-slate 0.1.1
Using jekyll-theme-tactile 0.1.1
Using jekyll-theme-time-machine 0.1.1
Using jekyll-titles-from-headings 0.5.3
Using jemoji 0.12.0
Using kramdown-parser-gfm 1.1.0
Using minima 2.5.1
Using unicode-display_width 1.7.0
Using terminal-table 1.8.0
Using github-pages 209
Using rainbow 3.0.0
Using jekyll-spaceship 0.9.6
Bundle complete! 5 Gemfile dependencies, 90 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Thanks and regards
Thanks! Here is mine
Using concurrent-ruby 1.1.4
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.10
Using public_suffix 2.0.5
Using addressable 2.5.2
Using bundler 2.0.0
Using coffee-script-source 1.11.1
Using execjs 2.7.0
Using coffee-script 2.4.1
Using colorator 1.1.0
Using ruby-enum 0.7.2
Using commonmarker 0.17.13
Using dnsruby 1.61.2
Using eventmachine 1.2.7 (x64-mingw32)
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using ffi 1.9.25 (x64-mingw32)
Using ethon 0.11.0
Using multipart-post 2.0.0
Using faraday 0.15.4
Using forwardable-extended 2.6.0
Using gemoji 3.0.0
Using sawyer 0.8.1
Using octokit 4.13.0
Using typhoeus 1.3.1
Using github-pages-health-check 1.8.1
Using rb-fsevent 0.10.3
Using rb-inotify 0.10.0
Using sass-listen 4.0.0
Using sass 3.7.2
Using jekyll-sass-converter 1.5.2
Using ruby_dep 1.5.0
Using listen 3.1.5
Using jekyll-watch 2.1.2
Using kramdown 1.17.0
Using liquid 4.0.0
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 2.2.1
Using safe_yaml 1.0.4
Using jekyll 3.7.4
Using jekyll-avatar 0.6.0
Using jekyll-coffeescript 1.1.1
Using jekyll-commonmark 1.2.0
Using jekyll-commonmark-ghpages 0.1.5
Using jekyll-default-layout 0.1.4
Using jekyll-feed 0.11.0
Using jekyll-gist 1.5.0
Using jekyll-github-metadata 2.9.4
Using mini_portile2 2.4.0
Using nokogiri 1.9.1 (x64-mingw32)
Using html-pipeline 2.9.1
Using jekyll-mentions 1.4.1
Using jekyll-optional-front-matter 0.3.0
Using jekyll-paginate 1.1.0
Using jekyll-readme-index 0.2.0
Using jekyll-redirect-from 0.14.0
Using jekyll-relative-links 0.5.3
Using rubyzip 1.2.2
Using jekyll-remote-theme 0.3.1
Using jekyll-seo-tag 2.5.0
Using jekyll-sitemap 1.2.0
Using jekyll-swiss 0.4.0
Using jekyll-theme-architect 0.1.1
Using jekyll-theme-cayman 0.1.1
Using jekyll-theme-dinky 0.1.1
Using jekyll-theme-hacker 0.1.1
Using jekyll-theme-leap-day 0.1.1
Using jekyll-theme-merlot 0.1.1
Using jekyll-theme-midnight 0.1.1
Using jekyll-theme-minimal 0.1.1
Using jekyll-theme-modernist 0.1.1
Using jekyll-theme-primer 0.5.3
Using jekyll-theme-slate 0.1.1
Using jekyll-theme-tactile 0.1.1
Using jekyll-theme-time-machine 0.1.1
Using jekyll-titles-from-headings 0.5.1
Using jemoji 0.10.1
Using minima 2.5.0
Using unicode-display_width 1.4.0
Using terminal-table 1.8.0
Using github-pages 193
Using rainbow 3.0.0
Using jekyll-spaceship 0.9.6
Using tzinfo-data 1.2018.7
Using wdm 0.1.1
Interestingly when I upgraded to minima 2.5.1 (which forced a kramdown upgrade), now it renders like this:
Using concurrent-ruby 1.1.7
Using i18n 0.9.5
Using multi_json 1.15.0
Using activesupport 3.2.22.5
Using public_suffix 3.1.1
Using addressable 2.7.0
Using bundler 2.0.0
Using coffee-script-source 1.11.1
Using execjs 2.7.0
Using coffee-script 2.4.1
Using colorator 1.1.0
Using ruby-enum 0.8.0
Using commonmarker 0.17.13
Using unf_ext 0.0.7.7 (x64-mingw32)
Using unf 0.1.4
Using simpleidn 0.1.1
Using dnsruby 1.61.5
Using eventmachine 1.2.7 (x64-mingw32)
Using http_parser.rb 0.6.0
Using em-websocket 0.5.2
Using ffi 1.13.1 (x64-mingw32)
Using ethon 0.12.0
Using multipart-post 2.1.1
Using ruby2_keywords 0.0.2
Using faraday 1.1.0
Using forwardable-extended 2.6.0
Using gemoji 3.0.1
Using sawyer 0.8.2
Using octokit 4.19.0
Using typhoeus 1.4.0
Using github-pages-health-check 1.16.1
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using sass-listen 4.0.0
Using sass 3.7.4
Using jekyll-sass-converter 1.5.2
Using listen 3.3.3
Using jekyll-watch 2.2.1
Using rexml 3.2.4
Using kramdown 2.3.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 3.23.0
Using safe_yaml 1.0.5
Using jekyll 3.9.0
Using jekyll-avatar 0.7.0
Using jekyll-coffeescript 1.1.1
Using jekyll-commonmark 1.3.1
Using jekyll-commonmark-ghpages 0.1.6
Using jekyll-default-layout 0.1.4
Using jekyll-feed 0.15.1
Using jekyll-gist 1.5.0
Using jekyll-github-metadata 2.13.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.10 (x64-mingw32)
Using html-pipeline 2.14.0
Using jekyll-mentions 1.6.0
Using jekyll-optional-front-matter 0.3.2
Using jekyll-paginate 1.1.0
Using jekyll-readme-index 0.3.0
Using jekyll-redirect-from 0.16.0
Using jekyll-relative-links 0.6.1
Using rubyzip 2.3.0
Using jekyll-remote-theme 0.4.2
Using jekyll-seo-tag 2.6.1
Using jekyll-sitemap 1.4.0
Using jekyll-swiss 1.0.0
Using jekyll-theme-architect 0.1.1
Using jekyll-theme-cayman 0.1.1
Using jekyll-theme-dinky 0.1.1
Using jekyll-theme-hacker 0.1.2
Using jekyll-theme-leap-day 0.1.1
Using jekyll-theme-merlot 0.1.1
Using jekyll-theme-midnight 0.1.1
Using jekyll-theme-minimal 0.1.1
Using jekyll-theme-modernist 0.1.1
Using jekyll-theme-primer 0.5.4
Using jekyll-theme-slate 0.1.1
Using jekyll-theme-tactile 0.1.1
Using jekyll-theme-time-machine 0.1.1
Using jekyll-titles-from-headings 0.5.3
Using jemoji 0.12.0
Using kramdown-parser-gfm 1.1.0
Using minima 2.5.1
Using unicode-display_width 1.7.0
Using terminal-table 1.8.0
Using github-pages 209
Using rainbow 3.0.0
Using jekyll-spaceship 0.9.6
Using tzinfo 2.0.3
Using tzinfo-data 1.2020.4
Using wdm 0.1.1
Bundle complete! 7 Gemfile dependencies, 93 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Hi @RevanthRameshkumar
According to your description, I also updated the minima
to v2.5.1 and the kramdown
to v2.3.0. And the mathjax expressions are still rendered normally. Your issue was weird totally.
Could you provider your operating system enviroment, mine is Manjaro (Arch Linux).
Thanks and regards
Mine is windows 10. This is insane, but I found that this makes it render properly:
$$
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
$$
$
$
Pure luck I found this solution...I think what might be happening is that the single completed $ invokes the import of the mathjax package or something? Here is my latest bundle install output:
Using concurrent-ruby 1.1.7
Using i18n 0.9.5
Using multi_json 1.15.0
Using activesupport 3.2.22.5
Using public_suffix 3.1.1
Using addressable 2.7.0
Using bundler 2.0.0
Using coffee-script-source 1.11.1
Using execjs 2.7.0
Using coffee-script 2.4.1
Using colorator 1.1.0
Using ruby-enum 0.8.0
Using commonmarker 0.17.13
Using unf_ext 0.0.7.7 (x64-mingw32)
Using unf 0.1.4
Using simpleidn 0.1.1
Using dnsruby 1.61.5
Using eventmachine 1.2.7 (x64-mingw32)
Using http_parser.rb 0.6.0
Using em-websocket 0.5.2
Using ffi 1.13.1 (x64-mingw32)
Using ethon 0.12.0
Using multipart-post 2.1.1
Using ruby2_keywords 0.0.2
Using faraday 1.1.0
Using forwardable-extended 2.6.0
Using gemoji 3.0.1
Using sawyer 0.8.2
Using octokit 4.19.0
Using typhoeus 1.4.0
Using github-pages-health-check 1.16.1
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using sass-listen 4.0.0
Using sass 3.7.4
Using jekyll-sass-converter 1.5.2
Using listen 3.3.3
Using jekyll-watch 2.2.1
Using rexml 3.2.4
Using kramdown 2.3.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 3.23.0
Using safe_yaml 1.0.5
Using jekyll 3.9.0
Using jekyll-avatar 0.7.0
Using jekyll-coffeescript 1.1.1
Using jekyll-commonmark 1.3.1
Using jekyll-commonmark-ghpages 0.1.6
Using jekyll-default-layout 0.1.4
Using jekyll-feed 0.15.1
Using jekyll-gist 1.5.0
Using jekyll-github-metadata 2.13.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.10 (x64-mingw32)
Using html-pipeline 2.14.0
Using jekyll-mentions 1.6.0
Using jekyll-optional-front-matter 0.3.2
Using jekyll-paginate 1.1.0
Using jekyll-readme-index 0.3.0
Using jekyll-redirect-from 0.16.0
Using jekyll-relative-links 0.6.1
Using rubyzip 2.3.0
Using jekyll-remote-theme 0.4.2
Using jekyll-seo-tag 2.6.1
Using jekyll-sitemap 1.4.0
Using jekyll-swiss 1.0.0
Using jekyll-theme-architect 0.1.1
Using jekyll-theme-cayman 0.1.1
Using jekyll-theme-dinky 0.1.1
Using jekyll-theme-hacker 0.1.2
Using jekyll-theme-leap-day 0.1.1
Using jekyll-theme-merlot 0.1.1
Using jekyll-theme-midnight 0.1.1
Using jekyll-theme-minimal 0.1.1
Using jekyll-theme-modernist 0.1.1
Using jekyll-theme-primer 0.5.4
Using jekyll-theme-slate 0.1.1
Using jekyll-theme-tactile 0.1.1
Using jekyll-theme-time-machine 0.1.1
Using jekyll-titles-from-headings 0.5.3
Using jemoji 0.12.0
Using kramdown-parser-gfm 1.1.0
Using minima 2.5.1
Using unicode-display_width 1.7.0
Using terminal-table 1.8.0
Using github-pages 209
Using rainbow 3.0.0
Using jekyll-spaceship 0.9.6
Using tzinfo 2.0.3
Using tzinfo-data 1.2020.4
Using wdm 0.1.1
Bundle complete! 8 Gemfile dependencies, 93 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
I have 0 experience with Ruby though, so maybe there is some simple string parsing that I'm missing here :D
Hi @RevanthRameshkumar
Yes, I think there is something wrong in your enviroment, you can have a checking carefully. Hope you can settle down this issue and any issue welcome to reply here.
Thanks and regards
Mine is windows 10. This is insane, but I found that this makes it render properly:
$$ \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$ $ $
Pure luck I found this solution...I think what might be happening is that the single completed $ invokes the import of the mathjax package or something?
I'm having the exact same issue. When using the default config, where optimize
has enabled: true
for MathJax, the processor is only called on pages containing pairs of $
(inline). If I disable optimization or add a pair of $
, the processor gets called. For me it only recognizes pairs of $
, but not of $$
.
@woodenbell,
Like this? I didn't see an optimize field already in my config so I added one under the mathjax processor and it did not fix it
jekyll-spaceship:
# default enabled processors
processors:
- table-processor
- mathjax-processor
- plantuml-processor
- mermaid-processor
- polyfill-processor
- media-processor
- emoji-processor
- element-processor
mathjax-processor:
src:
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
config:
tex:
inlineMath:
- ['$','$']
- ['\(','\)']
svg:
fontCache: 'global'
optimize:
enable: false
Mine is windows 10. This is insane, but I found that this makes it render properly:
$$ \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$ $ $
Pure luck I found this solution...I think what might be happening is that the single completed $ invokes the import of the mathjax package or something?
I'm having the exact same issue. When using the default config, where
optimize
hasenabled: true
for MathJax, the processor is only called on pages containing pairs of$
(inline). If I disable optimization or add a pair of$
, the processor gets called. For me it only recognizes pairs of$
, but not of$$
.
Hi @woodenbell
Could you upload your code for me to address the issue?
Thanks and regards
@jeffreytse Here it is. Awesome package btw!
Yeah I'll say as well @jeffreytse, amazing package :D
Hi @woodenbell
I think this is a new bug, could you create a new issue and move this to there? It's better for us and other users to tracking this issue.
Thanks and regards.
Hi @RevanthRameshkumar
🎉 Thank you for you kindly support to this plugin. And I'm so happy to heard this comment 😃. Currently the discussion above has been moved to the (#36), any furthermore information you can get from there.
Thanks and regards
Hi @RevanthRameshkumar
🎉 The latest gem version v0.9.7 has been released. This version has fixed some issues. Welcome to update to this version.
Thanks and regards
Thanks I'll try it out!
<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
@jeffreytse - you are my own personal hero. The best. The very best. I've been trying to figure out for ages why this happened. Thank you so much for posting this.
@grantcurell Thanks for the support : )
Hi, not sure if this is a jeykll-spaceship bug or other...
$\begin{bmatrix}a & b \\ c & d\end{bmatrix}$
That should give 2 rows of matrix, but right now only registering as one big row. I think it is because something is interfering with the \.