{"action":"opened","number":27,"pull_request":{"url":"https://api.github.com/repos/rstudio/rticles/pulls/27","id":29035262,"html_url":"https://github.com/rstudio/rticles/pull/27","diff_url":"https://github.com/rstudio/rticles/pull/27.diff","patch_url":"https://github.com/rstudio/rticles/pull/27.patch","issue_url":"https://api.github.com/repos/rstudio/rticles/issues/27","number":27,"state":"open","locked":false,"title":"Add the Elsevier template (requested in #24)","user":{"login":"cboettig","id":222586,"avatar_url":"https://avatars.githubusercontent.com/u/222586?v=3","gravatar_id":"","url":"https://api.github.com/users/cboettig","html_url":"https://github.com/cboettig","followers_url":"https://api.github.com/users/cboettig/followers","following_url":"https://api.github.com/users/cboettig/following{/other_user}","gists_url":"https://api.github.com/users/cboettig/gists{/gist_id}","starred_url":"https://api.github.com/users/cboettig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cboettig/subscriptions","organizations_url":"https://api.github.com/users/cboettig/orgs","repos_url":"https://api.github.com/users/cboettig/repos","events_url":"https://api.github.com/users/cboettig/events{/privacy}","received_events_url":"https://api.github.com/users/cboettig/received_events","type":"User","site_admin":false},"body":"This adds the Elsevier template files (requested in #24)\r\n\r\nMy `tex` template includes many options that can be set via top-level yaml in the .Rmd, (e.g. `layout: review`, or `layout: preprint,12pt`, `linenumbers`, `csl` etc),  but perhaps these should be made arguments to the function itself (so that they are set under the output section)?  I'm not sure if that is more or less confusing than setting them at the top level; given that currently a user needs to set most of those variables that are supported by pandoc default templates as top-level metadata.  \r\n\r\nNote that this implementation suffers from one weakness: `@` signs in the email will cause Pandoc to wrap the email with an `href` when called from rmarkdown, which uses the non-default option `autolink_bare_uris` and as far as I can tell provides no obvious way to turn that option off.  The use of an `\\href` around the email declaration conflicts with the elsarticle.cls definitions of the `\\ead()` element.  I'm not clear on the best way to address that and would welcome suggestions.  \r\n\r\nCurrently I have simply written emails in the template as `bob(at)example.com` to avoid autolinking, but this is a non-ideal solution.\r\n\r\nAltering the class file itself is, I think, a worse solution. The `elsarticle.cls` file that already ships with most tex distributions and is found on most major journal platforms (arxiv,  manuscriptcentral, etc) so users who actually submit the `tex` file to the journal would have to be careful to submit the modified class file.  \r\n\r\nPerhaps something clever can be hacked into the template itself to redefine the class file's definitions and make this work, but I have no idea how to do so (pending my [question on tex.stackchange](http://tex.stackexchange.com/questions/227393)).\r\n\r\nIt seems the preferred solution would be simply to turn `autolink_bare_uris` off, but if that's possible in `rmarkdown`, it's beyond me.  https://github.com/rstudio/rmarkdown/issues/372\r\n\r\n\r\n","created_at":"2015-02-10T19:12:09Z","updated_at":"2015-02-10T19:12:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05c924fbd2dce9b255a8f426624aead28d29f97c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rstudio/rticles/pulls/27/commits","review_comments_url":"https://api.github.com/repos/rstudio/rticles/pulls/27/comments","review_comment_url":"https://api.github.com/repos/rstudio/rticles/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rstudio/rticles/issues/27/comments","statuses_url":"https://api.github.com/repos/rstudio/rticles/statuses/0c028cf682cedf0ab0cabe333de3305785abf2d5","head":{"label":"cboettig:elsevier","ref":"elsevier","sha":"0c028cf682cedf0ab0cabe333de3305785abf2d5","user":{"login":"cboettig","id":222586,"avatar_url":"https://avatars.githubusercontent.com/u/222586?v=3","gravatar_id":"","url":"https://api.github.com/users/cboettig","html_url":"https://github.com/cboettig","followers_url":"https://api.github.com/users/cboettig/followers","following_url":"https://api.github.com/users/cboettig/following{/other_user}","gists_url":"https://api.github.com/users/cboettig/gists{/gist_id}","starred_url":"https://api.github.com/users/cboettig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cboettig/subscriptions","organizations_url":"https://api.github.com/users/cboettig/orgs","repos_url":"https://api.github.com/users/cboettig/repos","events_url":"https://api.github.com/users/cboettig/events{/privacy}","received_events_url":"https://api.github.com/users/cboettig/received_events","type":"User","site_admin":false},"repo":{"id":29416930,"name":"rticles","full_name":"cboettig/rticles","owner":{"login":"cboettig","id":222586,"avatar_url":"https://avatars.githubusercontent.com/u/222586?v=3","gravatar_id":"","url":"https://api.github.com/users/cboettig","html_url":"https://github.com/cboettig","followers_url":"https://api.github.com/users/cboettig/followers","following_url":"https://api.github.com/users/cboettig/following{/other_user}","gists_url":"https://api.github.com/users/cboettig/gists{/gist_id}","starred_url":"https://api.github.com/users/cboettig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cboettig/subscriptions","organizations_url":"https://api.github.com/users/cboettig/orgs","repos_url":"https://api.github.com/users/cboettig/repos","events_url":"https://api.github.com/users/cboettig/events{/privacy}","received_events_url":"https://api.github.com/users/cboettig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cboettig/rticles","description":"","fork":true,"url":"https://api.github.com/repos/cboettig/rticles","forks_url":"https://api.github.com/repos/cboettig/rticles/forks","keys_url":"https://api.github.com/repos/cboettig/rticles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cboettig/rticles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cboettig/rticles/teams","hooks_url":"https://api.github.com/repos/cboettig/rticles/hooks","issue_events_url":"https://api.github.com/repos/cboettig/rticles/issues/events{/number}","events_url":"https://api.github.com/repos/cboettig/rticles/events","assignees_url":"https://api.github.com/repos/cboettig/rticles/assignees{/user}","branches_url":"https://api.github.com/repos/cboettig/rticles/branches{/branch}","tags_url":"https://api.github.com/repos/cboettig/rticles/tags","blobs_url":"https://api.github.com/repos/cboettig/rticles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cboettig/rticles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cboettig/rticles/git/refs{/sha}","trees_url":"https://api.github.com/repos/cboettig/rticles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cboettig/rticles/statuses/{sha}","languages_url":"https://api.github.com/repos/cboettig/rticles/languages","stargazers_url":"https://api.github.com/repos/cboettig/rticles/stargazers","contributors_url":"https://api.github.com/repos/cboettig/rticles/contributors","subscribers_url":"https://api.github.com/repos/cboettig/rticles/subscribers","subscription_url":"https://api.github.com/repos/cboettig/rticles/subscription","commits_url":"https://api.github.com/repos/cboettig/rticles/commits{/sha}","git_commits_url":"https://api.github.com/repos/cboettig/rticles/git/commits{/sha}","comments_url":"https://api.github.com/repos/cboettig/rticles/comments{/number}","issue_comment_url":"https://api.github.com/repos/cboettig/rticles/issues/comments/{number}","contents_url":"https://api.github.com/repos/cboettig/rticles/contents/{+path}","compare_url":"https://api.github.com/repos/cboettig/rticles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cboettig/rticles/merges","archive_url":"https://api.github.com/repos/cboettig/rticles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cboettig/rticles/downloads","issues_url":"https://api.github.com/repos/cboettig/rticles/issues{/number}","pulls_url":"https://api.github.com/repos/cboettig/rticles/pulls{/number}","milestones_url":"https://api.github.com/repos/cboettig/rticles/milestones{/number}","notifications_url":"https://api.github.com/repos/cboettig/rticles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cboettig/rticles/labels{/name}","releases_url":"https://api.github.com/repos/cboettig/rticles/releases{/id}","created_at":"2015-01-18T05:33:08Z","updated_at":"2015-01-18T05:33:09Z","pushed_at":"2015-02-10T19:12:02Z","git_url":"git://github.com/cboettig/rticles.git","ssh_url":"git@github.com:cboettig/rticles.git","clone_url":"https://github.com/cboettig/rticles.git","svn_url":"https://github.com/cboettig/rticles","homepage":null,"size":603,"stargazers_count":0,"watchers_count":0,"language":"TeX","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rstudio:master","ref":"master","sha":"05ec07a63744d52ae1b45774377f7537faf546af","user":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"repo":{"id":17756613,"name":"rticles","full_name":"rstudio/rticles","owner":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstudio/rticles","description":"","fork":false,"url":"https://api.github.com/repos/rstudio/rticles","forks_url":"https://api.github.com/repos/rstudio/rticles/forks","keys_url":"https://api.github.com/repos/rstudio/rticles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstudio/rticles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstudio/rticles/teams","hooks_url":"https://api.github.com/repos/rstudio/rticles/hooks","issue_events_url":"https://api.github.com/repos/rstudio/rticles/issues/events{/number}","events_url":"https://api.github.com/repos/rstudio/rticles/events","assignees_url":"https://api.github.com/repos/rstudio/rticles/assignees{/user}","branches_url":"https://api.github.com/repos/rstudio/rticles/branches{/branch}","tags_url":"https://api.github.com/repos/rstudio/rticles/tags","blobs_url":"https://api.github.com/repos/rstudio/rticles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstudio/rticles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstudio/rticles/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstudio/rticles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstudio/rticles/statuses/{sha}","languages_url":"https://api.github.com/repos/rstudio/rticles/languages","stargazers_url":"https://api.github.com/repos/rstudio/rticles/stargazers","contributors_url":"https://api.github.com/repos/rstudio/rticles/contributors","subscribers_url":"https://api.github.com/repos/rstudio/rticles/subscribers","subscription_url":"https://api.github.com/repos/rstudio/rticles/subscription","commits_url":"https://api.github.com/repos/rstudio/rticles/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstudio/rticles/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstudio/rticles/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstudio/rticles/issues/comments/{number}","contents_url":"https://api.github.com/repos/rstudio/rticles/contents/{+path}","compare_url":"https://api.github.com/repos/rstudio/rticles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstudio/rticles/merges","archive_url":"https://api.github.com/repos/rstudio/rticles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstudio/rticles/downloads","issues_url":"https://api.github.com/repos/rstudio/rticles/issues{/number}","pulls_url":"https://api.github.com/repos/rstudio/rticles/pulls{/number}","milestones_url":"https://api.github.com/repos/rstudio/rticles/milestones{/number}","notifications_url":"https://api.github.com/repos/rstudio/rticles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstudio/rticles/labels{/name}","releases_url":"https://api.github.com/repos/rstudio/rticles/releases{/id}","created_at":"2014-03-14T18:52:20Z","updated_at":"2015-02-01T05:50:10Z","pushed_at":"2015-01-23T11:03:05Z","git_url":"git://github.com/rstudio/rticles.git","ssh_url":"git@github.com:rstudio/rticles.git","clone_url":"https://github.com/rstudio/rticles.git","svn_url":"https://github.com/rstudio/rticles","homepage":null,"size":611,"stargazers_count":48,"watchers_count":48,"language":"TeX","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":10,"forks":30,"open_issues":10,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rstudio/rticles/pulls/27"},"html":{"href":"https://github.com/rstudio/rticles/pull/27"},"issue":{"href":"https://api.github.com/repos/rstudio/rticles/issues/27"},"comments":{"href":"https://api.github.com/repos/rstudio/rticles/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/rstudio/rticles/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/rstudio/rticles/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rstudio/rticles/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/rstudio/rticles/statuses/0c028cf682cedf0ab0cabe333de3305785abf2d5"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":2267,"deletions":1,"changed_files":14}}