Skip to content

Commit 73dab44

Browse files
committed
fixed latex post
1 parent 7b647a5 commit 73dab44

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
I"j{"source"=>"/media/user/Storage-Fast/Research/code/github-website/src", "destination"=>"/media/user/Storage-Fast/Research/code/github-website/src/_site", "collections_dir"=>"collections", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}, "projects"=>{"output"=>true}, "blog"=>{"output"=>true}, "travel"=>{"output"=>true}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-seo-tag", "jekyll-paginate"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num/", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "title"=>"RCmags", "author"=>"Mags", "email"=>"[email protected]", "description"=>"Projects and other things", "paginate"=>6, "github_username"=>"RCmags", "youtube_username"=>"XXXmags", "rcgroups_username_id"=>"189488", "google_analytics"=>true, "minima"=>{"date_format"=>"%-d %b, %Y"}, "header_pages"=>["home.html", "about.md", "travel.html", "blog.html", "projects.html", "search.html"], "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET
1+
I"�{"source"=>"/media/user/Storage-Fast/Research/code/github-website/src", "destination"=>"/media/user/Storage-Fast/Research/code/github-website/src/_site", "collections_dir"=>"collections", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}, "projects"=>{"output"=>true}, "blog"=>{"output"=>true}, "travel"=>{"output"=>true}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-seo-tag", "jekyll-paginate"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num/", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false, "syntax_highlighter"=>"rouge", "syntax_highlighter_opts"=>{:default_lang=>"plaintext", :guess_lang=>true}, "coderay"=>{}}, "title"=>"RCmags", "author"=>"Mags", "email"=>"[email protected]", "description"=>"Projects and other things", "paginate"=>6, "github_username"=>"RCmags", "youtube_username"=>"XXXmags", "rcgroups_username_id"=>"189488", "google_analytics"=>true, "minima"=>{"date_format"=>"%-d %b, %Y"}, "header_pages"=>["home.html", "about.md", "travel.html", "blog.html", "projects.html", "search.html"], "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET
File renamed without changes.

collections/blog/Computers/_posts/2024-10-13-adding-latex-jekyll.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,15 @@ This process was straightforward, and much to my surprise, it worked flawlessly.
4949
<br>
5050
Once I placed _all_ the KaTeX files in this specific structure, the LaTeX began to render correctly. According to the code, you can use different tags to adjust the CSS style of the equations. When the display is set to **false**, the equation will be centered on the page. Here’s an example using the `\\[ \\]` tags:
5151

52-
`\\[ I_e = \int_{0}^t{(K_{p}e(t) - K_{c}{I_e})dt} \\]`
52+
\\[ I_e = \int_{0}^t{(K_{p}e(t) - K_{c}{I_e})dt} \\]
5353

54-
And here’s the same example using the `\\( \\)` tags: `\\( I_e = \int_{0}^t{(K_{p}e(t) - K_{c}{I_e})dt} \\)`
54+
And here’s the same example using the `\\( \\)` tags: \\( I_e = \int_{0}^t{(K_{p}e(t) - K_{c}{I_e})dt} \\)
5555

5656
You can also create more complex equations by simply modifying the underlying LaTeX code. Check out the **[LaTeX Cheatsheet](https://quickref.me/latex)** for an overview of different LaTeX expressions:
5757

58-
```
59-
\\[ f\relax(x) = \int_{-\infty}^\infty
60-
f\hat\xi\,e^{2 \pi i \xi x}
61-
\,d\xi
62-
\\]
63-
```
58+
\\[ \cfrac{1}{\sqrt{2}+\cfrac{1}{\sqrt{2}+\cfrac{1}{\sqrt{2}+\dotsb}}} \\]
59+
6460
With just a few changes to the `<head>` tag of my Jekyll site, I was able to render elegant equations quickly. This solution is both simple and effective, and I want to commend the developers who made this system possible. Well done!
61+
62+
# Important!
63+
If the latex is not written properly or contains new lines, it can **break** [lunr.js](https://lunrjs.com/) and ruin your website's search function. If for some reason your search stops working, carefully check any LaTex you have added to your markdown posts.

0 commit comments

Comments
 (0)