<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Статьи</title>
    <description></description>
    <link>/</link>
    <atom:link href="/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sat, 08 Oct 2016 15:15:36 -0400</pubDate>
    <lastBuildDate>Sat, 08 Oct 2016 15:15:36 -0400</lastBuildDate>
    <generator>Jekyll v2.5.3</generator>
    
      <item>
        <title>Edge Cases</title>
        <description>&lt;p&gt;Some edge cases and cautionary examples on using Markdown for writing content using this theme. In particular, list syntax can really knot things up.
&lt;!--more--&gt;&lt;/p&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#mathjax-improperly-parsing-greater-and-less-than-and-ampersands-inside-blocks&quot; id=&quot;markdown-toc-mathjax-improperly-parsing-greater-and-less-than-and-ampersands-inside-blocks&quot;&gt;Mathjax improperly parsing greater and less than and ampersands inside blocks&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#edge-case-1-from-quxiaofeng&quot; id=&quot;markdown-toc-edge-case-1-from-quxiaofeng&quot;&gt;Edge Case 1 from Quxiaofeng:&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#no-blank-lines-between-markdown-list-items&quot; id=&quot;markdown-toc-no-blank-lines-between-markdown-list-items&quot;&gt;No blank lines between Markdown list items&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#related-algorithms&quot; id=&quot;markdown-toc-related-algorithms&quot;&gt;Related algorithms&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#why-this-matters&quot; id=&quot;markdown-toc-why-this-matters&quot;&gt;Why this matters&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#remarks-on-admm-version-2---one-blank-line-between-markdown-list-items&quot; id=&quot;markdown-toc-remarks-on-admm-version-2---one-blank-line-between-markdown-list-items&quot;&gt;Remarks on ADMM version 2 - one blank line between Markdown list items&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#liquid-tag-parsing-strangeness&quot; id=&quot;markdown-toc-liquid-tag-parsing-strangeness&quot;&gt;Liquid tag parsing strangeness&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;mathjax-improperly-parsing-greater-and-less-than-and-ampersands-inside-blocks&quot;&gt;Mathjax improperly parsing greater and less than and ampersands inside blocks&lt;/h3&gt;

&lt;p&gt;The mathjax plugin has been modified to contain all the block style mathjax inside a &lt;code&gt;&amp;lt;div class=&quot;mathblock&quot;&amp;gt;..&amp;lt;/div&amp;gt;&lt;/code&gt; tag wrapper pair
which fixes many of the issues with conflicts with the Kramdown parser. Some examples sent to me by Quxiaofeng are now parsing correctly, I believe.&lt;/p&gt;

&lt;p&gt;This code:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;latex
{% math  %}
  D = \left(\begin{matrix}
  1 &amp;amp; -1 &amp;amp; &amp;amp; &amp;amp; &amp;amp; \\
  &amp;amp;    &amp;amp; \cdots &amp;amp;   &amp;amp; \\
  &amp;amp;    &amp;amp;        &amp;amp; 1 &amp;amp; -1
 \end{matrix}
 \right)
{% endmath %}
&lt;/code&gt;
yields this:&lt;/p&gt;

&lt;div class=&quot;mathblock&quot;&gt;&lt;script type=&quot;math/tex; mode=display&quot;&gt;
D = \left(\begin{matrix}
  1 &amp; -1 &amp; &amp; &amp; &amp; \\
  &amp;    &amp; \cdots &amp;   &amp; \\
  &amp;    &amp;        &amp; 1 &amp; -1
\end{matrix}
\right)
&lt;/script&gt;&lt;/div&gt;

&lt;p&gt;Other examples from the &lt;a href=&quot;http://latex.wikia.com/wiki/Matrix_environments&quot;&gt;wikia Tex reference&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;mathblock&quot;&gt;&lt;script type=&quot;math/tex; mode=display&quot;&gt;
\begin{matrix}
\alpha&amp; \beta^{*}\\
\gamma^{*}&amp; \delta
\end{matrix}
&lt;/script&gt;&lt;/div&gt;

