📜 ⬆️ ⬇️

How to make friends latex, formulas and Habr?

Good afternoon, dear reader! I recently published two articles on Habré for a short time, and faced the following problem: users repeatedly wrote in comments that mathematical formulas in many browsers and various devices are displayed incorrectly, despite the fact that I added them in the proper way via the icon sigma (LaTex is used as markup). One of the users even had to go to the mobile version of Habr in the Mozilla Firefox browser on iOS to read the formulas! In my first article I promised to solve this problem soon. Now it has come.

image
Figure 1. What should be on the left, and what is displayed on the right.

Obviously, before publishing an article, I check it in preview mode. But my Habr works very stably, everything looks as it should. How to help dear readers and subscribers?

I had a few ideas on how to solve this problem.
')

Solution 1


image
Figure 2. Good old way

Of course, this may seem a bit silly, but the easiest way is to write a formula on a piece of paper, take a picture / scan, crop too much, and add it to the article as an image.

The article will turn out more vintage and will look unusual against the background of other articles. Moreover, you do not need to learn the layout of LaTex. But the problem is that if there are a lot of formulas (sometimes my number has reached 16!), It becomes extremely time-consuming and hemorrhoidal.

Solution 2


Download and install a translation program that will use the full LaTex syntax. There are many of them: TexnicCenter , WinEdit , TextMate , etc.

This is undoubtedly a very good option. The problem is that not all of us have time to study another layout. LaTex is significantly different from the same usual html. Most programs support converting to pdf, so then you will have to take a screenshot or convert to png / jpg / gif and cut off the excess.

Solution 3


image
Figure 3. Perhaps the best option.

No, this is not an advertisement. I recommend this site because I will use it myself in the future. It is all "free, without registration and SMS." Layout is LaTex, but the final images can be downloaded to your device in various formats. Png or gif is supported by any browser and you will not need to learn all the tags, the structure of a LaTex document, etc., and also worry about the correctness of displaying formulas. Use on an intuitive level.

That's all. If you have found any other solutions, I will be glad to read them in the comments! Thank you for reading to the end!

Source: https://habr.com/ru/post/449990/


All Articles