{"action":"created","issue":{"url":"https://api.github.com/repos/bdemeshev/r_manual_book/issues/7","repository_url":"https://api.github.com/repos/bdemeshev/r_manual_book","labels_url":"https://api.github.com/repos/bdemeshev/r_manual_book/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/bdemeshev/r_manual_book/issues/7/comments","events_url":"https://api.github.com/repos/bdemeshev/r_manual_book/issues/7/events","html_url":"https://github.com/bdemeshev/r_manual_book/issues/7","id":172742890,"number":7,"title":"не работают русские буквы в графиках","user":{"login":"bdemeshev","id":1075773,"avatar_url":"https://avatars.githubusercontent.com/u/1075773?v=3","gravatar_id":"","url":"https://api.github.com/users/bdemeshev","html_url":"https://github.com/bdemeshev","followers_url":"https://api.github.com/users/bdemeshev/followers","following_url":"https://api.github.com/users/bdemeshev/following{/other_user}","gists_url":"https://api.github.com/users/bdemeshev/gists{/gist_id}","starred_url":"https://api.github.com/users/bdemeshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdemeshev/subscriptions","organizations_url":"https://api.github.com/users/bdemeshev/orgs","repos_url":"https://api.github.com/users/bdemeshev/repos","events_url":"https://api.github.com/users/bdemeshev/events{/privacy}","received_events_url":"https://api.github.com/users/bdemeshev/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-23T16:15:34Z","updated_at":"2016-08-24T16:15:33Z","closed_at":"2016-08-24T16:15:33Z","body":""},"comment":{"url":"https://api.github.com/repos/bdemeshev/r_manual_book/issues/comments/242123365","html_url":"https://github.com/bdemeshev/r_manual_book/issues/7#issuecomment-242123365","issue_url":"https://api.github.com/repos/bdemeshev/r_manual_book/issues/7","id":242123365,"user":{"login":"bdemeshev","id":1075773,"avatar_url":"https://avatars.githubusercontent.com/u/1075773?v=3","gravatar_id":"","url":"https://api.github.com/users/bdemeshev","html_url":"https://github.com/bdemeshev","followers_url":"https://api.github.com/users/bdemeshev/followers","following_url":"https://api.github.com/users/bdemeshev/following{/other_user}","gists_url":"https://api.github.com/users/bdemeshev/gists{/gist_id}","starred_url":"https://api.github.com/users/bdemeshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdemeshev/subscriptions","organizations_url":"https://api.github.com/users/bdemeshev/orgs","repos_url":"https://api.github.com/users/bdemeshev/repos","events_url":"https://api.github.com/users/bdemeshev/events{/privacy}","received_events_url":"https://api.github.com/users/bdemeshev/received_events","type":"User","site_admin":false},"created_at":"2016-08-24T16:15:33Z","updated_at":"2016-08-24T16:15:33Z","body":"это извечная тема:\r\n\r\n```bash\r\nexport LC_ALL=en_US.UTF-8\r\nexport LC_CTYPE=en_US.UTF-8\r\n```\r\nи только после этих строк сработает\r\n```bash\r\nRscript -e 'bookdown::render_book(\"index.Rmd\", output_format = \"bookdown::pdf_book\")'\r\n```\r\n\r\nчтобы не париться, можно добавить эти строки с экспортом локали в `~/.bash_profile`\r\n\r\nи картинки строятся теперь через `tikzDevice` с кучей настроек\r\n```r\r\nlibrary(\"knitr\")\r\nlibrary(\"tikzDevice\")\r\n\r\n# tikz plots options\r\noptions(tikzDefaultEngine = \"xetex\")\r\noptions(tikzMetricsDictionary = \"./tikz_metrics\") # cash font metrics for speed\r\n\r\nadd_xelatex <- c(\"\\\\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}\",\r\n\"\\\\setmainfont{Linux Libertine O}\",\r\n\"\\\\setmonofont{Linux Libertine O}\",\r\n\"\\\\setsansfont{Linux Libertine O}\",\r\n\"\\\\newfontfamily{\\\\cyrillicfonttt}{Linux Libertine O}\",\r\n\"\\\\newfontfamily{\\\\cyrillicfont}{Linux Libertine O}\",\r\n\"\\\\newfontfamily{\\\\cyrillicfontsf}{Linux Libertine O}\")\r\n\r\noptions(tikzXelatexPackages = c(getOption(\"tikzXelatexPackages\"),\r\n    add_xelatex))\r\n\r\n# does remove warnings:\r\n# it is important to remove fontenc package wich is loaded by default\r\noptions(tikzUnicodeMetricPackages = c(\"\\\\usetikzlibrary{calc}\",    \r\n\"\\\\usepackage{fontspec, xunicode}\",\r\n    add_xelatex)) \r\n\r\n\r\nopts_chunk$set(dev = \"tikz\", \r\n               dev.args = list(pointsize = 11))\r\n```"}}
{"actor":{"display_login":"bdemeshev"}}