{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/markdown/issues/71","labels_url":"https://api.github.com/repos/rstudio/markdown/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/markdown/issues/71/comments","events_url":"https://api.github.com/repos/rstudio/markdown/issues/71/events","html_url":"https://github.com/rstudio/markdown/issues/71","id":88788201,"number":71,"title":"renderMarkdown does not detect LaTeX math in RStudio IDE under Debian (only)","user":{"login":"jonathan-g","id":5304060,"avatar_url":"https://avatars.githubusercontent.com/u/5304060?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathan-g","html_url":"https://github.com/jonathan-g","followers_url":"https://api.github.com/users/jonathan-g/followers","following_url":"https://api.github.com/users/jonathan-g/following{/other_user}","gists_url":"https://api.github.com/users/jonathan-g/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathan-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathan-g/subscriptions","organizations_url":"https://api.github.com/users/jonathan-g/orgs","repos_url":"https://api.github.com/users/jonathan-g/repos","events_url":"https://api.github.com/users/jonathan-g/events{/privacy}","received_events_url":"https://api.github.com/users/jonathan-g/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-16T17:21:59Z","updated_at":"2015-06-17T21:57:08Z","closed_at":null,"body":"A weird anomaly:\r\n\r\nI run this script in several environments:\r\n```\r\nrm(list = ls())\r\n\r\nlibrary(markdown)\r\n\r\neq <- 'x = \\\\sqrt{\\\\left[\\\\frac{y^z}{\\\\theta}\\\\right]}'\r\n\r\np_text <- paste0('$',   eq, '$')\r\nq_text <- paste0('$$',  eq, '$$')\r\nr_text <- paste0('\\\\(', eq, '\\\\)')\r\ns_text <- paste0('\\\\[', eq, '\\\\]')\r\n\r\np <- renderMarkdown(text = p_text)\r\nq <- renderMarkdown(text = q_text)\r\nr <- renderMarkdown(text = r_text)\r\ns <- renderMarkdown(text = s_text)\r\n\r\ncat(p_text, '-->', p, '\\n')\r\ncat(q_text, '-->', q, '\\n')\r\ncat(r_text, '-->', r, '\\n')\r\ncat(s_text, '-->', s, '\\n')\r\n\r\ncat('markdown.extensions:', unlist(getOption('markdown.extensions')), '\\n')\r\ncat('markdown.HTML.options:', unlist(getOption('markdown.HTML.options')), '\\n')\r\n\r\nprint(sessionInfo())\r\n```\r\n\r\nUnder Debian using `RScript` or sourcing it interactively from `R`, I get this output:\r\n```\r\n$x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}$ --> <p>\\(x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\)</p>\r\n \r\n$$x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}$$ --> <p>\\[x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\]</p>\r\n \r\n\\(x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\) --> <p>\\(x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\)</p>\r\n \r\n\\[x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\] --> <p>\\[x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\]</p>\r\n \r\nmarkdown.extensions: no_intra_emphasis tables fenced_code autolink strikethrough lax_spacing space_headers superscript latex_math \r\nmarkdown.HTML.options: use_xhtml smartypants base64_images mathjax highlight_code \r\nR version 3.2.0 (2015-04-16)\r\nPlatform: x86_64-pc-linux-gnu (64-bit)\r\nRunning under: Debian GNU/Linux 8 (jessie)\r\n\r\nlocale:\r\n [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              \r\n [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    \r\n [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   \r\n [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 \r\n [9] LC_ADDRESS=C               LC_TELEPHONE=C            \r\n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  base     \r\n\r\nother attached packages:\r\n[1] markdown_0.7.7\r\n```\r\n\r\nWhen I run it under RStudio IDE or RStudio Server (both version 0.99.441 installed from the .deb files downloaded from RStudio.com) I get this:\r\n\r\n```\r\n$x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}$ --> <p>$x = \\sqrt{\\left[\\frac{y<sup>z}{\\theta}\\right]}$</sup></p>\r\n \r\n$$x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}$$ --> <p>$$x = \\sqrt{\\left[\\frac{y<sup>z}{\\theta}\\right]}$$</sup></p>\r\n \r\n\\(x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\) --> <p>(x = \\sqrt{\\left[\\frac{y<sup>z}{\\theta}\\right]})</sup></p>\r\n \r\n\\[x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\] --> <p>[x = \\sqrt{\\left[\\frac{y<sup>z}{\\theta}\\right]}]</sup></p>\r\n \r\nmarkdown.extensions: no_intra_emphasis tables fenced_code autolink strikethrough lax_spacing space_headers superscript latex_math \r\nmarkdown.HTML.options: use_xhtml smartypants base64_images mathjax highlight_code \r\nR version 3.2.0 (2015-04-16)\r\nPlatform: x86_64-pc-linux-gnu (64-bit)\r\nRunning under: Debian GNU/Linux 8 (jessie)\r\n\r\nlocale:\r\n [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    \r\n [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 \r\n [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n[1] markdown_0.7.7\r\n\r\nloaded via a namespace (and not attached):\r\n[1] tools_3.2.0\r\n```\r\n\r\nAnd when I run it under RStudio IDE on Windows 7, I get this:\r\n```\r\n$x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}$ --> <p>\\(x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\)</p>\r\n \r\n$$x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}$$ --> <p>\\[x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\]</p>\r\n \r\n\\(x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\) --> <p>\\(x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\)</p>\r\n \r\n\\[x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\] --> <p>\\[x = \\sqrt{\\left[\\frac{y^z}{\\theta}\\right]}\\]</p>\r\n \r\nmarkdown.extensions: no_intra_emphasis tables fenced_code autolink strikethrough lax_spacing space_headers superscript latex_math \r\nmarkdown.HTML.options: use_xhtml smartypants base64_images mathjax highlight_code \r\nR version 3.2.0 (2015-04-16)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\nRunning under: Windows 7 x64 (build 7601) Service Pack 1\r\n\r\nlocale:\r\n[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252    \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n[1] markdown_0.7.7\r\n\r\nloaded via a namespace (and not attached):\r\n[1] tools_3.2.0\r\n```\r\n\r\nSomehow the markdown packages is failing to detect LaTeX equations, but only when I run it under RStudio under Debian. I get the correct behavior in RStudio under Windows and when I run R from the command line. I have reproduced this on two different Windows computers and two different Debian computers."},"comment":{"url":"https://api.github.com/repos/rstudio/markdown/issues/comments/112962515","html_url":"https://github.com/rstudio/markdown/issues/71#issuecomment-112962515","issue_url":"https://api.github.com/repos/rstudio/markdown/issues/71","id":112962515,"user":{"login":"jjallaire","id":104391,"avatar_url":"https://avatars.githubusercontent.com/u/104391?v=3","gravatar_id":"","url":"https://api.github.com/users/jjallaire","html_url":"https://github.com/jjallaire","followers_url":"https://api.github.com/users/jjallaire/followers","following_url":"https://api.github.com/users/jjallaire/following{/other_user}","gists_url":"https://api.github.com/users/jjallaire/gists{/gist_id}","starred_url":"https://api.github.com/users/jjallaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjallaire/subscriptions","organizations_url":"https://api.github.com/users/jjallaire/orgs","repos_url":"https://api.github.com/users/jjallaire/repos","events_url":"https://api.github.com/users/jjallaire/events{/privacy}","received_events_url":"https://api.github.com/users/jjallaire/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T21:57:08Z","updated_at":"2015-06-17T21:57:08Z","body":"Okay, I'll have to revert that change then.\n\nBTW not sure if you seen but we've massively upgraded R Markdown based on\nthe newer rmarkdown package: http://rmarkdown.rstudio.com/ which you might\nalso consider using (as the older \"markdown\" package is effectively\ndeprecated)\n\nOn Wed, Jun 17, 2015 at 4:50 PM, jonathan-g <notifications@github.com>\nwrote:\n\n> Thanks for the quick response, but I have some bad news to report. The new\n> version of RStudio (0.99.595) now crashes on Debian jessie when I call\n> renderMarkdown.\n>\n> I uninstalled the old version: sudo apt-get remove rstudio, then\n> installed the new version for ubuntu 64 from\n> https://s3.amazonaws.com/rstudio-dailybuilds/rstudio-0.99.595-amd64.deb\n> and now rsession crashes (Rstudio displays the bomb with \"R Session\n> Aborted\") when I run\n>\n> library(markdown)\n> renderMarkdown(text='foo')\n>\n> The same build works just fine under Ubuntu 14.04.2..\n>\n> I'm not sure how to generate useful information for you from this, but I'd\n> be happy to help if you can tell me what would be useful to you.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/rstudio/markdown/issues/71#issuecomment-112946281>.\n>\n"}}