&lt;div class=&quot;mathblock&quot;&gt;&lt;script type=&quot;math/tex; mode=display&quot;&gt;
\begin{bmatrix}
\alpha&amp; \beta^{*}\\
\gamma^{*}&amp; \delta
\end{bmatrix}
&lt;/script&gt;&lt;/div&gt;

&lt;div class=&quot;mathblock&quot;&gt;&lt;script type=&quot;math/tex; mode=display&quot;&gt;
\begin{Bmatrix}
\alpha&amp; \beta^{*}\\
\gamma^{*}&amp; \delta
\end{Bmatrix}
&lt;/script&gt;&lt;/div&gt;

&lt;div class=&quot;mathblock&quot;&gt;&lt;script type=&quot;math/tex; mode=display&quot;&gt;
\begin{vmatrix}
\alpha&amp; \beta^{*}\\
\gamma^{*}&amp; \delta
\end{vmatrix}
&lt;/script&gt;&lt;/div&gt;

&lt;div class=&quot;mathblock&quot;&gt;&lt;script type=&quot;math/tex; mode=display&quot;&gt;
\begin{Vmatrix}
\alpha&amp; \beta^{*}\\
\gamma^{*}&amp; \delta
\end{Vmatrix}
&lt;/script&gt;&lt;/div&gt;

&lt;script type=&quot;math/tex; mode=display&quot;&gt;% &lt;![CDATA[
\begin{Vmatrix}
\alpha&amp; \beta^{*}\\
\gamma^{*}&amp; \delta
\end{Vmatrix} %]]&gt;&lt;/script&gt;

&lt;p&gt;However, a problem still exists for inline matrix notation, from an example &lt;a href=&quot;https://en.wikibooks.org/wiki/LaTeX/Mathematics#Matrices_in_running_text&quot;&gt;here&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;A matrix in text must be set smaller: &lt;script type=&quot;math/tex&quot;&gt;% &lt;![CDATA[
\bigl(\begin{smallmatrix}a &amp; b \\ c &amp; d\end{smallmatrix} \bigr) %]]&gt;&lt;/script&gt; to not increase leading in a portion of text&lt;/p&gt;

&lt;h2 id=&quot;edge-case-1-from-quxiaofeng&quot;&gt;Edge Case 1 from Quxiaofeng:&lt;/h2&gt;

&lt;h3 id=&quot;no-blank-lines-between-markdown-list-items&quot;&gt;No blank lines between Markdown list items&lt;/h3&gt;

&lt;p&gt;The issue arises when sidenotes and marginnotes are put into list items. For example:&lt;/p&gt;

&lt;h3 id=&quot;related-algorithms&quot;&gt;Related algorithms&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Split Bregman iteration &lt;label for=&quot;1&quot; class=&quot;margin-toggle sidenote-number&quot;&gt;&lt;/label&gt;&lt;input type=&quot;checkbox&quot; id=&quot;1&quot; class=&quot;margin-toggle&quot; /&gt;&lt;span class=&quot;sidenote&quot;&gt;Goldstein, T. and Osher, S. (2009). The split Bregman method for l1-regularized problems. SIAM J. Img. Sci., 2:323-343. &lt;/span&gt;&lt;/li&gt;
  &lt;li&gt;Dykstra’s alternating projection algorithm &lt;label for=&quot;2&quot; class=&quot;margin-toggle sidenote-number&quot;&gt;&lt;/label&gt;&lt;input type=&quot;checkbox&quot; id=&quot;2&quot; class=&quot;margin-toggle&quot; /&gt;&lt;span class=&quot;sidenote&quot;&gt;Dykstra, R. L. (1983). An algorithm for restricted least squares regression. J. Amer. Statist. Assoc., 78(384):837-842. &lt;/span&gt;&lt;/li&gt;
  &lt;li&gt;Proximal point algorithm applied to the dual&lt;/li&gt;
  &lt;li&gt;Numerous applications in statistics and machine learning: lasso, gen. lasso, graphical lasso, (overlapping) group lasso, …&lt;/li&gt;
  &lt;li&gt;Embraces distributed computing for big data &lt;label for=&quot;3&quot; class=&quot;margin-toggle sidenote-number&quot;&gt;&lt;/label&gt;&lt;input type=&quot;checkbox&quot; id=&quot;3&quot; class=&quot;margin-toggle&quot; /&gt;&lt;span class=&quot;sidenote&quot;&gt;Boyd, S., Parikh, N., Chu, E., Peleato, B., and Eckstein, J. (2011). Distributed optimization and statistical learning via the alternating direction method of multipliers. Found. Trends Mach. learn., 3(1):1-122. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;why-this-matters&quot;&gt;Why this matters&lt;/h3&gt;

