You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			39 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Django/Jinja
		
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Django/Jinja
		
	
 | 
						|
{%- macro mathjax(url="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS_CHTML-full,Safe") -%}
 | 
						|
    <!-- Load mathjax -->
 | 
						|
    <script src="{{url}}"> </script>
 | 
						|
    <!-- MathJax configuration -->
 | 
						|
    <script type="text/x-mathjax-config">
 | 
						|
    init_mathjax = function() {
 | 
						|
        if (window.MathJax) {
 | 
						|
        // MathJax loaded
 | 
						|
            MathJax.Hub.Config({
 | 
						|
                TeX: {
 | 
						|
                    equationNumbers: {
 | 
						|
                    autoNumber: "AMS",
 | 
						|
                    useLabelIds: true
 | 
						|
                    }
 | 
						|
                },
 | 
						|
                tex2jax: {
 | 
						|
                    inlineMath: [ ['$','$'], ["\\(","\\)"] ],
 | 
						|
                    displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
 | 
						|
                    processEscapes: true,
 | 
						|
                    processEnvironments: true
 | 
						|
                },
 | 
						|
                displayAlign: 'center',
 | 
						|
                messageStyle: 'none',
 | 
						|
                CommonHTML: {
 | 
						|
                    linebreaks: {
 | 
						|
                    automatic: true
 | 
						|
                    }
 | 
						|
                }
 | 
						|
            });
 | 
						|
 | 
						|
            MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
 | 
						|
        }
 | 
						|
    }
 | 
						|
    init_mathjax();
 | 
						|
    </script>
 | 
						|
    <!-- End of mathjax configuration -->
 | 
						|
{%- endmacro %}
 |