\expandafter です。
Happy TeXing!
| #!/bin/bash | |
| pandoc -o book.pdf --pdf-engine=lualatex \ | |
| -V papersize=a5 -V documentclass=bxjsbook -V classoption=pandoc \ | |
| -V indent=1zw \ | |
| --number-sections \ | |
| --from=markdown+ignore_line_breaks --to=latex \ | |
| --toc --strip-comments \ | |
| --top-level-division=chapter --standalone \ | |
| chpre.md ch01.md ch02.md ch03.md chpost.md |
| #!/bin/bash | |
| __pandoc="pandoc \ | |
| --from=markdown+ignore_line_breaks --to=latex --strip-comments \ | |
| --number-sections --top-level-division=chapter" # --standalone | |
| for x in ch*.md | |
| do | |
| $__pandoc -o $(basename $x .md).tex $x | |
| done | |
| lualatex main | |
| exit |
| %#!lualatex | |
| \documentclass[lualatex,a5paper,book]{jlreq} | |
| % \usepackage{amsmath,amssymb} | |
| % \usepackage{lmodern} | |
| % | |
| % \usepackage{unicode-math} | |
| % \defaultfontfeatures{Scale=MatchLowercase} | |
| % \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} | |
| % | |
| % % Use upquote if available, for straight quotes in verbatim environments | |
| % \IfFileExists{upquote.sty}{\usepackage{upquote}}{} | |
| % \IfFileExists{microtype.sty}{% use microtype if available | |
| % \usepackage[]{microtype} | |
| % \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts | |
| % }{} | |
| % | |
| % % \setlength{\parindent}{0pt} | |
| % % \setlength{\parskip}{6pt plus 2pt minus 1pt}} | |
| % | |
| % \usepackage{xcolor} | |
| % \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available | |
| \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} | |
| % \urlstyle{same} % disable monospaced font for URLs | |
| % \setlength{\emergencystretch}{3em} % prevent overfull lines | |
| % \providecommand{\tightlist}{% | |
| % \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} | |
| % \setcounter{secnumdepth}{5} | |
| % \usepackage{selnolig} % disable illegal ligatures | |
| \begin{document} | |
| \frontmatter | |
| \include{chpre} | |
| \tableofcontents | |
| \mainmatter | |
| \include{ch01} | |
| \include{ch02} | |
| \include{ch03} | |
| % \appendix | |
| \backmatter | |
| \include{chpost} | |
| %\printindex | |
| \end{document} |