{"action":"created","issue":{"url":"https://api.github.com/repos/rujews/maupassant-hugo/issues/21","repository_url":"https://api.github.com/repos/rujews/maupassant-hugo","labels_url":"https://api.github.com/repos/rujews/maupassant-hugo/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/rujews/maupassant-hugo/issues/21/comments","events_url":"https://api.github.com/repos/rujews/maupassant-hugo/issues/21/events","html_url":"https://github.com/rujews/maupassant-hugo/issues/21","id":393990724,"node_id":"MDU6SXNzdWUzOTM5OTA3MjQ=","number":21,"title":"$$Tex code$$, 块内公式换行问题，请问你们是怎样解决的呢？","user":{"login":"zouzhitao","id":24653173,"node_id":"MDQ6VXNlcjI0NjUzMTcz","avatar_url":"https://avatars2.githubusercontent.com/u/24653173?v=4","gravatar_id":"","url":"https://api.github.com/users/zouzhitao","html_url":"https://github.com/zouzhitao","followers_url":"https://api.github.com/users/zouzhitao/followers","following_url":"https://api.github.com/users/zouzhitao/following{/other_user}","gists_url":"https://api.github.com/users/zouzhitao/gists{/gist_id}","starred_url":"https://api.github.com/users/zouzhitao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zouzhitao/subscriptions","organizations_url":"https://api.github.com/users/zouzhitao/orgs","repos_url":"https://api.github.com/users/zouzhitao/repos","events_url":"https://api.github.com/users/zouzhitao/events{/privacy}","received_events_url":"https://api.github.com/users/zouzhitao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-25T09:03:57Z","updated_at":"2018-12-29T05:48:39Z","closed_at":"2018-12-29T05:48:39Z","author_association":"NONE","body":"插入 latex 公式，如果$$Tex code$$ 块内有多行的时候，直接用 `\\\\`  无法显示，请问你们是怎么解决这个问题的呢？\r\n\r\n比如，我插入以下公式\r\n\r\n```\r\n$$\r\n\\begin{align}\r\nE[0] &=\\frac{\\sum_{i=1}^nv_i}{n}\\\\\r\nE[1] &= \\frac{j^2}{n^2}\\frac{\\sum_{k<=j}v_i}{j} + \\frac{(n-j)(n+j)}{n^2}\\frac{\\sum_{i>j}v_i}{n-j}\\\\\r\n&= \\frac{j\\sum_{k<=j}v_i}{n^2}+\\frac{(n+j)\\sum_{i>j}v_i}{n^2}\\\\\r\n&= \\frac{\\sum_{i>j}v_i}{n} + \\frac{j\\sum_iv_i}{n^2}\\\\\r\n&=\\frac{\\sum_{i>j}v_i+jE[0]}{n}\\\\\r\n\\end{align}\r\n$$\r\n```\r\n\r\n然后 无法显示，查看网页源码是,\r\n\r\n```\r\n\r\n<p>$$\r\n   \\begin{align}\r\n   E[0] &amp;=\\frac{\\sum_{i=1}^nv_i}{n}<br />\r\n   E[1] &amp;= \\frac{j^2}{n^2}\\frac{\\sum_{k&lt;=j}v_i}{j} + \\frac{(n-j)(n+j)}{n^2}\\frac{\\sum_{i&gt;j}v_i}{n-j}<br />\r\n   &amp;= \\frac{j\\sum_{k&lt;=j}v<em>i}{n^2}+\\frac{(n+j)\\sum</em>{i&gt;j}v_i}{n^2}<br />\r\n   &amp;= \\frac{\\sum_{i&gt;j}v_i}{n} + \\frac{j\\sum_iv_i}{n^2}<br />\r\n   &amp;=\\frac{\\sum_{i&gt;j}v_i+jE[0]}{n}<br />\r\n   \\end{align}\r\n  $$</p>\r\n```\r\n\r\n后面又换行符但是无法显示换行"},"comment":{"url":"https://api.github.com/repos/rujews/maupassant-hugo/issues/comments/450467904","html_url":"https://github.com/rujews/maupassant-hugo/issues/21#issuecomment-450467904","issue_url":"https://api.github.com/repos/rujews/maupassant-hugo/issues/21","id":450467904,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDQ2NzkwNA==","user":{"login":"zouzhitao","id":24653173,"node_id":"MDQ6VXNlcjI0NjUzMTcz","avatar_url":"https://avatars2.githubusercontent.com/u/24653173?v=4","gravatar_id":"","url":"https://api.github.com/users/zouzhitao","html_url":"https://github.com/zouzhitao","followers_url":"https://api.github.com/users/zouzhitao/followers","following_url":"https://api.github.com/users/zouzhitao/following{/other_user}","gists_url":"https://api.github.com/users/zouzhitao/gists{/gist_id}","starred_url":"https://api.github.com/users/zouzhitao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zouzhitao/subscriptions","organizations_url":"https://api.github.com/users/zouzhitao/orgs","repos_url":"https://api.github.com/users/zouzhitao/repos","events_url":"https://api.github.com/users/zouzhitao/events{/privacy}","received_events_url":"https://api.github.com/users/zouzhitao/received_events","type":"User","site_admin":false},"created_at":"2018-12-29T05:48:39Z","updated_at":"2018-12-29T05:48:39Z","author_association":"NONE","body":"ok 问题已解决 谢谢 @guader @rujews \r\n\r\n**简单总结解决方案:**\r\n\r\n1.  将所有的下标 `_` 用 `\\_` 转义，比如: `\\sum_` - > `\\sum\\_`\r\n2.  将所有的换行 `\\\\` 也用 `\\`转义，注意这里改为 `\\\\\\\\\\\\` 即，6个换行符号 \r\n3.  把 `align` 改为 `align\\*`\r\n\r\n以上解决方案总结自 @guader \r\n"}}
{"actor":{"display_login":"zouzhitao"}}