&lt;p&gt;Notice how the sidenotes display properly.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In summary&lt;/em&gt;: Take out any blank lines between your list items.&lt;/p&gt;

&lt;p&gt;Okay, this is a really strange thing about the Jekyll Markdown engine I have never noticed before. If you have a list, and you put a blank line between the items like this:&lt;/p&gt;

&lt;p&gt;```
    + list item 1&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; + list item 2 ```
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It will create an html tag structure like this:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      &lt;p&gt;list item 1&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
      &lt;p&gt;list item 2&lt;/p&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;```
Which &lt;em&gt;totally&lt;/em&gt; goofs up the layout CSS.&lt;/p&gt;

&lt;p&gt;However, if your Markdown is this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
    + list item 1
     + list item 2
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will create a tag structure like this:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;list item 1&lt;/li&gt;
   &lt;li&gt;list item 2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;Here is the same content as above, with a blank line separating the list items. Notice how the sidenotes get squashed into the main content area:&lt;/p&gt;

&lt;h3 id=&quot;remarks-on-admm-version-2---one-blank-line-between-markdown-list-items&quot;&gt;Remarks on ADMM version 2 - one blank line between Markdown list items&lt;/h3&gt;

&lt;p&gt;Related algorithms&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Split Bregman iteration &lt;label for=&quot;1&quot; class=&quot;margin-toggle sidenote-number&quot;&gt;&lt;/label&gt;&lt;input type=&quot;checkbox&quot; id=&quot;1&quot; class=&quot;margin-toggle&quot; /&gt;&lt;span class=&quot;sidenote&quot;&gt;Goldstein, T. and Osher, S. (2009). The split Bregman method for l1-regularized problems. SIAM J. Img. Sci., 2:323-343. &lt;/span&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Dykstra’s alternating projection algorithm &lt;label for=&quot;2&quot; class=&quot;margin-toggle sidenote-number&quot;&gt;&lt;/label&gt;&lt;input type=&quot;checkbox&quot; id=&quot;2&quot; class=&quot;margin-toggle&quot; /&gt;&lt;span class=&quot;sidenote&quot;&gt;Dykstra, R. L. (1983). An algorithm for restricted least squares regression. J. Amer. Statist. Assoc., 78(384):837-842. &lt;/span&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Proximal point algorithm applied to the dual&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Numerous applications in statistics and machine learning: lasso, gen. lasso, graphical lasso, (overlapping) group lasso, …&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;liquid-tag-parsing-strangeness&quot;&gt;Liquid tag parsing strangeness&lt;/h3&gt;

&lt;p&gt;Example of the proper way to write an url inside a Liquid full-width image tag.&lt;/p&gt;

&lt;p&gt;This code: &lt;code&gt;{% fullwidth &quot;assets/img/rhino.png&quot; &quot;Tufte pet rhino (via &amp;lt;a href=\&quot;//www.edwardtufte.com/tufte/\&quot;&amp;gt;Edward Tufte&amp;lt;/a&amp;gt;)&quot;  %}&lt;/code&gt;&lt;/p&gt;

&lt;figure class=&quot;fullwidth&quot;&gt;&lt;img src=&quot;/assets/img/rhino.png&quot; /&gt;&lt;figcaption&gt;Tufte&#39;s pet rhino (via &lt;a href=&quot;//www.edwardtufte.com/tufte/&quot;&gt;Edward Tufte&lt;/a&gt;)&lt;/figcaption&gt;&lt;/figure&gt;
</description>
        <pubDate>Tue, 17 Feb 2015 06:04:01 -0500</pubDate>
        <link>/2015/test</link>
        <guid isPermaLink="true">/2015/test</guid>
        
        
        <category>post</category>
        
      </item>
    
  </channel>
</rss>
