![](/style/images/good.png)
![](/style/images/bad.png)
GitHub - liao961120/pandoc-bs4: bs4_book template for Pandoc HTML fragment
source link: https://github.com/liao961120/pandoc-bs4
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
A Book Template for Pandoc HTML Fragments
Recreation of bookdown's bs4_book HTML template, with dependencies other than pandoc & pandoc-crossref dropped. See a live example here.
Usage
The template is designed to work with HTML fragments generated with Pandoc. The
top-level headings (chapters) must be H1
(i.e., # Your heading
in markdown).
Texts preceding the first H1
headings are ignored. An example build script
can be found in build.sh
.
bash build.sh
Note the options shown below should be kept unchanged in order for the compiled book to work as expected:
-o "content.html.txt"
--from markdown+smart+header_attributes+superscript+subscript
--to html5
--katex="https://cdn.jsdelivr.net/npm/[email protected]/dist/"
--filter="pandoc-crossref"
--citeproc
--strip-comments
--section-divs
--shift-heading-level-by=0
Note that the markdown file pd-styles/variables.md
should be placed as
the second last markdown file (preceeding pd-styles/references.md
) when
the option --file-scope
(i.e., parse-then-concat) is specified. Otherwise
(concat-then-parse), pd-styles/variables.md
should be placed as the first
markdown file1.
- Figure/Table/Equation... cross-reference
- Enhancement
- Fix appendix cross-ref number (e.g., 3.1 should be A.1)
Footnotes
-
In this situation, make sure that NO YAML headers are present in the markdown files except for the first one (or the YAMLs would be interpreted as markdown content since the files were concatinated before parsing).
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK