W32TeX ã TeX Live ã§ã¯æ¢ã«æ´æ°ããã¦ããã
- Package BXjscls (CTAN) 1.1açã
Pandoc ã¢ã¼ã
ä¸çªå¤§ããªè¿½å æ©è½ãã³ã¬ãç°¡åã«ããã¨ããPandoc ã§æ¥æ¬èªææ¸ã LaTeX å½¢å¼ï¼ããã³ PDF å½¢å¼ï¼ã«å¤æããéã®ææ¸ã¯ã©ã¹ã¨ã㦠BXJS ã¯ã©ã¹ãå©ç¨ããå ´åã«æé©åãããè¨å®ãã§ãããå®éã«ã¯ã©ã¡ããã¨ããã¨ã
Pandoc ã®æ¨æºã® latex ãã³ãã¬ã¼ãããèªã¿ããã å ´åã«ãï¼æ¥æ¬èªææ¸ã¨ãã¦ï¼ä¸é½åãªãã¨ãèµ·ããã®ãäºåã«åé¿ããè¨å®ãæ½ãããç¹æ®ãª standard ã¢ã¼ã
ã«ç¸å½ãããã ããåºæ¬çãªï¼å¤ããè¦ããï¼æ©è½ã¯ãæ¨æºè¨å®ãï¼standard åæãã©ã¤ãï¼ã¨åãã§ããã
使ãæ¹
pandoc ã¢ã¼ãã使ç¨ããå ´åã¯ãã¯ã©ã¹ãªãã·ã§ã³ã« pandoc
ãä»ããã
\documentclass[pandoc,jafont=ipaex,a4paper]{bxjsarticle}
ãã®ä»ãã¯ã©ã¹ãªãã·ã§ã³ã®æå®ãâæ¨æºè¨å®âã¨ã¯è¥å¹²ç°ãªãã
- ã¨ã³ã¸ã³ãªãã·ã§ã³ã¯æå®ããªããã¨ã³ã¸ã³ã¯èªåå¤å®ãããï¼
autodetect-engine
ã«åºå®ãããï¼ã - åæãã©ã¤ããçç¥ããã常㫠pandoc åæãã©ã¤ãã使ãããï¼æ¢ã«è¿°ã¹ãããã«ãæ©è½çã«ã¯ standard åæãã©ã¤ãã¨åãã§ããï¼ã
ãã¡ãããå®éã¯ãåºåã® TeX ææ¸ã® \docuemtnclass
ãããã«ãªããããã«ãé©åã« pandoc ã®ã³ãã³ããªãã·ã§ã³ãçµã¿ç«ã¦ãå¿
è¦ããããï¼ä¾ãåç
§ãããããï¼
ä¾
ä¾ãã°æ¬¡ã®ãã㪠Markdown ææ¸ãç¨æããã((ãªããå
é ã«ãã %
ã§å§ã¾ãè¡ã¯ Pandoc æ¡å¼µ Markdown ã®ãã¿ã¤ãã«ãããã¯ãï¼title blockï¼ã§ããããã®æ©è½ï¼ã¹ã¤ãã pandoc_title_block
ï¼ã¯æ¢å®ã§æå¹ã«ãªã£ã¦ããã))
% TeXã«é¢ããä½ã % æZR # TeXã¨ã¯ä½ã TeXã¯ã¢ã¬ã # TeXã¨☃ã®é¢ä¿ ☃ãä¸åé¢ä¿ããã¾ããã
ããããLuaLaTeX ãçµç±ãææ¸ã¯ã©ã¹ã¯ï¼Pandoc ã¢ã¼ãã®ï¼bxjsarticleãç¨ç´ãµã¤ãºã¯ A5 縦ãåæãã©ã³ãè¨å®ã¯ ipaexãã¨ããè¨å®ã§ PDF ææ¸ã«å¤æããå ´åã¯ä»¥ä¸ã®ã³ãã³ããå®è¡ããã((å®éã«ã¯ä¸è¡ã§è¨è¿°ããããªããå°ãå¤ãçã® Pandoc ã§ã¯ç¨ç´ãµã¤ãºè¨å®ãã-V papersize=a5paper
ãã¨æ¸ãå¿
è¦ãããã¯ãã§ããã))
pandoc sample.md -o sample.pdf --latex-engine=lualatex -V papersize=a5 -V documentclass=bxjsarticle -V classoption=pandoc -V classoption=jafont=ipaex
åºåã® PDF ææ¸ã¯ä»¥ä¸ã®ããã«ãªãï¼ä¸ä¸ã®ä½ç½ãçãã¦ç¤ºããï¼ã
Pandoc 㧠upLaTeX ãã件
Pandoc ã®ãLaTeX ãä»ãã PDF ææ¸ã¸ã®å¤æãã§ã¯ããµãã¼ãããã¨ã³ã¸ã³ã¯ pdfLaTeXãXeLaTeXãLuaLaTeX ã®ã¿ã§ãããããããPandoc ã§ã¯ãLaTeX ææ¸ã«ãå¤æãããã¨ãã§ããã®ã§ããã® LaTeX ææ¸ã (u)pLaTeX + dvipdfmx 㧠PDF ææ¸ã«å¤æãããã¨ã¯å¯è½ã§ããããããå ã (u)pLaTeX ã Pandoc ã®ãµãã¼ãå¤ã§ããããããLaTeX ã®æ¨æºã®ãã³ãã¬ã¼ãã㯠(u)pLaTeX ã§ã¯æ®éã¯éããªãã
ã¨ããããBXJS ã¯ã©ã¹ã® Pandoc ã¢ã¼ãã§ã¯ããæ¨æºã®ãã³ãã¬ã¼ããã (u)pLaTeX ã§ãéãããã«ç¹å¥ãªèª¿æ´ãããã¦ãããå¾ã£ã¦ãå¥ã®ãã³ãã¬ã¼ããç¨æããå¿ è¦ããªããªãã
å®éã®ä¾ãæãã¦ã¿ãã次ã®ãããªæ¥æ¬èª Markdown ææ¸ããã£ãã¨ããã*1
-
- -
ãã® Markdown ææ¸ããupLaTeX ãçµç±ãææ¸ã¯ã©ã¹ã¯ï¼Pandoc ã¢ã¼ãã®ï¼bxjsbookãç¨ç´ãµã¤ãºã¯ B5 縦ãåæãã©ã³ãè¨å®ã¯ ipaexãç« çªå·ä»ããç®æ¬¡ä»ããã¨ããè¨å®ã§ PDF ææ¸ã«å¤æããå ´åãèããã
ã¾ã以ä¸ã®ã³ãã³ããå®è¡ã㦠Markdown ææ¸ã LaTeX ææ¸ã«å¤æãããï¼--chapters
ãå¿
è¦ãªãã¨ã«æ³¨æã
((--chapters
ã¯ã\chapter
ãããææ¸ã¯ã©ã¹ãç¨ããããã¨ãç¥ããããªãã·ã§ã³ãLaTeX æ¨æºã® book ã¯ã©ã¹ãæå®ããå ´åã¯èªåçã«è£ããããããã以å¤ã§ã¯æ示ããå¿
è¦ããããã¡ãªã¿ã«ã-N
ã¯ãç« çªå·ãä»ããããã¨ã-s
ã¯ããã³ãã¬ã¼ããé©ç¨ãã¦å®å
¨ãª LaTeX ææ¸ãåºåããããã¨ãæ示ãããªãã·ã§ã³ã))ï¼
pandoc yajasicp.md -o yajasicp.tex -s -N --chapters --toc -V papersize=b5 -V documentclass=bxjsbook -V classoption=pandoc -V classoption=jafont=ipaex
ãã®å¾ã¯ãã¤ãã®æé 㧠LaTeX ææ¸ã PDF ææ¸ã«å¤æã§ããã
uplatex yajasicp uplatex yajasicp dvipdfmx yajasicp
ãµãã¿ã¤ãã«æå®
\subtitle
å½ä»¤ã§ãµãã¿ã¤ãã«ãè¨å®ã§ãããããã§è¨å®ãããããã¹ã㯠\maketitle
ã«ãã表é¡åºåã«ããã¦ä½¿ç¨ãããã
ãPandoc ã®ãã³ãã¬ã¼ããã \subtitle
ã¨ããå½ä»¤ã使ç¨ãã¦ããã®ã§ããã«å¯¾å¿ãããã®ã主ãªç®çã§ããããã ããPandco ã¢ã¼ã以å¤ã§ã \subtitle
ã¯å©ç¨ã§ããã
ä¾ãã°ãå è¿°ã® yajasicp.md ã®å ´åãåºåã® LaTeX ææ¸ä¸ã«ã¯ä»¥ä¸ã®è¡ãå«ã¾ããã
\subtitle{SICPããã¹ã¿ã¼ããè²´æ¹ã®ããã«}
\jachar å½ä»¤
XeLaTeX + BXJS ã¯ã©ã¹ã§☃ãå«ãææ¸ãä½ããã¨ããæã次ã®ããã«åç´ã«☃ãæ¸ããã ãã§ã¯åºåãããªãã
\documentclass[xelatex,a5paper,ja=standard,jafont=ipaex]{bxjsarticle} \begin{document} {\TeX}ã¨☃ã¯ä¸åé¢ä¿ããã¾ããããããããã \end{document}
ä¸è¬ã« xeCJKï¼ã¾ã㯠zxjatypeï¼ã使ã£ãæ¥æ¬èªææ¸ã§åãäºãèµ·ããããã®çç±ã¯ãxeCJK ã®è¨å®ã§ã¯ã☃ãã¯æ¬§æã¨ãã¦æ±ãããããã§ãããä»ã®å ´åãåæã®ãã©ã³ãï¼IPAexææï¼ã¯ã☃ãã®åå½¢ããã£ã¦ãããã欧æã®ãã©ã³ãï¼Latin Modern Romanï¼ã¯æã£ã¦ããªãã®ã§ãçµæçã«ã☃ãã¯åºåãããªãã®ã§ããã
ãåæã»æ¬§ææ±ãã®å¶å¾¡ãã®ãµãã¼ãã¯å°æ¥çé¢ç®ã«èããå¿
è¦ããããã¼ãã§ãããæ«å®çãªè§£æ±ºæ段ã¨ãã¦ãBXJS ã¯ã©ã¹ã§ã¯ \jachar
ã¨ããå½ä»¤ãç¨æãããã¤ã¾ã \jachar{<æå1ã¤>}
ã«ããããã®æåãåæã¨ãã¦ï¼åæãã©ã³ãã§ï¼åºåããããï¼âæ¨æºè¨å®âã®æã«ã®ã¿å©ç¨ã§ãããï¼
\documentclass[xelatex,a5paper,ja=standard,jafont=ipaex]{bxjsarticle} \begin{document} {\TeX}ã¨\jachar{☃}ã¯ä¸åé¢ä¿ããã¾ããããããããã \end{document}
ã¡ãªã¿ã«ããã® \jachar
ã¯ã¢ã¬Forum ã®ææ稿ã§è¨åããã¦ããï¼undocumented ãªï¼å½ä»¤ \jsJaChar
ãååãå¤ãã¦å
¬éã«ãããã®ã§ããã((å
ã® \jsJaChar
ã¯ã\jachar
ãå®ç¾©æ¸ãªãããã¨åããããæªå®ç¾©ãªã空ã«ãªããããã±ã¼ã¸ã¬ãã«å
¬éå½ä»¤ã¨ããæ±ãã«ãªã£ã¦ããã))
*1:å é ã«ããã®ã¯ææ¸æ å ±ãè¨ãããYAMLã¡ã¿ãã¼ã¿ãããã¯ãã