{"id":362,"date":"2024-07-08T19:59:48","date_gmt":"2024-07-08T10:59:48","guid":{"rendered":"https:\/\/www.flumen-jp.com\/wordpress\/?p=362"},"modified":"2024-07-13T22:13:49","modified_gmt":"2024-07-13T13:13:49","slug":"pandoc_2","status":"publish","type":"post","link":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/2024\/07\/08\/pandoc_2\/","title":{"rendered":"pandoc (2)"},"content":{"rendered":"\n<p>\u2003<a href=\"https:\/\/pandoc-doc-ja.readthedocs.io\/ja\/latest\/users-guide.html\">pandoc<\/a> \u306e\u7d9a\u304d\u3067 markdown \u304b\u3089 latex \u3078\u306e\u5909\u63db\u3067\u3059\u3002<br>\u3000\u3053\u306e\u51e6\u7406\u3082\u30b5\u30fc\u30c1\u30d1\u30b9\u4e0a\u306b\u914d\u7f6e\u3057\u305f\u6b21\u306e\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3067\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>@echo off\nsetlocal\n\nwhere pandoc &gt; nul\nif not %ERRORLEVEL% equ 0 (\n    echo pandoc not found.\n    goto :eof\n)\nif &quot;%1&quot; == &quot;&quot; (\n    echo transrate markdown to latex.\n    echo   usage : %~n0 [src]\n    goto :eof\n)\nset src=%~n1.md\nif not exist %src% (\n    echo not found %src%.\n    goto :eof\n)\nset dst=%~n1.tex\n\ncall :set_preamble &gt; %dst%\nsed -e &quot;s\/&lt;br&gt;\/\\n\/&quot; -e &quot;s\/^.emsp;\/\/&quot; %src% | ^\npandoc -f markdown -t latex --listings &gt;&gt; %dst%\necho \\end{document} &gt;&gt; %dst%\ngoto :eof\n\n:set_preamble\n    echo \\documentclass[dvipdfmx]{jsarticle}\n    echo \\usepackage{bm}\n    echo \\usepackage[dvipdfmx]{graphicx}\n    echo \\usepackage{ascmac}\n    echo \\usepackage{amsmath}\n    echo \\usepackage[dvipdfmx]{hyperref}\n    echo \\usepackage{pxjahyper}\n\techo \\hypersetup{%%\n\techo     setpagesize=false,%%\n\techo     bookmarks=true,%%\n\techo     bookmarksdepth=tocdepth,%%\n\techo     bookmarksnumbered=true,%%\n\techo     colorlinks=true,%%\n\techo     pdftitle={},%%\n\techo     pdfsubject={},%%\n\techo     pdfauthor={},%%\n\techo     pdfkeywords={}\n\techo }\n\techo \\usepackage{listings}\n\techo \\lstset{%%\n\techo     language={C},%%\n\techo     basicstyle=\\ttfamily,%%\n\techo     identifierstyle={\\small},%%\n\techo     commentstyle={\\small\\itshape},%%\n\techo     keywordstyle={\\small\\bfseries},%%\n\techo     ndkeywordstyle={\\small},%%\n\techo     stringstyle={\\small\\ttfamily},%%\n\techo     frame=single,% frame={tb},%%\n\techo     breaklines=true,%%\n\techo     columns=[l]{fullflexible},%%\n\techo     numbers=left,%%\n\techo     xrightmargin=0zw,%%\n\techo     xleftmargin=3zw,%%\n\techo     numberstyle={\\scriptsize},%%\n\techo     stepnumber=1,%%\n\techo     numbersep=1zw,%%\n\techo     lineskip=-0.5ex%%\n\techo }\n\techo \\newcommand{\\passthrough}[1]{#1}   %% macro of pandoc \n\techo \\newcommand{\\pandocbounded}[1]{#1} %% macro of pandoc \n    echo \\begin{document}\n    exit \/b\n<\/code><\/pre><\/div>\n\n\n\n<p>\u2003\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3067\u306f\u4e00\u6c17\u306b pdf \u307e\u3067\u4f5c\u6210\u3059\u308b\u4f8b\uff08<a href=\"https:\/\/zenn.dev\/hoshi_ophiuchus\/articles\/2016e7234a2852\">\u3053\u308c<\/a>\u3068\u304b<a href=\"https:\/\/qiita.com\/munepi\/items\/7ff9d00505735bd80790\">\u3053\u308c<\/a>\u3068\u304b\uff09\u304c\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u5834\u5408\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3082\u51fa\u6240\u304c\u4e0d\u660e\u3067\u3042\u3063\u305f\u308a\u3001\u51fa\u529b\u304c\u597d\u307f\u306b\u5408\u308f\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u306e\u3067\u79c1\u306f latex \u3078\u306e\u5909\u63db\u306b\u7559\u3081\u3066\u3044\u307e\u3059\u3002<br>\u2003\u3064\u307e\u308a\u3001pandoc \u304c\u5410\u304d\u51fa\u3059\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u524d\u306b\u666e\u6bb5\u4f7f\u3044\u306e\u30d7\u30ea\u30a2\u30f3\u30d6\u30eb\u3092\u3001\u6700\u5f8c\u306b <code><mark style=\"background-color:#b5bdbc\" class=\"has-inline-color\">\\end{document}<\/mark><\/code> \u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001pandoc \u304c\u5909\u63db\u3057\u3066\u304f\u308c\u306a\u3044\u6539\u884c\u3068\u884c\u982d\u306e\u30a4\u30f3\u30c7\u30f3\u30c8\u3092 <a href=\"https:\/\/mebee.info\/2020\/05\/08\/post-10457\/\">sed<\/a> \u3067\u51e6\u7406\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2003pandoc \u306e\u7d9a\u304d\u3067 markdown \u304b\u3089 latex \u3078\u306e\u5909\u63db\u3067\u3059\u3002\u3000\u3053\u306e\u51e6\u7406\u3082\u30b5\u30fc\u30c1\u30d1\u30b9\u4e0a\u306b\u914d\u7f6e\u3057\u305f\u6b21\u306e\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3067\u884c\u3063\u3066\u3044\u307e\u3059\u3002 \u2003\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3067\u306f\u4e00\u6c17\u306b pdf \u307e\u3067\u4f5c\u6210\u3059\u308b\u4f8b\uff08\u3053\u308c\u3068\u304b\u3053\u308c\u3068\u304b\uff09\u304c\u7d39 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[37,12,35],"class_list":["post-362","post","type-post","status-publish","format-standard","hentry","category-it","tag-latex","tag-markdown","tag-pandoc"],"_links":{"self":[{"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=362"}],"version-history":[{"count":11,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"predecessor-version":[{"id":379,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/362\/revisions\/379"}],"wp:attachment":[{"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flumen-jp.com\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}