Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to preview Markdown+LaTex on github?

  1. Add file _config.yml with the following two lines:
theme: jekyll-theme-cayman
markdown: kramdown
  1. On top of the Markdown file, add the following lines:
<head>
    <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
    <script type="text/x-mathjax-config">
        MathJax.Hub.Config({
            tex2jax: {
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
            inlineMath: [['$','$']]
            }
        });
    </script>
</head>
  1. Preview by VS Code plugin "Markdown Preview Enhanced" by clicking Ctrl+Shift+V
  2. Right click the preview page, Select HTML -> HTML (cdn hosted) to generate HTML file in current path.
  3. git push Markdown file, _config.yml and HTML file to github.
  4. Preview HTML through htmlpreview.github.io https://htmlpreview.github.io/?<github HTML file path> e.g. https://htmlpreview.github.io/?https://github.com/yanghuafang/markdowns/blob/master/vector-rotation.html

About

Markdown Documents.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages