From a5fa7ddc0ea08d517c4a767ceaa1df6ccc4d721c Mon Sep 17 00:00:00 2001 From: Yan Wang Date: Wed, 9 Oct 2013 03:36:08 +0000 Subject: [PATCH] revised the latex plugin so that it will work in both http and https protocols --- latex/latex.py | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/latex/latex.py b/latex/latex.py index 37ddee4..902dd51 100644 --- a/latex/latex.py +++ b/latex/latex.py @@ -11,21 +11,28 @@ writing equations in by using `\begin{equation}`...`\end{equation}`. from pelican import signals +# Reference about dynamic loading of MathJax can be found at http://docs.mathjax.org/en/latest/dynamic.html +# The https cdn address can be found at http://www.mathjax.org/resources/faqs/#problem-https latexScript = """ - """ @@ -44,5 +51,5 @@ def register(): """ Plugin registration """ - signals.article_generator_context.connect(addLatex) - signals.page_generator_context.connect(addLatex) + signals.article_generate_context.connect(addLatex) + signals.pages_generate_context.connect(addLatex)