{"action":"closed","number":26,"pull_request":{"url":"https://api.github.com/repos/rbeezer/mathbook/pulls/26","id":27646499,"html_url":"https://github.com/rbeezer/mathbook/pull/26","diff_url":"https://github.com/rbeezer/mathbook/pull/26.diff","patch_url":"https://github.com/rbeezer/mathbook/pull/26.patch","issue_url":"https://api.github.com/repos/rbeezer/mathbook/issues/26","number":26,"state":"closed","locked":false,"title":"Feature/quant","user":{"login":"Alex-Jordan","id":4732672,"avatar_url":"https://avatars.githubusercontent.com/u/4732672?v=3","gravatar_id":"","url":"https://api.github.com/users/Alex-Jordan","html_url":"https://github.com/Alex-Jordan","followers_url":"https://api.github.com/users/Alex-Jordan/followers","following_url":"https://api.github.com/users/Alex-Jordan/following{/other_user}","gists_url":"https://api.github.com/users/Alex-Jordan/gists{/gist_id}","starred_url":"https://api.github.com/users/Alex-Jordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alex-Jordan/subscriptions","organizations_url":"https://api.github.com/users/Alex-Jordan/orgs","repos_url":"https://api.github.com/users/Alex-Jordan/repos","events_url":"https://api.github.com/users/Alex-Jordan/events{/privacy}","received_events_url":"https://api.github.com/users/Alex-Jordan/received_events","type":"User","site_admin":false},"body":"Chris and I are adapting `mathbook` to at least one project we have been working on. As we add/modify our fork of `mathbook`, we'll check if you are interested in accepting the modifications here too.\r\n\r\nThis pull request is our first test of our work flow. It adds the element `quant` to each of `mathbook-latex.xsl` and `mathbook-html.xsl`. `quant` has a `mag` attribute, which should be a number (pos or neg), and may be omitted if there are units. `quant` can have `unit` and `per` elements as children. A `unit` child is a \"numerator\" unit, and a `per` child is a \"denominator\" unit. `unit` and `per` elements must have a `base` attribute like \"gram\" or \"second\". They may additionally have a `prefix` attribute (like \"kilo\") and an `exp` attribute.\r\n\r\nThe latex side needs the package `siunitx` to be loaded. I'm not sure where you would add that in `mathbook-latex.xsl`. For Chris and my purposes, we have our own .tex hub file built outside of MBX. But if this feature is useful with MBX, `siunitx` needs to be added in preambles somehow. If you'd like me to add that, tell me where and I will update this branch.\r\n\r\n\r\nTest both `.xsl` files on:\r\n```\r\n        <p>An empty <quant/> gives an error.</p>\r\n        <p>The number <quant mag=\"42\"/> is special.</p>\r\n        <p>We had <quant mag=\"42\"><unit base=\"newton\" prefix=\"kilo\"/><unit base=\"meter\" /></quant> of torque.</p>\r\n        <p>And we had some amount of<quant><unit base=\"gram\" prefix=\"kilo\"/><unit base=\"meter\" /><per base=\"second\" exp=\"2\" /></quant> of force.</p>\r\n        <p>Or maybe we had  <quant mag=\"42\"><unit base=\"watt\" prefix=\"micro\"/><unit base=\"hour\"/></quant> of energy.</p>\r\n        <p>The quantity <quant mag=\"13\"><unit base=\"gram\" prefix=\"kilo\" exp=\"-23\"/><unit base=\"meter\" /><per base=\"second\" exp=\"2\" /></quant> has a crazy exponent.</p>\r\n        <p>test <quant><per base=\"gram\" prefix=\"kilo\"/><unit base=\"meter\" /><per base=\"second\" exp=\"2\" /></quant> test</p>\r\n        <p>test <quant mag=\"42\"><per base=\"gram\" prefix=\"kilo\"/></quant> test</p>\r\n        <p>test <quant mag=\"23\"><unit prefix=\"kilo\" base=\"gram\" exp=\"2\"/><unit prefix=\"micro\" base=\"second\"/><per prefix=\"centi\" base=\"meter\" exp=\"3\"/><per prefix=\"milli\" base=\"ohm\"/></quant> test</p>\r\n```","created_at":"2015-01-20T00:52:14Z","updated_at":"2015-03-06T05:48:14Z","closed_at":"2015-03-06T05:48:14Z","merged_at":null,"merge_commit_sha":"04920e77f5c34fe2e2f1b9936281535b7fd40b69","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rbeezer/mathbook/pulls/26/commits","review_comments_url":"https://api.github.com/repos/rbeezer/mathbook/pulls/26/comments","review_comment_url":"https://api.github.com/repos/rbeezer/mathbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rbeezer/mathbook/issues/26/comments","statuses_url":"https://api.github.com/repos/rbeezer/mathbook/statuses/a4d6545672b6b6012cb239639b035241f5bc4075","head":{"label":"openmathdocs:feature/quant","ref":"feature/quant","sha":"a4d6545672b6b6012cb239639b035241f5bc4075","user":{"login":"openmathdocs","id":7978286,"avatar_url":"https://avatars.githubusercontent.com/u/7978286?v=3","gravatar_id":"","url":"https://api.github.com/users/openmathdocs","html_url":"https://github.com/openmathdocs","followers_url":"https://api.github.com/users/openmathdocs/followers","following_url":"https://api.github.com/users/openmathdocs/following{/other_user}","gists_url":"https://api.github.com/users/openmathdocs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmathdocs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmathdocs/subscriptions","organizations_url":"https://api.github.com/users/openmathdocs/orgs","repos_url":"https://api.github.com/users/openmathdocs/repos","events_url":"https://api.github.com/users/openmathdocs/events{/privacy}","received_events_url":"https://api.github.com/users/openmathdocs/received_events","type":"Organization","site_admin":false},"repo":{"id":29439565,"name":"mathbook","full_name":"openmathdocs/mathbook","owner":{"login":"openmathdocs","id":7978286,"avatar_url":"https://avatars.githubusercontent.com/u/7978286?v=3","gravatar_id":"","url":"https://api.github.com/users/openmathdocs","html_url":"https://github.com/openmathdocs","followers_url":"https://api.github.com/users/openmathdocs/followers","following_url":"https://api.github.com/users/openmathdocs/following{/other_user}","gists_url":"https://api.github.com/users/openmathdocs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmathdocs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmathdocs/subscriptions","organizations_url":"https://api.github.com/users/openmathdocs/orgs","repos_url":"https://api.github.com/users/openmathdocs/repos","events_url":"https://api.github.com/users/openmathdocs/events{/privacy}","received_events_url":"https://api.github.com/users/openmathdocs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmathdocs/mathbook","description":"OpenMathDoc's version of MathBook XML","fork":true,"url":"https://api.github.com/repos/openmathdocs/mathbook","forks_url":"https://api.github.com/repos/openmathdocs/mathbook/forks","keys_url":"https://api.github.com/repos/openmathdocs/mathbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmathdocs/mathbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmathdocs/mathbook/teams","hooks_url":"https://api.github.com/repos/openmathdocs/mathbook/hooks","issue_events_url":"https://api.github.com/repos/openmathdocs/mathbook/issues/events{/number}","events_url":"https://api.github.com/repos/openmathdocs/mathbook/events","assignees_url":"https://api.github.com/repos/openmathdocs/mathbook/assignees{/user}","branches_url":"https://api.github.com/repos/openmathdocs/mathbook/branches{/branch}","tags_url":"https://api.github.com/repos/openmathdocs/mathbook/tags","blobs_url":"https://api.github.com/repos/openmathdocs/mathbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmathdocs/mathbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmathdocs/mathbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmathdocs/mathbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmathdocs/mathbook/statuses/{sha}","languages_url":"https://api.github.com/repos/openmathdocs/mathbook/languages","stargazers_url":"https://api.github.com/repos/openmathdocs/mathbook/stargazers","contributors_url":"https://api.github.com/repos/openmathdocs/mathbook/contributors","subscribers_url":"https://api.github.com/repos/openmathdocs/mathbook/subscribers","subscription_url":"https://api.github.com/repos/openmathdocs/mathbook/subscription","commits_url":"https://api.github.com/repos/openmathdocs/mathbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmathdocs/mathbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmathdocs/mathbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmathdocs/mathbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmathdocs/mathbook/contents/{+path}","compare_url":"https://api.github.com/repos/openmathdocs/mathbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmathdocs/mathbook/merges","archive_url":"https://api.github.com/repos/openmathdocs/mathbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmathdocs/mathbook/downloads","issues_url":"https://api.github.com/repos/openmathdocs/mathbook/issues{/number}","pulls_url":"https://api.github.com/repos/openmathdocs/mathbook/pulls{/number}","milestones_url":"https://api.github.com/repos/openmathdocs/mathbook/milestones{/number}","notifications_url":"https://api.github.com/repos/openmathdocs/mathbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmathdocs/mathbook/labels{/name}","releases_url":"https://api.github.com/repos/openmathdocs/mathbook/releases{/id}","created_at":"2015-01-18T20:19:19Z","updated_at":"2015-02-07T19:24:29Z","pushed_at":"2015-03-06T05:45:00Z","git_url":"git://github.com/openmathdocs/mathbook.git","ssh_url":"git@github.com:openmathdocs/mathbook.git","clone_url":"https://github.com/openmathdocs/mathbook.git","svn_url":"https://github.com/openmathdocs/mathbook","homepage":"","size":9395,"stargazers_count":0,"watchers_count":0,"language":"XSLT","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev"}},"base":{"label":"rbeezer:dev","ref":"dev","sha":"84152a8ea33a2a9979201b367fab21c4490725f9","user":{"login":"rbeezer","id":1881714,"avatar_url":"https://avatars.githubusercontent.com/u/1881714?v=3","gravatar_id":"","url":"https://api.github.com/users/rbeezer","html_url":"https://github.com/rbeezer","followers_url":"https://api.github.com/users/rbeezer/followers","following_url":"https://api.github.com/users/rbeezer/following{/other_user}","gists_url":"https://api.github.com/users/rbeezer/gists{/gist_id}","starred_url":"https://api.github.com/users/rbeezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbeezer/subscriptions","organizations_url":"https://api.github.com/users/rbeezer/orgs","repos_url":"https://api.github.com/users/rbeezer/repos","events_url":"https://api.github.com/users/rbeezer/events{/privacy}","received_events_url":"https://api.github.com/users/rbeezer/received_events","type":"User","site_admin":false},"repo":{"id":12987787,"name":"mathbook","full_name":"rbeezer/mathbook","owner":{"login":"rbeezer","id":1881714,"avatar_url":"https://avatars.githubusercontent.com/u/1881714?v=3","gravatar_id":"","url":"https://api.github.com/users/rbeezer","html_url":"https://github.com/rbeezer","followers_url":"https://api.github.com/users/rbeezer/followers","following_url":"https://api.github.com/users/rbeezer/following{/other_user}","gists_url":"https://api.github.com/users/rbeezer/gists{/gist_id}","starred_url":"https://api.github.com/users/rbeezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbeezer/subscriptions","organizations_url":"https://api.github.com/users/rbeezer/orgs","repos_url":"https://api.github.com/users/rbeezer/repos","events_url":"https://api.github.com/users/rbeezer/events{/privacy}","received_events_url":"https://api.github.com/users/rbeezer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rbeezer/mathbook","description":"MathBook XML","fork":false,"url":"https://api.github.com/repos/rbeezer/mathbook","forks_url":"https://api.github.com/repos/rbeezer/mathbook/forks","keys_url":"https://api.github.com/repos/rbeezer/mathbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rbeezer/mathbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rbeezer/mathbook/teams","hooks_url":"https://api.github.com/repos/rbeezer/mathbook/hooks","issue_events_url":"https://api.github.com/repos/rbeezer/mathbook/issues/events{/number}","events_url":"https://api.github.com/repos/rbeezer/mathbook/events","assignees_url":"https://api.github.com/repos/rbeezer/mathbook/assignees{/user}","branches_url":"https://api.github.com/repos/rbeezer/mathbook/branches{/branch}","tags_url":"https://api.github.com/repos/rbeezer/mathbook/tags","blobs_url":"https://api.github.com/repos/rbeezer/mathbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rbeezer/mathbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rbeezer/mathbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/rbeezer/mathbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rbeezer/mathbook/statuses/{sha}","languages_url":"https://api.github.com/repos/rbeezer/mathbook/languages","stargazers_url":"https://api.github.com/repos/rbeezer/mathbook/stargazers","contributors_url":"https://api.github.com/repos/rbeezer/mathbook/contributors","subscribers_url":"https://api.github.com/repos/rbeezer/mathbook/subscribers","subscription_url":"https://api.github.com/repos/rbeezer/mathbook/subscription","commits_url":"https://api.github.com/repos/rbeezer/mathbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/rbeezer/mathbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/rbeezer/mathbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/rbeezer/mathbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/rbeezer/mathbook/contents/{+path}","compare_url":"https://api.github.com/repos/rbeezer/mathbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rbeezer/mathbook/merges","archive_url":"https://api.github.com/repos/rbeezer/mathbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rbeezer/mathbook/downloads","issues_url":"https://api.github.com/repos/rbeezer/mathbook/issues{/number}","pulls_url":"https://api.github.com/repos/rbeezer/mathbook/pulls{/number}","milestones_url":"https://api.github.com/repos/rbeezer/mathbook/milestones{/number}","notifications_url":"https://api.github.com/repos/rbeezer/mathbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rbeezer/mathbook/labels{/name}","releases_url":"https://api.github.com/repos/rbeezer/mathbook/releases{/id}","created_at":"2013-09-21T01:58:14Z","updated_at":"2015-02-13T17:38:32Z","pushed_at":"2015-03-05T03:30:03Z","git_url":"git://github.com/rbeezer/mathbook.git","ssh_url":"git@github.com:rbeezer/mathbook.git","clone_url":"https://github.com/rbeezer/mathbook.git","svn_url":"https://github.com/rbeezer/mathbook","homepage":null,"size":10203,"stargazers_count":12,"watchers_count":12,"language":"XSLT","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":33,"forks":10,"open_issues":33,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rbeezer/mathbook/pulls/26"},"html":{"href":"https://github.com/rbeezer/mathbook/pull/26"},"issue":{"href":"https://api.github.com/repos/rbeezer/mathbook/issues/26"},"comments":{"href":"https://api.github.com/repos/rbeezer/mathbook/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/rbeezer/mathbook/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/rbeezer/mathbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rbeezer/mathbook/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/rbeezer/mathbook/statuses/a4d6545672b6b6012cb239639b035241f5bc4075"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":17,"review_comments":0,"commits":5,"additions":220,"deletions":1,"changed_files":2}}