{"action":"created","issue":{"url":"https://api.github.com/repos/mathquill/mathquill/issues/467","labels_url":"https://api.github.com/repos/mathquill/mathquill/issues/467/labels{/name}","comments_url":"https://api.github.com/repos/mathquill/mathquill/issues/467/comments","events_url":"https://api.github.com/repos/mathquill/mathquill/issues/467/events","html_url":"https://github.com/mathquill/mathquill/issues/467","id":107592331,"number":467,"title":"Create template for bases of unbased super/subscript","user":{"login":"kschaefe","id":366710,"avatar_url":"https://avatars.githubusercontent.com/u/366710?v=3","gravatar_id":"","url":"https://api.github.com/users/kschaefe","html_url":"https://github.com/kschaefe","followers_url":"https://api.github.com/users/kschaefe/followers","following_url":"https://api.github.com/users/kschaefe/following{/other_user}","gists_url":"https://api.github.com/users/kschaefe/gists{/gist_id}","starred_url":"https://api.github.com/users/kschaefe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kschaefe/subscriptions","organizations_url":"https://api.github.com/users/kschaefe/orgs","repos_url":"https://api.github.com/users/kschaefe/repos","events_url":"https://api.github.com/users/kschaefe/events{/privacy}","received_events_url":"https://api.github.com/users/kschaefe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-09-21T20:30:29Z","updated_at":"2015-09-28T16:24:15Z","closed_at":null,"body":"The config option `supSubsRequireOperand` prevents the insertion of a superscript or subscript unless there is an operand.  I'd like to be able to have an option that allows an unbased superscript (or subscript) to be inserted with an empty block for the base.\r\n\r\nWe want to be able to give the user (in our case, math students) the flexibility to insert the power without having type anything else first, but still present valid math (where valid is includes math with unfilled boxes).  Note, I would expect that we would also want this same functionality with subscripts though we don't have a need for that now.  I mostly refer to superscripts below, but you could substitute subscript in most locations.\r\n\r\nI had attempted to use `LiveFraction.createLeftOf` as an example for how I might walk backward to consume an already created block and make it part of the new base+power template (git diff below).  This worked very well, giving me the exact behavior that I wanted.  I got 76 test failures.\r\n\r\nMost of these arise because the `latex` function will not parse my content correctly.  It shouldn't because the content wants to walk backwards, which the parser shouldn't (and from what I can tell) does not allow.  So, I really need a `LiveSuperscript`, but LaTeX reserves `^` making that option moot.\r\n\r\nWhat would be the best way to accomplish this?  Continuing down the current path of keeping the `latex` parsing as is and using the new work for *live* edits?  This would result in DOM that is different, such that `latex('x^2')` would have a different DOM representation than typing (or using `typedText`).  It should *look* the same, but it won't be the same."},"comment":{"url":"https://api.github.com/repos/mathquill/mathquill/issues/comments/143796109","html_url":"https://github.com/mathquill/mathquill/issues/467#issuecomment-143796109","issue_url":"https://api.github.com/repos/mathquill/mathquill/issues/467","id":143796109,"user":{"login":"laughinghan","id":225809,"avatar_url":"https://avatars.githubusercontent.com/u/225809?v=3","gravatar_id":"","url":"https://api.github.com/users/laughinghan","html_url":"https://github.com/laughinghan","followers_url":"https://api.github.com/users/laughinghan/followers","following_url":"https://api.github.com/users/laughinghan/following{/other_user}","gists_url":"https://api.github.com/users/laughinghan/gists{/gist_id}","starred_url":"https://api.github.com/users/laughinghan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laughinghan/subscriptions","organizations_url":"https://api.github.com/users/laughinghan/orgs","repos_url":"https://api.github.com/users/laughinghan/repos","events_url":"https://api.github.com/users/laughinghan/events{/privacy}","received_events_url":"https://api.github.com/users/laughinghan/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T16:24:15Z","updated_at":"2015-09-28T16:24:15Z","body":"The new commit seems fine by me. The tests seem trustworthy enough, SupSub contact-welding is pretty well-tested."}}