Writing a Mathematical Equation on Your Blog

In fact it is quite rare for a blog writer to put some mathematical models on the blog unless it is an article related to some very professional courses. However, low propability can hardly mean never happen. Taking myself for example, I would like to post some of my notes on econometrics and my feeling of research proposal with the blog readers, though I can write them with a Latex system and then compile it to a PDF document, providing it as an attachment for download. While I don’t think most readers would prefer such behavior. Reading that directly can be a much more pleasant experience, especially when there is not many complicated equations.

Thanks to the flexibility of the WordPress system and its countless expanded plug-ins, the solution for this can be quite simple. The only thing you are willing to do is to be familiar with the LaTex syntax, which, under most occasions, would not be a big problem for most users who are willing to do so. Even though you are unlikely to type the raw code, Mathtype can help you transfer the equation. The only work thus left for you is copy and paste.

Taking a search at WordPress.org, with the keyword of ‘latex’, you are likely to find the following plug-ins.

  1. Some Plug-ins for WordPress

    Among the plug-ins that are available, I made an attempt for the following ones on my blog. Here is a summary about each of them. For details, you can refer to their websites.

    1. WP Latex

      This is an official plug-ins for Latex from WordPress.com, with its default service based on wordpress.com. No cache is needed. You can freely change its style through the css file in settings. The only problem is that its original server ‘s.wordpress.com’ is forbidden in China, you have to change it to ‘wordpress.com’ to make it work. Besides, you can also set up your own service, but I wonder if it can violate the regulation from the host.

    2. Easy Latex

      Comparing to the official plug-ins, this one offer more flexible features. Besides the colors, you can also freely change its size directly through its GUI. Cache option is provided so that the readers can stil read the equations on your blog even when the latex service is out of work.

    3. Youngwhan’s Simple Latex

      This is the simplest plug-ins for use among the three. No other option is presented besides the address of the latex service. The service for this plugin, unlike WP Latex and Easy Latex, is provided by some open source project. Though it is convenient to set up, its flexibility is a question.

  2. My Choice

    I finally choose the official plug-ins with the consideration of the limitation of file numbers on my server. And there is no free CGI support. Which means, I can hardly construct my own system and can hardly bear too many cache files. For those whose server can support CGI, a self-constructed system should be preferred considering its stability.

  3. An Example

    As a final, I shall present an example. This is a measurement of likelihood that is common to see in econometrics.

    [latex size=2]{{R}^{2}}=\frac{SSE}{SST}=\frac{{{\left( \sum\limits_{i=1}^{n}{\left( {{y}_{i}}-\bar{y} \right)\left( {{{\hat{y}}}_{i}}-\bar{\hat{y}} \right)} \right)}^{2}}}{\left( \sum\limits_{i=1}^{n}{{{\left( {{y}_{i}}-\bar{y} \right)}^{2}}} \right)\left( \sum\limits_{i=1}^{n}{{{\left( {{{\hat{y}}}_{i}}-\bar{\hat{y}} \right)}^{2}}} \right)}[/latex]

    Where [latex]y[/latex] stands for the real value and [latex]\hat{y}[/latex] stands for the estimated value from a regression model like:

    [latex]y=\alpha_0+\alpha_1*x_1+\alpha_2*x_2+\alpha_3*x_3+\cdots+\alpha_n*x_n, n\in {{Z}^{+}}[/latex]

    The only problem left here is: how to adjust the alignments? I want them to be centered, but not left-aligned.

Happy Teacher’s Day: A Belated Wish

It has been approximately 20 years since my first step into the kindergarten as a young student, and many teachers have come and go, who taught me piles of knowledge, ranging from elementary ABCs to advanced skills, from fundamentally ethical principles to professional trainings. It is the teachers that bring me to my present situation. Thanks for their kindness and hard-working. Wish they happy Teacher’s Day!

Some teachers in my primary school, among the ones that taught me, changed my life greatly. The first one is an old math teacher, Mr.Zhou, who was the headmaster of my primary school. It is him that draw me the interest on mathematics. It is the old time when the Olympic Contest on Mathematics are still for interesting and involves no commence, which differs from that of today. I did participate some contests but gained nothing. The only thing i get is the experience on exams. I don’t know why there are so many parents and children are mad to this contest, and spending great money on that. In my opinion, mathematics can, and only can be depended on interest, but not on training. 

And, Ms Luo and Mr.Xu, my headteacher in primary school, also bring me great influence on my education. Unlike who I am today that seems to be more bright, I was only a shamed boy in primary school that don’t speak much to others. Mr.Xu paid much attention on my diet and study during her spare time, and, it was her that firstly taught me how to husk the apple. Meanwhile, I got adequate scold as well due to my dishonesty, which follows the nature of the boys. But Mr.Xu apparently taught me on how to be a man, to be encouraged and bright.  But unfortunately I have lost the contact to him.

Mr. Liu, a computer teacher in Children’s Palace of Jinchang Distinct, brought me the very first touch to the computer in 1996, when computer in China is still quite a precious toy. Occasionally I got a recommendation from my primary school that promoted my first education on computer, though the skills that I learned is quite rough, nothing except typing English letters. While it is the typing skills that learned when I was a boy that bring me great convenience today, such as taking online tests of GRE and TOEFL as well as writing papers and programs. Later I got the training on fundamental theories, operating system, word processing and data management from him and obtained my first certificate of computer skills in 1997, when I graduated from primary school. But I can hardly contact to him as well.

In my past study of years, I came across great number of good teachers including my present professor, but it is all these teachers in my primary school changed my life greatly. I appreciate the kindness and honesty of my teachers heartedly. As a final of this post, wish all the teachers, no matter if you are mine or not, a happy Teachers’ Day!

Junjun's Home