Skip to content

Commit

Permalink
Merge pull request #9 from hdballestan/8-test_math_equations
Browse files Browse the repository at this point in the history
Finally a valid format to add TeX into the posts
  • Loading branch information
hdballestan authored May 14, 2024
2 parents 105bfd5 + 1ab23ce commit fe314c5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ collections:
posts:
output: true
permalink: /:year/:month/:day/:title.html

markdown: kramdown
kramdown:
math_engine: mathjax
1 change: 1 addition & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<head>
{% include mathjax.html %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>{{ page.title }} | {{ site.title }}</title>
Expand Down
17 changes: 17 additions & 0 deletions _includes/mathjax.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "all" },
tagSide: "right"
},
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
}
});
</script>
<script
src="https://cdn.jsdelivr.net/gh/mathjax/MathJax@legacy-v2-develop/unpacked/MathJax.js?config=TeX-AMS_CHTML">
</script>

5 changes: 5 additions & 0 deletions _posts/2020-01-01-sample-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ title: "Statistical mechanics of money, wealth, and income"

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin consequat quam vel augue sollicitudin mollis in quis lorem. Nunc congue risus id lorem accumsan malesuada. Quisque odio velit, faucibus ac urna id, tristique scelerisque elit. Morbi tempor interdum ligula, gravida sagittis purus aliquam non. Vivamus vulputate risus orci, eu dictum lectus consectetur sed. Maecenas tempus ligula eget faucibus tincidunt. Donec imperdiet ut diam nec fermentum. Donec finibus quis orci vitae iaculis. Fusce sed est est. Vivamus augue ligula, lobortis in felis et, gravida tincidunt tellus. Maecenas volutpat ultricies ornare. Aliquam fringilla ex dictum maximus aliquet. Sed et scelerisque diam, quis semper sapien. Maecenas ut ante nunc. Cras in turpis ut orci dignissim facilisis ac eget est. Vestibulum et congue arcu.

$$
\int_{a}^{b} f(x) \, dx = F(b) - F(a)
$$


Donec congue sit amet ligula ut pulvinar. Cras justo urna, congue a elit vel, convallis dictum risus. Sed sed diam interdum, laoreet neque vel, fermentum nisi. Maecenas at nisl purus. Fusce non justo libero. Nam at mauris gravida, interdum massa in, sollicitudin ante. Sed vulputate, augue at facilisis elementum, nunc quam pharetra nibh, sed pretium eros neque facilisis lorem. Cras aliquet leo a tortor molestie, at consectetur ex consectetur. Nullam quis arcu tempus, ornare massa vel, mattis est. Curabitur mattis nulla nec lectus tristique, ac viverra nulla porta. Mauris elementum pretium est, eu ornare lorem scelerisque a. Morbi porta semper ligula eget molestie. Nunc sed faucibus elit. Suspendisse non tempus quam. Vestibulum egestas turpis ut ante gravida, in molestie eros lobortis.

Fusce a hendrerit velit. Duis ultricies purus a eleifend posuere. Nulla non massa eros. Suspendisse facilisis nunc sit amet euismod dictum. Cras faucibus urna et metus commodo ultricies. Proin pharetra, lectus eget ultrices consequat, risus ante dapibus lacus, sed facilisis felis neque ac tellus. Cras vehicula enim id enim faucibus mollis. Mauris turpis ex, laoreet molestie porta elementum, rhoncus a dui. Nunc congue purus et nisl viverra, in volutpat dolor aliquet. Quisque imperdiet a nibh eget rhoncus. Donec facilisis aliquam magna, ac blandit nisl posuere sit amet. Ut congue leo a leo placerat imperdiet. Fusce consectetur magna sem, et iaculis augue facilisis vel. Quisque nec ipsum fermentum, suscipit turpis quis, rutrum massa.
Expand Down

0 comments on commit fe314c5

Please sign in to comment.