├── .dockerignore ├── .drone.yml ├── .gitignore ├── .vscode └── tasks.json ├── Dockerfile ├── Dockerfile.aliyun ├── LICENCE ├── Makefile ├── README.md ├── crs ├── README.md └── zh-CN.yaml ├── csl ├── README.md └── chinese-gb7714-2005-numeric.csl ├── demo ├── README.md ├── article │ ├── .gitignore │ ├── .vscode │ │ └── tasks.json │ ├── Makefile │ ├── README.md │ └── src │ │ ├── 100-body.md │ │ ├── bibliography.bib │ │ ├── data │ │ └── usage.csv │ │ └── metadata.yaml ├── beamer │ ├── .gitignore │ ├── Makefile │ ├── README.md │ └── src │ │ ├── 1.md │ │ ├── backmatter.md │ │ ├── bibliography.bib │ │ ├── data │ │ └── usage.csv │ │ ├── frontmatter.md │ │ └── metadata.yaml ├── cv │ ├── .gitignore │ ├── Makefile │ ├── README.md │ └── src │ │ ├── bibliography.bib │ │ ├── cv.md │ │ └── images │ │ └── photo.png ├── cvdemo │ ├── .gitignore │ ├── Makefile │ └── src │ │ ├── bibliography.bib │ │ ├── cv.md │ │ └── images │ │ └── photo.png └── thesis │ ├── .gitignore │ ├── .vscode │ └── tasks.json │ ├── Makefile │ ├── README.md │ └── src │ ├── 100-introduction.md │ ├── 200-pandoc-markdown.md │ ├── 999-afterword.md │ ├── backmatter.md │ ├── bibliography.bib │ ├── data │ └── usage.csv │ ├── frontmatter.md │ └── metadata.yaml ├── extensions ├── abstract │ ├── README.md │ ├── abstract.lua │ ├── abstract.sh │ └── abstract.tex ├── column │ ├── column.sh │ ├── column.tex │ └── fenced_divs_columns.lua ├── copyright │ ├── add-copyright-page.tex │ └── copyright.sh ├── coverletter │ ├── README.md │ ├── coverletter.sh │ └── coverletter.sty ├── device │ ├── device.sh │ └── device.tex ├── fontawesome5 │ ├── README.md │ ├── fontawesome5.sh │ └── moderncviconsawesome.sty ├── grade │ ├── grade.lua │ ├── grade.sh │ └── grade.tex ├── header │ ├── add-header.lua │ └── header.sh ├── ipa │ ├── ipa.lua │ ├── ipa.sh │ └── ipa.tex ├── lineblock │ ├── lineblock.lua │ ├── lineblock.sh │ └── lineblock.tex ├── listings │ ├── listings-set.tex │ ├── listings.sh │ ├── mdframe.tex │ └── noframe.tex ├── longtable │ ├── README.md │ ├── longtable.sh │ └── longtable.sty ├── plot │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── demo.md │ ├── plot.lua │ └── plot.sh ├── tabu │ ├── README.md │ ├── tabu.lua │ ├── tabu.sh │ └── tabu.tex ├── theorem │ ├── color.tex │ ├── en.tex │ ├── tcolorbox-theorem.tex │ ├── theorem.lua │ ├── theorem.sh │ └── zh.tex ├── wrap │ ├── bclogo-wrap.tex │ ├── color.tex │ ├── en.tex │ ├── example-bclogo.tex │ ├── example-tcolorbox.tex │ ├── introduction.tex │ ├── noanswer.tex │ ├── problemset.tex │ ├── tcolorbox-wrap.tex │ ├── wrap.lua │ ├── wrap.sh │ └── zh.tex └── zh_en │ ├── README.md │ ├── both.tex │ ├── en.tex │ ├── zh.tex │ ├── zh_en.lua │ ├── zh_en.sh │ └── zh_en.tex ├── fonts └── DoulosSIL-R.ttf ├── libs ├── core.sh ├── functions.sh └── helper.sh ├── modules ├── art │ ├── Makefile │ ├── art.sh │ └── src │ │ ├── article.md │ │ ├── bibliography.bib │ │ └── metadata.yaml ├── book │ ├── Makefile │ ├── book.sh │ └── src │ │ ├── backmatter.md │ │ ├── bibliography.bib │ │ ├── chapter-01 │ │ └── 01-title.md │ │ ├── chapter-02 │ │ └── 01-title.md │ │ ├── chapter-03 │ │ └── 01-title.md │ │ ├── frontmatter.md │ │ └── metadata.yaml ├── cv │ ├── Makefile │ ├── cv.sh │ └── src │ │ ├── bibliography.bib │ │ ├── cv.md │ │ └── images │ │ └── photo.png ├── slide │ ├── Makefile │ ├── slide.sh │ └── src │ │ ├── bibliography.bib │ │ ├── metadata.yaml │ │ └── slide.md └── thesis │ ├── Makefile │ ├── src │ ├── backmatter.md │ ├── bibliography.bib │ ├── chapter-01 │ │ └── 01-title.md │ ├── chapter-02 │ │ └── 01-title.md │ ├── chapter-03 │ │ └── 01-title.md │ ├── frontmatter.md │ └── metadata.yaml │ └── thesis.sh ├── panbook ├── src ├── backmatter.md ├── bibliography.bib ├── chapter-01 │ └── 100-introduction.md ├── chapter-02 │ ├── 200-markdown.md │ ├── 201-paragraphs.md │ ├── 202-headings.md │ ├── 203-block-quotations.md │ ├── 204-codeblocks.md │ ├── 205-lineblocks.md │ ├── 206-lists.md │ ├── 207-horizontal-rules.md │ ├── 208-tables.md │ ├── 209-metadatablocks.md │ ├── 210-backslash-escapes.md │ ├── 211-inline-formatting.md │ ├── 212-math.md │ ├── 213-rawhtml.md │ ├── 214-latex-macros.md │ ├── 215-links.md │ ├── 216-images.md │ ├── 217-divs-spans.md │ ├── 218-footnotes.md │ ├── 219-citations.md │ └── 220-crossref.md ├── chapter-03 │ ├── 300-extensions.md │ ├── 301-ext-abstract.md │ ├── 302-ext-column.md │ ├── 303-ext-copyright.md │ ├── 304-ext-coverletter.md │ ├── 305-ext-device.md │ ├── 306-ext-fontawesome5.md │ ├── 307-ext-grade.md │ ├── 308-ext-header.md │ ├── 309-ext-lineblock.md │ ├── 310-ext-listings.md │ ├── 311-ext-longtable.md │ ├── 312-ext-tabu.md │ ├── 313-ext-theorem.md │ ├── 314-ext-wrap.md │ ├── 315-ext-zh_en.md │ ├── 316-ext-plot.md │ └── 317-ext-ipa.md ├── chapter-04 │ └── 400-develop.md ├── chapter-zz │ └── 999-afterword.md ├── data │ └── usage.csv ├── frontmatter.md ├── images │ ├── cover.png │ ├── grade.png │ ├── image1.png │ ├── image2.png │ ├── image3.png │ ├── image4.png │ ├── logo.png │ ├── markdown.jpg │ ├── panbook.png │ └── qq.png └── metadata.yaml ├── styles ├── article │ ├── ctexart │ │ └── patch-ctexart.sh │ ├── elegantnote │ │ ├── elegantnote.cls │ │ └── patch-elegantnote.sh │ └── elegantpaper │ │ ├── elegantpaper.cls │ │ └── patch-elegantpaper.sh ├── book │ ├── ctexbook │ │ ├── ctexbook.tpl │ │ ├── images │ │ │ ├── 1.png │ │ │ ├── 10.png │ │ │ ├── 11.png │ │ │ ├── 12.png │ │ │ ├── 13.png │ │ │ ├── 14.png │ │ │ ├── 15.png │ │ │ ├── 16.png │ │ │ ├── 17.png │ │ │ ├── 18.png │ │ │ ├── 19.png │ │ │ ├── 2.png │ │ │ ├── 20.png │ │ │ ├── 21.png │ │ │ ├── 22.png │ │ │ ├── 23.png │ │ │ ├── 24.png │ │ │ ├── 25.png │ │ │ ├── 26.png │ │ │ ├── 27.png │ │ │ ├── 28.png │ │ │ ├── 29.png │ │ │ ├── 3.png │ │ │ ├── 30.png │ │ │ ├── 31.png │ │ │ ├── 32.png │ │ │ ├── 33.png │ │ │ ├── 34.png │ │ │ ├── 35.png │ │ │ ├── 36.png │ │ │ ├── 37.png │ │ │ ├── 38.png │ │ │ ├── 39.png │ │ │ ├── 4.png │ │ │ ├── 40.png │ │ │ ├── 41.png │ │ │ ├── 42.png │ │ │ ├── 43.png │ │ │ ├── 44.png │ │ │ ├── 45.png │ │ │ ├── 46.png │ │ │ ├── 47.png │ │ │ ├── 48.png │ │ │ ├── 49.png │ │ │ ├── 5.png │ │ │ ├── 50.png │ │ │ ├── 51.png │ │ │ ├── 52.png │ │ │ ├── 53.png │ │ │ ├── 54.png │ │ │ ├── 55.png │ │ │ ├── 56.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 59.png │ │ │ ├── 6.png │ │ │ ├── 60.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ └── 9.png │ │ └── patch-ctexbook.sh │ ├── elegantbook │ │ ├── README.md │ │ ├── elegantbook.cls │ │ ├── elegantbook.tpl │ │ ├── figure │ │ │ ├── cover.jpg │ │ │ └── logo.png │ │ └── patch-elegantbook.sh │ ├── epub │ │ ├── css │ │ │ └── epub.css │ │ ├── epub.tpl │ │ └── patch-epub.sh │ └── html5 │ │ ├── css │ │ └── bootstrap-combined.min.css │ │ ├── html5.tpl │ │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ │ └── patch-html5.sh ├── cv │ ├── moderncv │ │ ├── moderncv.lua │ │ ├── moderncv.sh │ │ ├── moderncv.tpl │ │ └── patch-moderncv.sh │ ├── resume │ │ ├── README.md │ │ ├── patch-resume.sh │ │ ├── resume.cls │ │ ├── resume.lua │ │ ├── resume.sh │ │ └── resume.tpl │ └── tmr │ │ ├── README.md │ │ ├── TMR.cls │ │ ├── patch-tmr.sh │ │ ├── tmr.lua │ │ ├── tmr.sh │ │ └── tmr.tpl ├── slide │ ├── Execushares │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── beamerthemeExecushares.sty │ │ └── sample.tex │ ├── HeavenlyClouds │ │ ├── README.md │ │ ├── beamerthemeHeavenlyClouds.sty │ │ ├── cncolours.sty │ │ ├── fix-heavenlyclouds.tex │ │ ├── han │ │ │ ├── han1.pgf │ │ │ ├── han10.pgf │ │ │ ├── han11.pgf │ │ │ ├── han12.pgf │ │ │ ├── han13.pgf │ │ │ ├── han14.pgf │ │ │ ├── han15.pgf │ │ │ ├── han16.pgf │ │ │ ├── han17.pgf │ │ │ ├── han18.pgf │ │ │ ├── han19.pgf │ │ │ ├── han2.pgf │ │ │ ├── han20.pgf │ │ │ ├── han21.pgf │ │ │ ├── han22.pgf │ │ │ ├── han23.pgf │ │ │ ├── han24.pgf │ │ │ ├── han25.pgf │ │ │ ├── han26.pgf │ │ │ ├── han27.pgf │ │ │ ├── han28.pgf │ │ │ ├── han29.pgf │ │ │ ├── han3.pgf │ │ │ ├── han30.pgf │ │ │ ├── han31.pgf │ │ │ ├── han32.pgf │ │ │ ├── han33.pgf │ │ │ ├── han34.pgf │ │ │ ├── han35.pgf │ │ │ ├── han36.pgf │ │ │ ├── han37.pgf │ │ │ ├── han38.pgf │ │ │ ├── han39.pgf │ │ │ ├── han4.pgf │ │ │ ├── han40.pgf │ │ │ ├── han41.pgf │ │ │ ├── han42.pgf │ │ │ ├── han43.pgf │ │ │ ├── han44.pgf │ │ │ ├── han45.pgf │ │ │ ├── han46.pgf │ │ │ ├── han47.pgf │ │ │ ├── han48.pgf │ │ │ ├── han49.pgf │ │ │ ├── han5.pgf │ │ │ ├── han50.pgf │ │ │ ├── han51.pgf │ │ │ ├── han52.pgf │ │ │ ├── han53.pgf │ │ │ ├── han54.pgf │ │ │ ├── han55.pgf │ │ │ ├── han56.pgf │ │ │ ├── han57.pgf │ │ │ ├── han58.pgf │ │ │ ├── han59.pgf │ │ │ ├── han6.pgf │ │ │ ├── han60.pgf │ │ │ ├── han61.pgf │ │ │ ├── han62.pgf │ │ │ ├── han63.pgf │ │ │ ├── han64.pgf │ │ │ ├── han65.pgf │ │ │ ├── han66.pgf │ │ │ ├── han67.pgf │ │ │ ├── han68.pgf │ │ │ ├── han69.pgf │ │ │ ├── han7.pgf │ │ │ ├── han70.pgf │ │ │ ├── han71.pgf │ │ │ ├── han72.pgf │ │ │ ├── han73.pgf │ │ │ ├── han74.pgf │ │ │ ├── han75.pgf │ │ │ ├── han76.pgf │ │ │ ├── han77.pgf │ │ │ ├── han78.pgf │ │ │ ├── han8.pgf │ │ │ └── han9.pgf │ │ ├── lppl-1-3c.txt │ │ ├── patch-HeavenlyClouds.sh │ │ ├── pgflibraryhan.code.tex │ │ └── pgfornament-han.sty │ ├── Hest │ │ ├── Hestgraphics │ │ │ └── aau_logo.pdf │ │ ├── README.md │ │ ├── beamercolorthemeHest.sty │ │ ├── beamerinnerthemeHest.sty │ │ ├── beamerouterthemeHest.sty │ │ ├── beamerthemeHest.sty │ │ ├── example.tex │ │ └── patch-Hest.sh │ ├── Xiaoshan │ │ ├── README.md │ │ ├── beamerthemeXiaoshan.sty │ │ ├── cncolours.sty │ │ ├── lppl-1-3c.txt │ │ ├── pgflibraryhan.code.tex │ │ └── pgfornament-han.sty │ ├── classyslides │ │ ├── .gitignore │ │ ├── DISCLAIMER.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── beamercolorthemeclassyslidesdark.sty │ │ ├── beamercolorthemeclassyslideslight.sty │ │ ├── beamerfontthemeclassyslides.sty │ │ ├── beamerinnerthemeclassyslidesbackgrounds.sty │ │ ├── beamerinnerthemeclassyslidesfooter.sty │ │ ├── beamerinnerthemeclassyslidesheader.sty │ │ ├── beamerthemeclassyslides.sty │ │ ├── beamerthemeclassyslidesbase.sty │ │ └── patch-classyslides.sh │ ├── elegance │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── beamerthemeelegance.sty │ │ ├── example │ │ │ ├── main.tex │ │ │ ├── preamble.tex │ │ │ ├── style │ │ │ │ └── images │ │ │ │ │ └── logo.png │ │ │ └── title.tex │ │ ├── fix-elegance.tex │ │ ├── patch-elegance.sh │ │ ├── screenshots │ │ │ ├── theme-1.png │ │ │ ├── theme-2.png │ │ │ ├── theme-3.png │ │ │ ├── theme-4.png │ │ │ └── theme.xcf │ │ └── style │ │ │ ├── images-circles │ │ │ ├── background-section.pdf │ │ │ ├── background-slide.pdf │ │ │ ├── background-title.pdf │ │ │ └── logo.png │ │ │ ├── images-plasma-56-kver │ │ │ ├── background-section.pdf │ │ │ ├── background-slide.pdf │ │ │ ├── background-title.pdf │ │ │ └── logo.png │ │ │ └── images-simple │ │ │ ├── background-section.pdf │ │ │ ├── background-slide.pdf │ │ │ ├── background-title.pdf │ │ │ └── logo.png │ ├── material │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── beamercolorthemematerial.sty │ │ ├── beamerinnerthemematerial.sty │ │ ├── beamerouterthemematerial.sty │ │ ├── beamerthemematerial.sty │ │ ├── materialDesignExample.tex │ │ └── patch-material.sh │ ├── opensuse │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── beamercolorthemeopensuse.sty │ │ ├── beamerinnerthemeopensuse.sty │ │ ├── beamerouterthemeopensuse.sty │ │ ├── beamerthemeopensuse.sty │ │ ├── fix-opensuse.tex │ │ ├── main.tex │ │ ├── opensuse-logo.png │ │ └── patch-opensuse.sh │ └── solarized │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── README.md │ │ ├── beamerthemesolarized.sty │ │ ├── latex_style │ │ ├── README.md │ │ ├── example.tex │ │ ├── gitignore │ │ ├── notations.sty │ │ └── packages.sty │ │ └── skeleton.tex └── thesis │ ├── hnu │ ├── Makefile │ ├── README.md │ ├── example.tex │ ├── figures │ │ ├── hnu_black.png │ │ ├── hnu_gray.png │ │ └── hnu_title.png │ ├── hnuthesis.cls │ ├── patch-hnu.sh │ └── style │ │ ├── abstract.sty │ │ ├── chapter.sty │ │ └── cover.sty │ └── thesis │ ├── Makefile │ ├── README.md │ ├── example.tex │ ├── figure │ └── logo.png │ ├── patch-thesis.sh │ ├── thesis.cls │ └── thesis.tex ├── templates └── latex │ ├── README.md │ └── latex.tpl ├── test ├── argparse │ └── test.sh ├── backmatter │ └── test.tex ├── beamer │ ├── .gitignore │ ├── 1.md │ └── Makefile ├── citation │ ├── .gitignore │ ├── Makefile │ ├── chinese-gb7714-2005-numeric.csl │ ├── test-pandoc.md │ ├── test-pandoc.tex │ ├── test.bib │ └── test.tex ├── cls │ ├── mytest │ │ ├── mytest.cls │ │ └── test.tex │ └── src │ │ ├── 1.md │ │ ├── backmatter.md │ │ ├── frontmatter.md │ │ └── metadata.yaml ├── columns │ ├── .gitignore │ ├── README.md │ ├── beamer.md │ ├── fenced_divs_columns.lua │ ├── support-columns-env.tex │ └── test.tex ├── context │ ├── .gitignore │ ├── 1.tex │ ├── 2.md │ ├── 2.tex │ └── Makefile ├── cover-tikz │ ├── .gitignore │ ├── Makefile │ └── pgf2-titlepage.tex ├── cover-titlepage │ ├── .gitignore │ ├── 1.tex │ └── Makefile ├── coverletter │ ├── .gitignore │ ├── coverletter.sty │ ├── resume.cls │ └── test.tex ├── cross-reference │ ├── .gitignore │ ├── Makefile │ ├── README.md │ └── header.tex ├── ctex │ ├── .gitignore │ ├── 1.tex │ ├── 2.tex │ └── Makefile ├── cv │ ├── .gitignore │ ├── Makefile │ ├── cv.lua │ ├── cv.md │ ├── moderncv.tex │ └── your-new-cv.tex ├── elegantlatex │ ├── .gitignore │ ├── 1.md │ └── Makefile ├── elegantpaper │ ├── 1.md │ ├── Makefile │ └── test.tex ├── fenced_divs │ ├── README.md │ └── fenced_divs.md ├── float-listings │ └── 1.md ├── footnotes │ └── 1.md ├── highlight │ ├── .gitignore │ ├── 1.md │ ├── Makefile │ ├── README.md │ └── minted.lua ├── lstinline │ └── test.tex ├── lua-filters │ ├── dot2image │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── dot2image.lua │ │ └── test.md │ ├── macro-substitution │ │ ├── Makefile │ │ ├── macro-substitution.lua │ │ ├── result.md │ │ └── test.md │ ├── metadata │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README.md │ │ ├── add-header.lua │ │ ├── headers.tex │ │ ├── inspect.lua │ │ ├── merge-meta.lua │ │ └── metadata-file.yaml │ └── worldcount │ │ ├── .gitignore │ │ ├── test.md │ │ └── worldcount.lua ├── parseYaml │ └── test.sh ├── pptx │ ├── .gitignore │ └── 1.md ├── shell_array │ └── test.sh ├── table │ ├── Makefile │ ├── grid.md │ ├── multiline.md │ ├── nocaption.md │ ├── nohead.md │ ├── pipe.md │ ├── simple.md │ ├── tabu.lua │ └── test.tex ├── tcolorbox │ └── 1.tex ├── test-list │ └── README.md ├── theorem-env │ ├── .gitignore │ ├── .vscode │ │ └── tasks.json │ ├── 1.tex │ ├── 2.tex │ ├── Makefile │ ├── README.md │ └── src │ │ ├── 1.md │ │ ├── backmatter.md │ │ ├── bibliography.bib │ │ ├── frontmatter.md │ │ └── metadata.yaml ├── thesis │ ├── .gitignore │ ├── test.tex │ └── thesis.cls ├── thuthesis │ ├── .gitignore │ ├── README.md │ ├── data │ │ ├── ack.tex │ │ ├── appendix01.tex │ │ ├── chap01.tex │ │ ├── chap02.tex │ │ ├── cover.tex │ │ ├── denotation.tex │ │ └── resume.tex │ ├── main.tex │ ├── ref │ │ └── refs.bib │ ├── thuthesis-author-year.bst │ ├── thuthesis-bachelor.bst │ └── thuthesis-numeric.bst ├── wallpaper │ ├── .gitignore │ ├── 1.md │ ├── Makefile │ └── titlepage.tex └── wrap │ ├── .gitignore │ ├── .vscode │ └── tasks.json │ ├── Makefile │ └── src │ ├── 100-body.md │ ├── backmatter.md │ ├── bibliography.bib │ ├── frontmatter.md │ └── metadata.yaml └── tools ├── ci └── .drone.yml ├── docker └── texlive-fontconfig.conf ├── lua ├── README.md └── table_print.lua ├── notepadplusplus ├── README.md └── markdownviewerplusplus.css ├── rsync ├── Dockerfile ├── Makefile ├── README.md ├── a.pdf └── pub.sh └── vscode └── snippets └── markdown.json /.dockerignore: -------------------------------------------------------------------------------- 1 | build 2 | .git 3 | test -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.gz 3 | *.toc 4 | *.log 5 | *.out 6 | build 7 | *.pdf 8 | *.fdb_latexmk 9 | *.fls 10 | *.xdv 11 | *.dvi 12 | *.thm -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "PanBook Part Compile", 8 | "type": "shell", 9 | "command": "panbook book --part='${relativeFileDirname}'/${fileBasename} && start build/part.pdf", 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /crs/README.md: -------------------------------------------------------------------------------- 1 | # pandoc-crossref-settings -------------------------------------------------------------------------------- /crs/zh-CN.yaml: -------------------------------------------------------------------------------- 1 | figureTitle: "图" 2 | tableTitle: "表" 3 | listingTitle: "代码" 4 | lofTitle: "插图列表" 5 | lotTitle: "表格列表" 6 | lolTitle: "代码列表" 7 | lstPrefix: "代码" 8 | figPrefix: "图" 9 | eqnPrefix: "公式" 10 | tblPrefix: "表" 11 | secPrefix: "章节" 12 | linkReferences: true -------------------------------------------------------------------------------- /csl/README.md: -------------------------------------------------------------------------------- 1 | # CSL files 2 | 3 | ## 参考文献格式 .csl 文件 4 | `.csl` 格式的文件用来制定版式,这是一种专门用来排版参考文献格式的文件。 5 | 6 | - [GitHub主页](https://github.com/citation-style-language/styles) 7 | - [Zoreto](http://zotero.org/styles) 8 | 9 | 包括了大量期刊模板或标准,下载即可用。 10 | 11 | 中文论文常用`GB/T 7714-2015` 格式的文件 12 | -------------------------------------------------------------------------------- /demo/README.md: -------------------------------------------------------------------------------- 1 | # 非书籍模板演示 -------------------------------------------------------------------------------- /demo/article/.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.gz 3 | *.toc 4 | *.log 5 | *.out 6 | build 7 | *.pdf -------------------------------------------------------------------------------- /demo/article/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "PanBook Part Compile", 8 | "type": "shell", 9 | "command": "panbook book --part=${fileBasename} && start build/part.pdf", 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /demo/article/Makefile: -------------------------------------------------------------------------------- 1 | DEBUG ?= 2 | SERVER ?= panbook.annhe.net 3 | CJK ?= -V CJKmainfont:思源宋体 -V CJKoptions:BoldFont=Source\ Han\ Serif\ SC\ Heavy,ItalicFont=FandolKai,SmallCapsFont=思源黑体 4 | 5 | all: build clean 6 | build: ctexart elegantnote elegantpaper 7 | 8 | ctexart: 9 | panbook art $(DEBUG) $(CJK) 10 | elegantnote: 11 | panbook art --style=elegantnote $(DEBUG) $(CJK) 12 | elegantpaper: 13 | panbook art --style=elegantpaper $(DEBUG) $(CJK) 14 | link: 15 | for item in `panbook art -l`;do echo "- [$$item](https://$(SERVER)/pub/article-art-$$item.pdf)";done 16 | 17 | clean: 18 | panbook clean -------------------------------------------------------------------------------- /demo/article/README.md: -------------------------------------------------------------------------------- 1 | # Article 2 | 3 | - [ctexart](https://panbook.annhe.net/pub/article-art-ctexart.pdf) 4 | - [elegantnote](https://panbook.annhe.net/pub/article-art-elegantnote.pdf) 5 | - [elegantpaper](https://panbook.annhe.net/pub/article-art-elegantpaper.pdf) -------------------------------------------------------------------------------- /demo/article/src/bibliography.bib: -------------------------------------------------------------------------------- 1 | @panbook{ 2 | pandocManual, 3 | author = {John MacFarlane}, 4 | title = {Pandoc User Manual}, 5 | year = {2019}, 6 | howpublished = {\url{https://pandoc.org/MANUAL.html}} 7 | } 8 | 9 | @BOOK{ 10 | baz, 11 | title = {Dummy Book}, 12 | publisher = {Egypt}, 13 | year = {321}, 14 | author = {The King} 15 | } 16 | 17 | @BOOK{ 18 | foz, 19 | title = {Test Dummy Book}, 20 | publisher = {China}, 21 | year = {1321}, 22 | author = {Hello King} 23 | } 24 | 25 | @BOOK{ 26 | panbook, 27 | title = {PanBook使用手册}, 28 | publisher = {PanBook}, 29 | year = {2019}, 30 | author = {Ann He}, 31 | howpublished = {\url{https://panbook.annhe.net/pub/PanBook-book-ctexbook-pc.pdf}} 32 | } -------------------------------------------------------------------------------- /demo/article/src/data/usage.csv: -------------------------------------------------------------------------------- 1 | Year,Internet Explorer,Chrome,Firefox,Safari 2 | 2009,65.41,1.38,27.03,2.57 3 | 2010,55.25,6.04,31.64,3.76 4 | 2011,46.00,15.68,30.68,5.09 5 | 2012,37.45,28.40,24.78,6.62 6 | 2013,30.71,36.52,21.42,8.29 7 | 2014,22.85,43.67,18.90,9.73 8 | 2015,19.28,48.15,16.96,10.28 -------------------------------------------------------------------------------- /demo/article/src/metadata.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | title: 基于 Markdown 的论文写作方法 3 | author: # 作者(数组) 4 | - 作者 5 | - 作者2 6 | date: \today # 日期 7 | lof: false # 是否生成插图列表页 8 | lot: false # 是否生成表格列表页 9 | toc: false 10 | homepage: https://github.com/annProg/PanBook 11 | nocite: | 12 | @pandocManual,@foz 13 | ... -------------------------------------------------------------------------------- /demo/beamer/.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.gz 3 | *.toc 4 | *.log 5 | *.out 6 | build 7 | -------------------------------------------------------------------------------- /demo/beamer/Makefile: -------------------------------------------------------------------------------- 1 | SERVER ?= panbook.annhe.net 2 | USER ?= root 3 | PORT ?= 22 4 | DIR ?= /PanBook 5 | 6 | THEME ?= metropolis 7 | CONVERT ?= /mingw64/bin/convert 8 | CJK ?= -V CJKmainfont:思源宋体 -V CJKoptions:BoldFont=Source\ Han\ Serif\ SC\ Heavy,ItalicFont=FandolKai,SmallCapsFont=思源黑体 9 | 10 | run: 11 | panbook slide --style=$(THEME) $(CJK) 12 | all-theme: 13 | for id in `panbook slide -l`;do echo "Compile $$id ..";panbook slide --style=$$id $(CJK) || exit 1;done 14 | panbook slide --style=metropolis $(CJK) 15 | png: 16 | cd build && mkdir all-beamer && mkdir all-beamer-title && \ 17 | for item in `ls *.pdf`;do \ 18 | theme=`echo $$item | sed 's/.pdf//g'`;\ 19 | pdftocairo -png $$item $$theme;\ 20 | $(CONVERT) -append $$theme-*.png all-beamer/$$theme.png;\ 21 | mv $$theme-1.png all-beamer-title/$${theme}0.png;\ 22 | rm -f $$theme-*.png;\ 23 | done 24 | link: 25 | for item in metropolis `panbook slide -l`;do echo "- [$$item](https://$(SERVER)/pub/beamer-slide-$$item.pdf)";done 26 | online: 27 | scp -P $(PORT) build/beamer-*.pdf $(USER)@$(SERVER):$(DIR) 28 | 29 | single: 30 | scp -P $(PORT) build/beamer-slide-$(THEME).pdf $(USER)@$(SERVER):$(DIR) -------------------------------------------------------------------------------- /demo/beamer/README.md: -------------------------------------------------------------------------------- 1 | # beamer 2 | 3 | 演示: 4 | 5 | - [metropolis](https://panbook.annhe.net/pub/beamer-slide-metropolis.pdf) 6 | - [classyslides](https://panbook.annhe.net/pub/beamer-slide-classyslides.pdf) 7 | - [elegance](https://panbook.annhe.net/pub/beamer-slide-elegance.pdf) 8 | - [Execushares](https://panbook.annhe.net/pub/beamer-slide-Execushares.pdf) 9 | - [HeavenlyClouds](https://panbook.annhe.net/pub/beamer-slide-HeavenlyClouds.pdf) 10 | - [Hest](https://panbook.annhe.net/pub/beamer-slide-Hest.pdf) 11 | - [material](https://panbook.annhe.net/pub/beamer-slide-material.pdf) 12 | - [opensuse](https://panbook.annhe.net/pub/beamer-slide-opensuse.pdf) 13 | - [solarized](https://panbook.annhe.net/pub/beamer-slide-solarized.pdf) 14 | - [Xiaoshan](https://panbook.annhe.net/pub/beamer-slide-Xiaoshan.pdf) -------------------------------------------------------------------------------- /demo/beamer/src/backmatter.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/annProg/PanBook/eed32263a6dc8c471812b884af1ba7f7a4568a74/demo/beamer/src/backmatter.md -------------------------------------------------------------------------------- /demo/beamer/src/bibliography.bib: -------------------------------------------------------------------------------- 1 | @panbook{ 2 | pandocManual, 3 | author = {John MacFarlane}, 4 | title = {Pandoc User Manual}, 5 | year = {2019}, 6 | howpublished = {\url{https://pandoc.org/MANUAL.html}} 7 | } 8 | 9 | @BOOK{ 10 | baz, 11 | title = {Dummy Book}, 12 | publisher = {Egypt}, 13 | year = {321}, 14 | author = {The King} 15 | } 16 | 17 | @BOOK{ 18 | foz, 19 | title = {Test Dummy Book}, 20 | publisher = {China}, 21 | year = {1321}, 22 | author = {Hello King} 23 | } 24 | 25 | @BOOK{ 26 | panbook, 27 | title = {PanBook使用手册}, 28 | publisher = {PanBook}, 29 | year = {2019}, 30 | author = {Ann He}, 31 | howpublished = {\url{https://panbook.annhe.net/pub/PanBook-book-ctexbook-pc.pdf}} 32 | } -------------------------------------------------------------------------------- /demo/beamer/src/data/usage.csv: -------------------------------------------------------------------------------- 1 | Year,Internet Explorer,Chrome,Firefox,Safari 2 | 2009,65.41,1.38,27.03,2.57 3 | 2010,55.25,6.04,31.64,3.76 4 | 2011,46.00,15.68,30.68,5.09 5 | 2012,37.45,28.40,24.78,6.62 6 | 2013,30.71,36.52,21.42,8.29 7 | 2014,22.85,43.67,18.90,9.73 8 | 2015,19.28,48.15,16.96,10.28 -------------------------------------------------------------------------------- /demo/beamer/src/frontmatter.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/annProg/PanBook/eed32263a6dc8c471812b884af1ba7f7a4568a74/demo/beamer/src/frontmatter.md -------------------------------------------------------------------------------- /demo/beamer/src/metadata.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | title: 基于 PanBook 的幻灯片方案 3 | subtitle: 用 Markdown 制作 Beamer 幻灯片 4 | author: # 作者(数组) 5 | - An He 6 | date: \today # 日期 7 | authortitle: 软件工程师 8 | organization: PanBook 9 | institute: 10 | - PanBook 11 | location: Beijing China 12 | ... -------------------------------------------------------------------------------- /demo/cv/.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.gz 3 | *.toc 4 | *.log 5 | *.out 6 | build 7 | -------------------------------------------------------------------------------- /demo/cv/README.md: -------------------------------------------------------------------------------- 1 | # CV 2 | 3 | ## moderncv 4 | 5 | - [moderncv-classic](https://panbook.annhe.net/pub/cv-cv-moderncv-classic-blue.pdf) 6 | - [moderncv-banking](https://panbook.annhe.net/pub/cv-cv-moderncv-banking-blue.pdf) 7 | - [moderncv-casual](https://panbook.annhe.net/pub/cv-cv-moderncv-casual-blue.pdf) 8 | - [moderncv-oldstyle](https://panbook.annhe.net/pub/cv-cv-moderncv-oldstyle-blue.pdf) 9 | - [moderncv-fancy](https://panbook.annhe.net/pub/cv-cv-moderncv-fancy-blue.pdf) 10 | 11 | ## resume 12 | 13 | - [resume](https://panbook.annhe.net/pub/cv-cv-resume.pdf) 14 | 15 | ## TMR 16 | 17 | - [TMR](https://panbook.annhe.net/pub/cv-cv-tmr.pdf) -------------------------------------------------------------------------------- /demo/cv/src/bibliography.bib: -------------------------------------------------------------------------------- 1 | @panbook{ 2 | pandocManual, 3 | author = {PanBook}, 4 | title = {PanBook User Manual}, 5 | year = {2019} 6 | } 7 | 8 | @BOOK{ 9 | baz, 10 | title = {盘书用户手册}, 11 | publisher = {PanBook}, 12 | year = {2019}, 13 | author = {Ann} 14 | } 15 | 16 | @article{计算机网络安全基础, 17 | title={计算机网络安全讲义}, 18 | author={张三 and 李四}, 19 | journal={信息网络安全}, 20 | number={3}, 21 | pages={35-35}, 22 | year={2023}, 23 | } -------------------------------------------------------------------------------- /demo/cv/src/images/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/annProg/PanBook/eed32263a6dc8c471812b884af1ba7f7a4568a74/demo/cv/src/images/photo.png -------------------------------------------------------------------------------- /demo/cvdemo/.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.gz 3 | *.toc 4 | *.log 5 | *.out 6 | build 7 | -------------------------------------------------------------------------------- /demo/cvdemo/Makefile: -------------------------------------------------------------------------------- 1 | STYLE ?= classic 2 | COLOR ?= burgundy 3 | ALL_STYLE=classic banking casual oldstyle fancy 4 | ALL_COLOR=blue orange green red purple grey black burgundy 5 | CJKMAIN=CJKmainfont:思源宋体 6 | CJKOPT=CJKoptions:BoldFont=思源黑体,ItalicFont=KaiTi,SmallCapsFont=微软雅黑 7 | CJK=-V $(CJKMAIN) -V $(CJKOPT) 8 | all: moderncv-all resume tmr clean 9 | moderncv: 10 | panbook cv -M style:$(STYLE) -M color:$(COLOR) $(CJK) 11 | moderncv-styles: 12 | for style in `echo $(ALL_STYLE)`;do \ 13 | panbook cv -M style:$$style -M color:$(COLOR) -V onlinecv: -V showdate: $(CJK); \ 14 | done 15 | moderncv-all: 16 | for style in `echo $(ALL_STYLE)`;do \ 17 | for color in `echo $(ALL_COLOR)`;do \ 18 | panbook cv -M style:$$style -M color:$$color -V onlinecv: -V showdate: $(CJK); \ 19 | done \ 20 | done 21 | resume: 22 | panbook cv --style=resume $(CJK) 23 | 24 | tmr: 25 | panbook cv --style=tmr $(CJK) 26 | 27 | png: 28 | cd build;for pdf in `ls cvdemo-cv-*.pdf`; do \ 29 | pdftocairo -png $$pdf; \ 30 | done 31 | 32 | clean: 33 | panbook clean -------------------------------------------------------------------------------- /demo/cvdemo/src/bibliography.bib: -------------------------------------------------------------------------------- 1 | @cv{latexcv, 2 | title={A Curriculum Vit\ae\ generation method based on Markdown and Pandoc}, 3 | author={姓名}, 4 | year={2019} 5 | } 6 | 7 | @cv{bigbang, 8 | title={I have a Master's Degree not Dr. Wolowitz but Astronaut Wolowitz}, 9 | author={Howard Joel Wolowitz}, 10 | year={2019} 11 | } 12 | -------------------------------------------------------------------------------- /demo/cvdemo/src/images/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/annProg/PanBook/eed32263a6dc8c471812b884af1ba7f7a4568a74/demo/cvdemo/src/images/photo.png -------------------------------------------------------------------------------- /demo/thesis/.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.gz 3 | *.toc 4 | *.log 5 | *.out 6 | build 7 | *.pdf -------------------------------------------------------------------------------- /demo/thesis/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "PanBook Part Compile", 8 | "type": "shell", 9 | "command": "panbook book --part=${fileBasename} && start build/part.pdf", 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /demo/thesis/Makefile: -------------------------------------------------------------------------------- 1 | SERVER ?= panbook.annhe.net 2 | CJK ?= -V CJKmainfont:思源宋体 -V CJKoptions:BoldFont=Source\ Han\ Serif\ SC\ Heavy,ItalicFont=FandolKai,SmallCapsFont=思源黑体 3 | 4 | all: thesis 5 | 6 | thesis: 7 | panbook thesis $(CJK) 8 | 9 | link: 10 | for item in `panbook thesis -l`;do echo "- [$$item](https://$(SERVER)/pub/thesis-thesis-$$item.pdf)";done 11 | 12 | clean: 13 | panbook clean -------------------------------------------------------------------------------- /demo/thesis/README.md: -------------------------------------------------------------------------------- 1 | # Thesis 2 | 3 | - [thesis](https://panbook.annhe.net/pub/thesis-thesis-thesis.pdf) -------------------------------------------------------------------------------- /demo/thesis/src/999-afterword.md: -------------------------------------------------------------------------------- 1 | 2 | # 致谢 {-} 3 | 4 | 章节带 `{.unnumbered}` 属性,或者直接用 `{-}`,表示标题不作为章节来编号,适用于结尾 致谢,参考文献,附录等场景。比如以下例子: 5 | 6 | ```markdown 7 | # 致谢 {-} 8 | 9 | ::: {#refs} 10 | # 参考文献 {-} 11 | ::: 12 | ``` 13 | 14 | ::: {#refs} 15 | # 参考文献 {-} 16 | ::: -------------------------------------------------------------------------------- /demo/thesis/src/backmatter.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/annProg/PanBook/eed32263a6dc8c471812b884af1ba7f7a4568a74/demo/thesis/src/backmatter.md -------------------------------------------------------------------------------- /demo/thesis/src/bibliography.bib: -------------------------------------------------------------------------------- 1 | @panbook{ 2 | pandocManual, 3 | author = {John MacFarlane}, 4 | title = {Pandoc User Manual}, 5 | year = {2019}, 6 | howpublished = {\url{https://pandoc.org/MANUAL.html}} 7 | } 8 | 9 | @BOOK{ 10 | panbook, 11 | title = {PanBook使用手册}, 12 | publisher = {PanBook}, 13 | year = {2019}, 14 | author = {Ann He}, 15 | howpublished = {\url{https://panbook.annhe.net/pub/PanBook-book-ctexbook-pc.pdf}} 16 | } -------------------------------------------------------------------------------- /demo/thesis/src/data/usage.csv: -------------------------------------------------------------------------------- 1 | Year,Internet Explorer,Chrome,Firefox,Safari 2 | 2009,65.41,1.38,27.03,2.57 3 | 2010,55.25,6.04,31.64,3.76 4 | 2011,46.00,15.68,30.68,5.09 5 | 2012,37.45,28.40,24.78,6.62 6 | 2013,30.71,36.52,21.42,8.29 7 | 2014,22.85,43.67,18.90,9.73 8 | 2015,19.28,48.15,16.96,10.28 -------------------------------------------------------------------------------- /demo/thesis/src/metadata.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | title: 基于 Markdown 的论文写作方法 3 | etitle: A Thesis Writing Method Based On Markdown 4 | author: # 作者(数组) 5 | - 作者 6 | xuehao: 201907131122 7 | college: 计算机学院 8 | supervisor: \LaTeX 教授 9 | date: \today # 日期 10 | lof: false # 是否生成插图列表页 11 | lot: false # 是否生成表格列表页 12 | # 不引用,但是显示在参考文献列表里。通配符 @* 表示全部在列表里显示 13 | nocite: | 14 | @pandocManual,@foz 15 | ... -------------------------------------------------------------------------------- /extensions/abstract/README.md: -------------------------------------------------------------------------------- 1 | # abstract 标准结构 2 | 3 | LaTeX 4 | 5 | ```latex 6 | \begin{abstract}{语言}{关键词} 7 | 摘要 8 | \end{abstract} 9 | ``` 10 | 11 | Markdown 12 | 13 | ```markdown 14 | ::: {.abstract . 语言 keywords="关键词"} 15 | 摘要 16 | ::: 17 | 18 | `. 语言` 可以为 `.c`(中文)或者 `.e`(英文) 19 | 缺省为 `.c` 20 | ``` -------------------------------------------------------------------------------- /extensions/abstract/abstract.lua: -------------------------------------------------------------------------------- 1 | function Div(el) 2 | if el.attr.classes[1] == "abstract" then 3 | local ret = pandoc.Div({}) 4 | local abstract = "\\begin{abstract}" 5 | if el.attr.classes[2] == "e" then 6 | abstract = abstract .. "{e}" 7 | else 8 | abstract = abstract .. "{c}" 9 | end 10 | 11 | if el.attr.attributes["keywords"] ~= nil then 12 | abstract = abstract .. "{" .. el.attr.attributes["keywords"] .. "}" 13 | end 14 | table.insert(ret.content, pandoc.RawBlock("latex", abstract)) 15 | table.insert(ret.content, el) 16 | table.insert(ret.content, pandoc.RawBlock("latex", "\\end{abstract}")) 17 | return ret 18 | end 19 | end -------------------------------------------------------------------------------- /extensions/abstract/abstract.sh: -------------------------------------------------------------------------------- 1 | regext abstract 2 | getArrayVar _G "ext-abstract" `enableExt 01100` 3 | getArrayVar _G "ext-abstract-tex" "$SCRIPTDIR/${_G[extdir]}/abstract/abstract.tex" 4 | 5 | function ext_abstract() { 6 | # 依赖add header功能 7 | if [ "${_G[ext-abstract]}"x == "true"x -a "${_G[ext-header]}"x == "true"x ];then 8 | writeHeader ${_G[ext-abstract-tex]} 9 | _F[abstract]="--lua-filter $SCRIPTDIR/${_G[extdir]}/abstract/abstract.lua" 10 | 11 | extStat abstract done 12 | else 13 | extStat abstract skip 14 | fi 15 | } 16 | 17 | function ext_abstract_help() { 18 | echo -e "\t-G ext-abstract: enable abstract(default true)" 19 | echo -e "\t-G ext-abstract-tex: change abstract set file" 20 | exit 0 21 | } -------------------------------------------------------------------------------- /extensions/abstract/abstract.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/annProg/PanBook/eed32263a6dc8c471812b884af1ba7f7a4568a74/extensions/abstract/abstract.tex -------------------------------------------------------------------------------- /extensions/column/column.sh: -------------------------------------------------------------------------------- 1 | regext column 2 | getArrayVar _G "ext-column" `enableExt 11101` 3 | getArrayVar _G ext-column-tex "$SCRIPTDIR/${_G[extdir]}/column/column.tex" 4 | 5 | function ext_column() { 6 | if [ "${_G[ext-column]}"x == "true"x -a "${_G[ext-header]}"x == "true"x ];then 7 | writeHeader "${_G[ext-column-tex]}" 8 | _F[column]="--lua-filter $SCRIPTDIR/${_G[extdir]}/column/fenced_divs_columns.lua" 9 | 10 | extStat column done 11 | else 12 | extStat column skip 13 | fi 14 | } 15 | 16 | function ext_column_help() { 17 | echo -e "\t-G ext-column: enable column(default true)" 18 | exit 0 19 | } -------------------------------------------------------------------------------- /extensions/column/column.tex: -------------------------------------------------------------------------------- 1 | \newenvironment{columns}[1][1.5em] 2 | {\noindent\begin{minipage}{\textwidth}\vspace{#1}} 3 | {\vspace{1.5em}\end{minipage}} 4 | \newenvironment{column}[1] 5 | {\begin{minipage}[t]{#1}} 6 | {\end{minipage}\quad} -------------------------------------------------------------------------------- /extensions/copyright/copyright.sh: -------------------------------------------------------------------------------- 1 | regext copyright 2 | getArrayVar _G "ext-copyright" `enableExt 10000` 3 | getArrayVar _G ext-copyright-tex "$SCRIPTDIR/${_G[extdir]}/copyright/add-copyright-page.tex" 4 | 5 | function ext_copyright() { 6 | getArrayVar _V licence "ccncnd" 7 | if [ "${_G[ext-copyright]}"x == "true"x -a "${_G[ext-header]}"x == "true"x ];then 8 | writeHeader "${_G[ext-copyright-tex]}" 9 | extStat copyright done 10 | else 11 | extStat copyright skip 12 | fi 13 | } 14 | 15 | function ext_copyright_help() { 16 | echo -e "\t-G ext-copyright: enable copyright(default true)" 17 | echo -e "\t-G ext-copyright-tex: change copyright sty file" 18 | exit 0 19 | } -------------------------------------------------------------------------------- /extensions/coverletter/README.md: -------------------------------------------------------------------------------- 1 | # coverletter 2 | 3 | 有些简历模板没有带coverletter,可借用此扩展实现。此扩展实现的`coverletter.sty`修改自morderncv。 4 | 5 | 须在模板中调用$name$时同时调用 \myname 6 | -------------------------------------------------------------------------------- /extensions/coverletter/coverletter.sh: -------------------------------------------------------------------------------- 1 | regext coverletter 2 | getArrayVar _G "ext-coverletter" `enableExt 00001` 3 | getArrayVar _G "ext-coverletter-sty" "$SCRIPTDIR/${_G[extdir]}/coverletter/coverletter.sty" 4 | 5 | function ext_coverletter() { 6 | if [ "${_G[ext-coverletter]}"x == "true"x ];then 7 | cp ${_G[ext-coverletter-sty]} ${_G[build]} 8 | echo -e "\n\\usepackage{coverletter}\n" >> ${_G[header]} 9 | 10 | extStat coverletter done 11 | else 12 | extStat coverletter skip 13 | fi 14 | } 15 | 16 | function ext_coverletter_help() { 17 | echo -e "\t-G ext-coverletter: enable coverletter(default true)" 18 | echo -e "\t-G ext-coverletter-sty: change coverletter sty file" 19 | exit 0 20 | } -------------------------------------------------------------------------------- /extensions/device/device.sh: -------------------------------------------------------------------------------- 1 | regext device 2 | getArrayVar _G "ext-device" `enableExt 10000` 3 | getArrayVar _G "ext-device-tex" "$SCRIPTDIR/${_G[extdir]}/device/device.tex" 4 | 5 | function device() { 6 | echo ${_V[device]} |grep -wE "pc|mobile|kindle" &>/dev/null && r=0 || r=1 7 | if [ $r -eq 0 ];then 8 | echo "\device${_V[device]}" >> ${_G[header]} 9 | else 10 | echo "\devicepc" >> ${_G[header]} 11 | fi 12 | } 13 | 14 | function ext_device() { 15 | # 依赖add header功能 16 | if [ "${_G[ext-device]}"x == "true"x -a "${_G[ext-header]}"x == "true"x ];then 17 | writeHeader ${_G[ext-device-tex]} 18 | device 19 | 20 | extStat device done 21 | else 22 | extStat device skip 23 | fi 24 | } 25 | 26 | function ext_device_help() { 27 | echo -e "\t-G ext-device: enable device(default true)" 28 | echo -e "\t-G ext-device-tex: change device set file" 29 | echo -e "\t-V device: set device" 30 | exit 0 31 | } -------------------------------------------------------------------------------- /extensions/device/device.tex: -------------------------------------------------------------------------------- 1 | \usepackage{geometry} 2 | % 设备类型 3 | \newcommand{\devicemobile}{ 4 | \geometry{ 5 | paperwidth=10.0cm, 6 | paperheight=16cm, 7 | margin=0.5cm, 8 | left=0.1cm, 9 | right=0.1cm, 10 | top=0.1cm, 11 | bottom=0.4cm 12 | } 13 | } 14 | 15 | \newcommand{\devicekindle}{ 16 | \geometry{ 17 | paperwidth=10.0cm, 18 | paperheight=11.7cm, 19 | margin=0.5cm, 20 | left=0.1cm, 21 | right=0.1cm, 22 | top=0.1cm, 23 | bottom=0.4cm 24 | } 25 | } 26 | 27 | \newcommand{\devicepc}{ 28 | \geometry{ 29 | top=1in, 30 | inner=1in, 31 | outer=1in, 32 | bottom=1in, 33 | headheight=3ex, 34 | headsep=2ex 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /extensions/fontawesome5/README.md: -------------------------------------------------------------------------------- 1 | # fontawesome5 2 | 3 | 对简历改用`fontawesome5`。 -------------------------------------------------------------------------------- /extensions/fontawesome5/fontawesome5.sh: -------------------------------------------------------------------------------- 1 | regext fontawesome5 2 | getArrayVar _G "ext-fontawesome5" `enableExt 00001` 3 | 4 | function ext_fontawesome5() { 5 | if [ "${_G[ext-fontawesome5]}"x == "true"x ];then 6 | # 修复moderncv conflict with fontawesome5 7 | cp $SCRIPTDIR/${_G[extdir]}/fontawesome5/moderncviconsawesome.sty ${_G[build]} 8 | 9 | extStat fontawesome5 done 10 | else 11 | extStat fontawesome5 skip 12 | fi 13 | } 14 | 15 | function ext_fontawesome5_help() { 16 | echo -e "\t-G ext-fontawesome5: enable fontawesome5(default true)" 17 | exit 0 18 | } -------------------------------------------------------------------------------- /extensions/grade/grade.lua: -------------------------------------------------------------------------------- 1 | function Span(el) 2 | if el.attr.classes[1] == "grade" then 3 | return pandoc.RawInline("latex", "\\grade" .. el.content[1].text) 4 | end 5 | end -------------------------------------------------------------------------------- /extensions/grade/grade.sh: -------------------------------------------------------------------------------- 1 | regext grade 2 | getArrayVar _G "ext-grade" `enableExt 00001` 3 | getArrayVar _G "ext-grade-tex" "$SCRIPTDIR/${_G[extdir]}/grade/grade.tex" 4 | 5 | function ext_grade() { 6 | # 依赖add header功能 7 | if [ "${_G[ext-grade]}"x == "true"x -a "${_G[ext-header]}"x == "true"x ];then 8 | writeHeader ${_G[ext-grade-tex]} 9 | _F[grade]="--lua-filter $SCRIPTDIR/${_G[extdir]}/grade/grade.lua" 10 | 11 | extStat grade done 12 | else 13 | extStat grade skip 14 | fi 15 | } 16 | 17 | function ext_grade_help() { 18 | echo -e "\t-G ext-grade: enable grade(default true)" 19 | echo -e "\t-G ext-grade-tex: change grade set file" 20 | exit 0 21 | } -------------------------------------------------------------------------------- /extensions/grade/grade.tex: -------------------------------------------------------------------------------- 1 | \makeatletter 2 | \@ifpackageloaded{tikz}{}{\usepackage{tikz}} 3 | \@ifpackageloaded{xcolor}{}{\usepackage{xcolor}} 4 | \@ifundefinedcolor{color1}{\definecolor{color1}{rgb}{0.22,0.45,0.70}} 5 | \makeatother 6 | \definecolor{backColor}{RGB}{200,200,200}% grey 7 | \makeatletter 8 | \newcommand{\grade}[1]{% 9 | \begin{tikzpicture} 10 | \clip (1em-.4em,-.35em) rectangle (5em +.5em ,0.7em); 11 | \foreach \x in {1,2,...,5}{ 12 | \path[{fill=backColor}] (\x em,0) circle (.35em); 13 | } 14 | \begin{scope} 15 | \clip (1em-.4em,-.35em) rectangle (#1em +.5em ,0.7em); 16 | \foreach \x in {1,2,...,5}{ 17 | \path[{fill=color1}] (\x em,0) circle (.35em); 18 | } 19 | \end{scope} 20 | 21 | \end{tikzpicture}% 22 | } 23 | \makeatother -------------------------------------------------------------------------------- /extensions/header/header.sh: -------------------------------------------------------------------------------- 1 | regext header 2 | # 此扩展所有module都需要 3 | getArrayVar _G "ext-header" true 4 | 5 | function ext_header() { 6 | if [ "${_G[ext-header]}"x == "true"x ];then 7 | _F[add-header]="-M build_id=${_G[build_id]} --lua-filter $SCRIPTDIR/${_G[extdir]}/header/add-header.lua" 8 | 9 | extStat header done 10 | else 11 | extStat header skip 12 | fi 13 | } 14 | 15 | function ext_header_help() { 16 | echo -e "\t-G ext-header: enable add header(default true)" 17 | exit 0 18 | } -------------------------------------------------------------------------------- /extensions/ipa/ipa.lua: -------------------------------------------------------------------------------- 1 | function Span(el) 2 | if el.attr.classes[1] == "ipa" then 3 | if FORMAT == "tex" or FORMAT == "latex" or FORMAT == "pdf" then 4 | return { 5 | pandoc.RawInline("latex","\\ipa"), 6 | el 7 | } 8 | end 9 | end 10 | end -------------------------------------------------------------------------------- /extensions/ipa/ipa.sh: -------------------------------------------------------------------------------- 1 | regext ipa 2 | getArrayVar _G "ext-ipa" true 3 | getArrayVar _G "ext-ipa-tex" "$SCRIPTDIR/${_G[extdir]}/ipa/ipa.tex" 4 | 5 | function ext_ipa() { 6 | # 依赖add header功能 7 | if [ "${_G[ext-ipa]}"x == "true"x -a "${_G[ext-header]}"x == "true"x ];then 8 | writeHeader ${_G[ext-ipa-tex]} 9 | _F[ipa]="--lua-filter $SCRIPTDIR/${_G[extdir]}/ipa/ipa.lua" 10 | 11 | extStat ipa done 12 | else 13 | extStat ipa skip 14 | fi 15 | } 16 | 17 | function ext_ipa_help() { 18 | echo -e "\t-G ext-ipa: enable ipa(default true)" 19 | echo -e "\t-G ext-ipa-tex: change ipa set file" 20 | exit 0 21 | } -------------------------------------------------------------------------------- /extensions/ipa/ipa.tex: -------------------------------------------------------------------------------- 1 | \newfontfamily\ipafont{DoulosSIL-R.ttf}[ 2 | Path=fonts/, 3 | SlantedFont={DoulosSIL-R.ttf}, 4 | SlantedFeatures={FakeSlant=0.15} 5 | ] 6 | \newcommand{\ipa}[1]{{\ipafont #1}} -------------------------------------------------------------------------------- /extensions/lineblock/lineblock.lua: -------------------------------------------------------------------------------- 1 | function LineBlock(block) 2 | return { 3 | pandoc.RawBlock("latex", "\\begin{lineblock}"), 4 | block, 5 | pandoc.RawBlock("latex","\\end{lineblock}") 6 | } 7 | end -------------------------------------------------------------------------------- /extensions/lineblock/lineblock.sh: -------------------------------------------------------------------------------- 1 | regext lineblock 2 | # 通用扩展 3 | getArrayVar _G "ext-lineblock" true 4 | getArrayVar _G "ext-lineblock-tex" "$SCRIPTDIR/${_G[extdir]}/lineblock/lineblock.tex" 5 | 6 | function ext_lineblock() { 7 | # 依赖add header功能 8 | if [ "${_G[ext-lineblock]}"x == "true"x -a "${_G[ext-header]}"x == "true"x ];then 9 | writeHeader ${_G[ext-lineblock-tex]} 10 | _F[lineblock]="--lua-filter $SCRIPTDIR/${_G[extdir]}/lineblock/lineblock.lua" 11 | 12 | extStat lineblock done 13 | else 14 | extStat lineblock skip 15 | fi 16 | } 17 | 18 | function ext_lineblock_help() { 19 | echo -e "\t-G ext-lineblock: enable lineblock(default true)" 20 | echo -e "\t-G ext-lineblock-tex: change lineblock set file" 21 | exit 0 22 | } -------------------------------------------------------------------------------- /extensions/lineblock/lineblock.tex: -------------------------------------------------------------------------------- 1 | \newenvironment{lineblock}{\setlength{\parindent}{0em}}{} -------------------------------------------------------------------------------- /extensions/listings/listings-set.tex: -------------------------------------------------------------------------------- 1 | \definecolor{ocre}{RGB}{243,102,25} % Define the orange color used for highlighting throughout the book 2 | \definecolor{lightgray}{rgb}{0.97,0.97,1} 3 | \renewcommand{\passthrough}[1]{\colorbox{lightgray}{#1}} 4 | %\newfontfamily\code{Courier New} 5 | 6 | \lstset{ 7 | %numbers=left, 8 | %numberstyle=\tiny, 9 | basicstyle=\small\linespread{1}\ttfamily, 10 | keywordstyle=\color[rgb]{0.13,0.29,0.53}\textbf, 11 | commentstyle=\color{gray}, 12 | identifierstyle=\color[rgb]{0.00,0.00,0.00}, 13 | stringstyle=\color[rgb]{0.31,0.60,0.02}, 14 | frame=shadowbox, 15 | rulesepcolor=\color{red!20!green!20!blue!20}, 16 | backgroundcolor=\color[rgb]{0.97,0.97,0.97}, 17 | tabsize=4, 18 | breaklines=tr, 19 | showstringspaces=false, 20 | } 21 | \renewcommand{\lstlistingname}{代码} -------------------------------------------------------------------------------- /extensions/listings/noframe.tex: -------------------------------------------------------------------------------- 1 | % 解决自动换行问题 https://github.com/annProg/PanBook/issues/26#issuecomment-500458739 2 | \makeatletter 3 | \@ifpackageloaded{float}{}{\usepackage{float}} 4 | \@ifpackageloaded{caption}{}{\usepackage{caption}} 5 | \floatstyle{plaintop} 6 | \@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]} 7 | \captionsetup[plaintop]{skip=0pt} 8 | \makeatother 9 | 10 | \usepackage{fvextra} 11 | \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakanywhere,fontsize=\small,commandchars=\\\{\}} 12 | -------------------------------------------------------------------------------- /extensions/longtable/README.md: -------------------------------------------------------------------------------- 1 | # longtable 2 | 3 | 包含浮动体和longtable的页面,底部内容会溢出。此扩展提供一个 bug fix. 4 | 5 | see: 6 | 7 | - https://github.com/annProg/PanBook/issues/22 8 | - https://github.com/CTeX-org/forum/issues/40 9 | - https://gist.github.com/muzimuzhi/ba7fab51f235b8a59af9461e0c5e05ac -------------------------------------------------------------------------------- /extensions/longtable/longtable.sh: -------------------------------------------------------------------------------- 1 | regext longtable 2 | # 通用扩展 3 | getArrayVar _G "ext-longtable" true 4 | getArrayVar _G "ext-longtable-sty" "$SCRIPTDIR/${_G[extdir]}/longtable/longtable.sty" 5 | 6 | function ext_longtable() { 7 | if [ "${_G[ext-longtable]}"x == "true"x ];then 8 | cp ${_G[ext-longtable-sty]} ${_G[build]} 9 | 10 | extStat longtable done 11 | else 12 | extStat longtable skip 13 | fi 14 | } 15 | 16 | function ext_longtable_help() { 17 | echo -e "\t-G ext-longtable: enable longtable(default true)" 18 | echo -e "\t-G ext-longtable-sty: change longtable sty file" 19 | exit 0 20 | } -------------------------------------------------------------------------------- /extensions/plot/.gitignore: -------------------------------------------------------------------------------- 1 | _plot_render 2 | *.pdf 3 | *.epub 4 | *.docx -------------------------------------------------------------------------------- /extensions/plot/Makefile: -------------------------------------------------------------------------------- 1 | all: pdf epub 2 | 3 | pdf: 4 | pandoc --lua-filter plot.lua -F pandoc-crossref demo.md -o demo.pdf --pdf-engine=xelatex -V CJKmainfont=FandolSong 5 | epub: 6 | pandoc --lua-filter plot.lua -F pandoc-crossref demo.md -o demo.epub 7 | tex: 8 | pandoc --lua-filter plot.lua -F pandoc-crossref demo.md -t latex 9 | docx: 10 | pandoc --lua-filter plot.lua -F pandoc-crossref demo.md -o demo.docx -------------------------------------------------------------------------------- /extensions/plot/README.md: -------------------------------------------------------------------------------- 1 | # Plot 2 | 3 | 用于画图 4 | 5 | ## 安装 6 | 需要安装 librsvg 用于 SVG 转 PDF。msys2 上使用 `pacman -S mingw64/mingw-w64-x86_64-librsvg` 安装。 7 | 8 | 目前支持以下画图引擎,如需使用,请安装对应软件并加入 PATH 环境变量 9 | 10 | - dot,neato,fdp,sfdp,twopi,circo (from graphviz) 11 | - ditaa (建议使用 go 语言版本 https://github.com/akavel/ditaa/release) 12 | - goseq (https://github.com/pandoc-ebook/goseq/releases) 13 | - a2s (https://github.com/pandoc-ebook/asciitosvg/releases) 14 | - gnuplot 15 | 16 | ## 用法 17 | 18 | 使用代码块语法 19 | 20 | - 为正常使用交叉引用,id 格式须符合 `fig: