{"action":"created","issue":{"url":"https://api.github.com/repos/trentm/python-markdown2/issues/219","repository_url":"https://api.github.com/repos/trentm/python-markdown2","labels_url":"https://api.github.com/repos/trentm/python-markdown2/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/trentm/python-markdown2/issues/219/comments","events_url":"https://api.github.com/repos/trentm/python-markdown2/issues/219/events","html_url":"https://github.com/trentm/python-markdown2/issues/219","id":169732042,"number":219,"title":"Potential Extension","user":{"login":"ewankirk","id":8470175,"avatar_url":"https://avatars.githubusercontent.com/u/8470175?v=3","gravatar_id":"","url":"https://api.github.com/users/ewankirk","html_url":"https://github.com/ewankirk","followers_url":"https://api.github.com/users/ewankirk/followers","following_url":"https://api.github.com/users/ewankirk/following{/other_user}","gists_url":"https://api.github.com/users/ewankirk/gists{/gist_id}","starred_url":"https://api.github.com/users/ewankirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewankirk/subscriptions","organizations_url":"https://api.github.com/users/ewankirk/orgs","repos_url":"https://api.github.com/users/ewankirk/repos","events_url":"https://api.github.com/users/ewankirk/events{/privacy}","received_events_url":"https://api.github.com/users/ewankirk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-08-06T06:06:19Z","updated_at":"2016-12-20T05:02:51Z","closed_at":"2016-12-20T05:02:51Z","body":"I've been using markdown2 a lot in a recent project to convert a \\LaTeX document generator into an online research environment.  Combined with MathJax, Markdown2 with the footnotes extension is  pretty much perfect.  However, the one thing that Markdown can't do is number figures and tables.  This is pretty much essential in research papers and is also a useful feature in other styles of documentation.  \n\nWhilst I understand that there are way too many \"standards\" for Markdown, I wanted to add an extension to handle figure, table and equation numbering to Markdown.  What I've done (in a relatively few lines of code) is add a preprocessor which generates generic \"counters\" which can be used to number equations.  The syntax is as follows.\n\nWhen you first want to label an item (figure, table, image whatever), you add a markdown item \n\n```\n     [#counter_id](:item_tag)\n```\n\nand when you want to refer to it in the text you use `[:item_tag]`.  Here both `counter_id` and `item_tag` are \"words\" in the regex sense.\n\nDuring conversion, the first pass identifies all the labels and creates counters as required and increments them if they're already created.  During the second pass, the counter integers are replaced in the text.  In principle, each counter can have it's own css style associated with it.  At present it doesn't hyperlink the references to the original item but that would be easy to add.\n\nThe code is about 40 lines of Python.\n\nSo the issue is: Is this more generally useful?  There's almost no support for \"exhibit numbering\" in any Markdown converters -- which is why I had to write my own.  I could certainly add this as an \"extra\" in markdown2 if there was general support for it but I don't want to add useless cruft to a project.  Comments?\n"},"comment":{"url":"https://api.github.com/repos/trentm/python-markdown2/issues/comments/268155609","html_url":"https://github.com/trentm/python-markdown2/issues/219#issuecomment-268155609","issue_url":"https://api.github.com/repos/trentm/python-markdown2/issues/219","id":268155609,"user":{"login":"nicholasserra","id":512288,"avatar_url":"https://avatars.githubusercontent.com/u/512288?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholasserra","html_url":"https://github.com/nicholasserra","followers_url":"https://api.github.com/users/nicholasserra/followers","following_url":"https://api.github.com/users/nicholasserra/following{/other_user}","gists_url":"https://api.github.com/users/nicholasserra/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholasserra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholasserra/subscriptions","organizations_url":"https://api.github.com/users/nicholasserra/orgs","repos_url":"https://api.github.com/users/nicholasserra/repos","events_url":"https://api.github.com/users/nicholasserra/events{/privacy}","received_events_url":"https://api.github.com/users/nicholasserra/received_events","type":"User","site_admin":false},"created_at":"2016-12-20T05:02:51Z","updated_at":"2016-12-20T05:02:51Z","body":"Good look, thanks"}}
{"actor":{"display_login":"nicholasserra"}}