{"action":"opened","issue":{"url":"https://api.github.com/repos/fletcher/MultiMarkdown-4/issues/132","labels_url":"https://api.github.com/repos/fletcher/MultiMarkdown-4/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/fletcher/MultiMarkdown-4/issues/132/comments","events_url":"https://api.github.com/repos/fletcher/MultiMarkdown-4/issues/132/events","html_url":"https://github.com/fletcher/MultiMarkdown-4/issues/132","id":104837376,"number":132,"title":"Custom Block Syntax","user":{"login":"mcarmosi","id":139864,"avatar_url":"https://avatars.githubusercontent.com/u/139864?v=3","gravatar_id":"","url":"https://api.github.com/users/mcarmosi","html_url":"https://github.com/mcarmosi","followers_url":"https://api.github.com/users/mcarmosi/followers","following_url":"https://api.github.com/users/mcarmosi/following{/other_user}","gists_url":"https://api.github.com/users/mcarmosi/gists{/gist_id}","starred_url":"https://api.github.com/users/mcarmosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcarmosi/subscriptions","organizations_url":"https://api.github.com/users/mcarmosi/orgs","repos_url":"https://api.github.com/users/mcarmosi/repos","events_url":"https://api.github.com/users/mcarmosi/events{/privacy}","received_events_url":"https://api.github.com/users/mcarmosi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-04T06:31:27Z","updated_at":"2015-09-04T06:31:27Z","closed_at":null,"body":"Markdown is close to being really good for writing math on the web. One issue remains; we need (at least) the following \"block\" environments, with labels to refer back to them:\r\n\r\n* Theorem\r\n* Lemma\r\n* Proof\r\n* Corollary\r\n* Definition\r\n\r\nThese are, basically, the standard amsthm environments, and they are completely indispensable for writing mathematics.  My desired output is shown below. Basically, emit a div where the optional \"title\" is the display title of the theorem, the optional \"id\" acts an an anchor for references and the \"class\" says which environment it is using an abbreviation. \r\n\r\n```\r\n\t<div class=\"thm\" id=\"#primeNum\" title=\"Many Prime Numbers\">\r\n\tThere are infinitely many prime numbers. \r\n\t</div>\r\n```\r\nI don't know if this is the \"right\" desired output according to markdown philosophy. Currently I use JavaScript to auto-number and style these environments, inserting a heading and number directly into the DOM. It seems like real markdown might emit static HTML for the theorem environment title, number, and heading, with appropriate CSS classes for styling these elements. Or the CSS counter feature could be used to number theorems, but the title would at least be in the static HTML if present.\r\n\r\nMy proposal for the markdown syntax that emits these is to copy [Madoko Custom Block Syntax](http://research.microsoft.com/en-us/um/people/daan/madoko/doc/reference.html#sec-custom), but extend it with an ability to specify the title of the block environment, which I don't think they have. The syntax would be:\r\n\r\n```\r\n~ <BlockType> <\"Optional Title for Block\"> <[ Optional label for block ]>\r\nBlock Content goes here.\r\n~\r\n```\r\n\r\nFor example:\r\n\r\n```\r\n ~ Lemma \"Left Cosets Lemma\" [LeftCosetLemma]\r\nLet $H$ be a subgroup of a group $G$, and let $x$ and \r\n$y$ be elements of $G$.  Suppose that $xH \\cap yH$ is \r\nnon-empty. Then $xH = yH$.\r\n~\r\n```\r\n\r\nThe *meaning* of mathematics is very hard to get across without these named block environments, which carefully offset important formal statements from the rest of the text. Lemmas, Theorems, and Proofs are not aesthetics, they are specific structural features of a text, just as important to mathematics as code blocks are to discussing programming. This is why I think these blocks should be supported by multimarkdown."}}