Feynman Liang A personal blog on technical topics. 2023-01-06T23:47:47Z http://localhost/ Rewrote blog with lume... nice! 2023-01-06T21:43:42Z http://localhost/posts/rewrote-blog-lume/ <p>In honor of 2022's front-end web trends of eschewing everything old from SPAs to React to even Node itself, I got my feet wet by rebuilding this blog with <a href="https://lume.land/">Lume</a>.</p> Prime and Maximal Ideals 2018-08-27T01:21:50Z http://localhost/posts/prime-maximal-ideals/ <p>Consider the natural numbers $\mathbb{N}$ and order them by divisibility: $a \leq b$ whenever $b$ divides $a$. For example if I give you the set of numbers $${6,12,18,24,30}$$ Then the &quot;largest&quot; number in terms of divisibility is $6$.</p> Noetherian modules and a short exact sequence for quotients 2018-07-29T22:04:38Z http://localhost/posts/noetherian-modules-and-ses-for-quotients/ <p>Equivalent characterizations of the Noetherian condition are plentiful (see <a href="http://localhost/posts/hilbert-basis-theorem.md">Hilbert's Basis Theorem</a> for more) and using them interchangably can be a convenient and succinct way to express proofs. In this post, we explore yet another characterization of Noetherian conditions and bring attention to an important short exact sequence related to quotient constructions which helps clarify why this condition should hold.</p> Hilbert's Basis Theorem 2018-07-05T23:24:42Z http://localhost/posts/hilbert-basis-theorem/ <p>Ambitious goals seem to pop up whenever I have free time, but I have a poor track record of hitting them. To fill the extra time I have over the summer, I started reading <a href="https://www.springer.com/us/book/9780387942681">Eisenbud's Commutative Algebra texbook</a> as a side project. Let's hope I get far enough to learn something useful.</p> <p>In this post, I want to write a bit about a result known as Hilbert's Basis Theorem (HBT). We'll motivate why we should care about it through a use case prevalent in algebraic geometry.</p> MathJax and Syntax Highlighting on Ghost 2013-10-26T23:29:39Z http://localhost/posts/mathjax-integration/ <h2>MathML Support (MathJax)</h2> <p>Thanks to <a href="http://www.patrickedelman.com/latex-ghost/">Patrick Edelman</a> for the reference!</p> <p>Adding LaTeX to Ghost is very simple. Open up <code>ghost/content/themes/YOUR_THEME_NAME/default.hbs</code>. Before <code>&lt;/body&gt;</code>, insert:</p> <pre><code class="language-js">{{! Mathjax configuration}} &lt;script type=&quot;text/javascript&quot; src=&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/x-mathjax-config&quot;&gt; MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\$','\$']]} }); &lt;/script&gt; </code></pre> <p>Now test it out: <code>$\sum \frac{1}{n} = H\_n$</code> should yield $\sum \frac{1}{n} = H_n$.</p> <p>The configuration is not perfect, however. Action items include:</p> <ul> <li><s>Overridding Markdown parsing for <code>$...$</code> enclosed text. In particular, <code>$\sum_{n=1}^\infty \frac{1}{n} = H_n$</code> fails to render properly because <code>_..._</code> is used by Markdown for italics.</s> <strong>edit</strong>: Thanks to Filip Allberg for helping me figure this out, <em>you need to escape your underscores</em>. $\sum_{n=1}^\infty \frac{1}{n} = H_n$ renders fine if the subscripts are escaped (<code>\_</code> instead of <code>_</code>) like in <code>$\sum\_{n=1}^\infty \frac{1}{n} = H\_n$</code></li> <li><s>Math embedding in live preview. I suspect this is not too difficult.</s> <strong>edit</strong>: I've posted directions on how to do this below.</li> </ul> <h2>Syntax Highlighting</h2> <p>Did you notice that the HTML/JS code block above was syntax colored?? Fortunately, this is super easy to do.</p> <ul> <li>Open <code>ghost/content/themes/YOUR_THEME_NAME/default.hbs</code>.</li> <li>Before <code>&lt;/body&gt;</code>, insert:</li> </ul> <pre><code class="language-html">&lt;script src=&quot;https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js&quot;&gt;&lt;/script&gt; </code></pre> <ul> <li> <p>Specify highlighting and prettyprinting classes using MarkDown:</p> <pre><code> prettyprint lang-python def main(): print( &quot;Finally... technical writing is as easy as %s&quot; % ' '.join(map(lambda x: str(x), range(1,4))))  </code></pre> </li> </ul> <h2>Live Previews</h2> <p><a href="http://blog.peterschmalfeldt.com/adding-syntax-highlighting-to-ghost/">Peter Schmalfeldt</a> wrote a great post on getting syntax highlighting to work in the publisher view as well.</p> <h4>Mathjax Live Preview</h4> <p>I was able to adapt Peter's to enable MathJax live previewing. To do so, edit <code>ghost/core/server/views/default.hbs</code> and before <code>&lt;/body&gt;</code> add</p> <pre><code class="language-javascript">{{! Load and configure mathjax }} &lt;script type=&quot;text/javascript&quot; src=&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/x-mathjax-config&quot;&gt; MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\$','\$']]} }); &lt;/script&gt; {{! Re-render MathJax in live preview}} &lt;script&gt; var timeout, entry = document.getElementsByClassName('entry-markdown'); function mathjaxify() { var preview = document.getElementsByClassName('rendered-markdown'); if (typeof(typeset) == &quot;undefined&quot; || typeset == true) { MathJax.Hub.Queue([&quot;Typeset&quot;, MathJax.Hub, preview]); // renders mathjax if 'typeset' is true (or undefined) typesetStubbornMath(); } // Render the bits of math that have inexplicably still failed to render, while // leaving the rest alone. (If you try to typeset the whole page, it will break // other things) function typesetStubbornMath() { $(&quot;.MathJax_Preview&quot;).each( function() { if($(this).text() != &quot;&quot;) { MathJax.Hub.Queue([&quot;Typeset&quot;, MathJax.Hub, \$(this).attr(&quot;id&quot;)]); } }); } } // Listen for Key Presses if on Editor if(entry) { jQuery(document).keypress(function(event) { clearTimeout(timeout); timeout = setTimeout(mathjaxify, 2001); }); } // Check for Change of Post Selection setTimeout(function(){ jQuery('.content-list-content li').click(function(){ mathjaxify(); }); }, 500); &lt;/script&gt; </code></pre> <p>Enjoy!</p>