Blog

  • It is really tough to write everyday

    Although I decided to write everyday, at least twice a week.

    But it is more difficult than I anticipated. Searching for a topic and writing frequently.

    When I start writing, I write in flow. Not much effort is required in writing. It is usually the smooth flow.

    The only problem is that since I know and see too much, I usually stray from the subject.

    So, this week, I arranged an office so that I can work regularly and without disturbance.

    Also I started to upload content on SMA Physics. This is a website I start to make a useful resource for physics teachers and learners. (Will discuss in detail about it later).

    After researching about how to write effectively, I think making an editorial calendar would be useful. Whenever I will find the topic, I will write.

    Also, there is one more issue. I write a lot on physical notebooks (yes they still exist). After completion of the article, I am unable to transfer the article to the computer.

    I think for some of the tasks, I can make an automated script. Or use an OCR to convert the articles into web format to publish.

    But there are lot of shit written in these notepad texts. Which we cannot put online.

  • How to Integrate LaTeX to the Website?

    One of the problem science writers face is to integrate latex with the website.

    WordPress is the most popular CMS, most of the hosting provider support and optimize your website for wordpress. This website is also running on wordpress and hosted on hostinger.

    One of the problem which I faced is to integrate latex code into wordpress. The tool for latex I am using is katex which supported most of the latest functions.

    Although latex can be rendered by Jetpack also, but overall, I dont like to use the Jetpack as I feel it is a overkill for resources. The other problem is that you have to write your latex code in between shortcodes like below.

    $latex.....$

    Other plugins also provide the same shortcode functionality, but I am very much habitual of writing inline equations between adding a dollar sign like below.

    $....$

    Say suppose, I want to write the following line.

    The final value of v is equal to square root of 2

    For Jetpack or some other plugin, I have to write the following code.

    The final value of $latex v$ is equal to $latex \sqrt{2}$

    But I want to write the line like this

    The final value of $v$ is equal to $\sqrt{2}$

    As you see here, whatever math or variable I want to write, I just enclosed them into the dollar sign. See the output for the above line as below.

    “The final value of $v$ is equal to $\sqrt{2}$.”

    As you see how beautiful this is looking. It is a running text, you don’t have to use any shortcode in this.

    For this, I have to add the following code into the header of my website.

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"></script>
    <script>
        document.addEventListener("DOMContentLoaded", function() {
            renderMathInElement(document.body, {
              // customised options
              // • auto-render specific keys, e.g.:
              delimiters: [
                  {left: '$$', right: '$$', display: true},
                  {left: '$', right: '$', display: false},
                  {left: '\\(', right: '\\)', display: false},
                  {left: '\\[', right: '\\]', display: false}
              ],
              // • rendering keys, e.g.:
              throwOnError : false
            });
        });
    </script>

    This will render the equation into the browser. To include the above code in header, either I have to modify my template files or alternately, I have to add this via some plugin which will add this code into header file for the whole website

    I achieved this by using a plugin named WPCode. It is such a nice plugin that I can add anything to the header of my wordpress website. See this testing page for reference. As you can see, now I am able to manage all my latex code very beautifully.

    I will write some other day about the step by step with screenshots.

  • Testing LaTeX

    This page is to try latex code

    This is a latex code written in katex $\frac{2}{4}$

    This is another formula $\sqrt{b^2-4ac}$

    $i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right>$

  • The First Post

    This is the first post after setting this blog.

    I setup the blog multiple times, trying to write regularly. But unfortunately did not getting much time for writing.

    Most of the time, I write about Physics problems, the problems of educators, the tips to students, the tips for business, the recipes etc. I the world of computer, I usually use pen and paper for writing having scores of filled notepads.

    Now, in the world of AI, I am starting writing manually. The problem which I feel is that AI is too intrusive, we need a human dialogue and touch.

    Anyway, every time I promise to myself that I will write regularly, but unable to continue. Now due to demand of some people who are very dear to me, I decided to write regularly.

    At least now, I can write about my ventures, what I started and what was my personal experience about the things which I have done in my life.

    If you reached here, thank you so much for reading and leave some good words so that I will continue writing.

    Thanks again .