{"id":12512,"date":"2013-02-23T08:30:49","date_gmt":"2013-02-22T23:30:49","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/?p=12512"},"modified":"2013-04-16T00:37:07","modified_gmt":"2013-04-15T15:37:07","slug":"pandoc%e3%81%a7%e3%83%86%e3%82%ad%e3%82%b9%e3%83%88%e3%83%87%e3%83%bc%e3%82%bf%e5%a4%89%e6%8f%9b","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/12512.html","title":{"rendered":"Pandoc\u3067\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u5909\u63db"},"content":{"rendered":"<p>Pandoc\u3092\u4f7f\u3046\u3068\u69d8\u3005\u306a\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002Markdown\u3001HTML\u3001epub \u306e\u5909\u63db\u306b\u4f7f\u3048\u305d\u3046\u306a\u306e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n<!--more--><br \/>\n\u8cc7\u6599\u306f\u300c<a href=\"http:\/\/johnmacfarlane.net\/pandoc\/installing.html\">Pandoc &#8211; Installing<\/a>\u300d\u3092\u53c2\u8003\u306b\u3057\u307e\u3057\u305f\u3002Haskell\u306e\u30a2\u30d7\u30ea\u306a\u306e\u3067\u3001Haskell\u304c\u52d5\u4f5c\u3059\u308b\u74b0\u5883\u3067\u3042\u308c\u3070\u4f7f\u3048\u308b\u305d\u3046\u3067\u3059\u304c\u3001\u666e\u901a\u306fhaskell-platform \u3092\u5165\u308c\u3066\u4f7f\u3046\u3088\u3046\u3067\u3059\u3002Windows, MacOS X, Linux \u3069\u308c\u3067\u3082\u3044\u3051\u307e\u3059\u3002<\/p>\n<p>haskell-platform\u306b\u3064\u3044\u3066\u3001Ubuntu\u3060\u3068\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002texlive\u306fPDF\u51fa\u529b\u306b\u5fc5\u8981\u3060\u3068\u306e\u3053\u3068\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ apt-get install haskell-platform.\r\n$ apt-get install texlive\r\n<\/pre>\n<p>CentOS\u3060\u3068\u3001haskell-platform \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u304d\u306b\u3001\u3061\u3087\u3063\u3068\u82e6\u52b4\u3059\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002rpm\u7248\u306eHaskell\u5b9f\u884c\u74b0\u5883 ghc \u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u82e5\u5e72\u53e4\u3044\u3067\u3059\u304b\u3089\u3001\u300c<a href=\"\/\/www.sssg.org\/blogs\/hiro345\/archives\/12364.html\">Haskell\u3092\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u306f\u5927\u5909\u305d\u3046\u2026 | hiro345<\/a>\u300d\u3092\u53c2\u8003\u306b\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>Pandoc\u306fhaskell-platform\u306b\u540c\u68b1\u3055\u308c\u3066\u3044\u308bcabal\u3068\u3044\u3046\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3067\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002 .bash_profile\u3078\u4e0b\u8a18\u3092\u8ffd\u52a0\u3057\u3066 cabal \u3067\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u30a2\u30d7\u30ea\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\nexport PATH=$HOME\/.cabal\/bin:$PATH\r\n<\/pre>\n<p>cabal\u3092\u4f7f\u3063\u3066pandoc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ cabal update\r\n$ cabal install pandoc\r\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u3067\u304d\u305f\u3089\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306bMarkdown\u3067\u66f8\u3044\u305f sample.md \u30d5\u30a1\u30a4\u30eb\u306a\u3069\u3092\u7528\u610f\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u7c21\u5358\u306bHTML\u3078\u5909\u63db\u3067\u304d\u307e\u3059\u3002cabal\u30b3\u30de\u30f3\u30c9\u304c\u52d5\u304b\u306a\u3044\u3068\u304d\u306f\u3001$HOME\/.cabal\/bin\/pandoc \u3068\u6307\u5b9a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\npandoc -f markdown -t html sample.md -s -o sample.html\r\n<\/pre>\n<p>Pandoc \u306f Haskell \u306e\u30d1\u30fc\u30b5\u30b3\u30f3\u30d3\u30cd\u30fc\u30bf\u304c\u5f37\u529b\u306a\u305f\u3081\u3001\u591a\u304f\u306e\u30c6\u30ad\u30b9\u30c8\u5909\u63db\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u3044\u3046\u8a71\u3082\u3042\u308a\u307e\u3059\u3002Haskell \u306b\u8208\u5473\u304c\u3042\u308b\u3088\u3046\u3067\u3057\u305f\u3089\u3001\u4e0b\u8a18\u306e\u66f8\u7c4d\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>\u300c\u3059\u3054\u3044H\u672c\u300d\u3068\u3057\u3066\u8a71\u984c\u306b\u306a\u3063\u305f &#8230; <a type=\"amzn\" asin=\"4274068854\">\u3059\u3054\u3044Haskell\u305f\u306e\u3057\u304f\u5b66\u307c\u3046<\/a><\/li>\n<li>\u30a2\u30ab\u30c7\u30df\u30c3\u30af\u306a\u8aac\u660e\u306b\u6163\u308c\u3066\u3044\u3066Haskell\u3092\u5b66\u3073\u305f\u3044\u306a\u3089 &#8230; <a type=\"amzn\" asin=\"4274067815\">\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0Haskell<\/a><\/li>\n<li>Haskell\u3067\u95a2\u6570\u578b\u8a00\u8a9e\u3092\u5b66\u3073\u305f\u3044\u4e2d\u7d1a\u8005\u5411\u3051 &#8230; <a type=\"amzn\" asin=\"4839919623\">\u5165\u9580Haskell\u2015\u306f\u3058\u3081\u3066\u5b66\u3076\u95a2\u6570\u578b\u8a00\u8a9e<\/a><\/li>\n<li>\u30aa\u30e9\u30a4\u30ea\u30fc\u672c\u304c\u597d\u304d\u306a\u3089 &#8230; <a type=\"amzn\" asin=\"4873114233\">Real World Haskell\u2015\u5b9f\u6226\u3067\u5b66\u3076\u95a2\u6570\u578b\u8a00\u8a9e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0<\/a><\/li>\n<\/ul>\n<div>\n<iframe src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4274068854&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;lc1=0000ff&#038;bc1=000000&#038;bg1=ffffff&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><iframe src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4274067815&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><iframe src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4839919623&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;lc1=0000ff&#038;bc1=000000&#038;bg1=ffffff&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><iframe src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4873114233&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Pandoc\u3092\u4f7f\u3046\u3068\u69d8\u3005\u306a\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002Markdown\u3001HTML\u3001epub \u306e\u5909\u63db\u306b\u4f7f\u3048\u305d\u3046\u306a\u306e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[26,676,1209,815,254],"class_list":["post-12512","post","type-post","status-publish","format-standard","hentry","category-linux","tag-centos","tag-haskell","tag-linux","tag-pandoc","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/12512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=12512"}],"version-history":[{"count":4,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/12512\/revisions"}],"predecessor-version":[{"id":12969,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/12512\/revisions\/12969"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=12512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=12512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=12512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}