Comments (7)
The problem is that pandoc
number_sections
wants to use H1 as section headings within the document whereas radix/distill uses H2 section headings. So even if you addnumber_sections
(which you could actually do viapandoc_args: ["--number-sections"]
) you get unsatisfactory output.
Adding pandoc_args: ["--number-sections"]
actually works fine, at least if using distill::distill_article
as a base_format
for bookdown::html_document2:
, like so:
output:
bookdown::html_document2:
base_format: distill::distill_article
toc: true
toc_depth: 2
pandoc_args: ["--number-sections"]
from distill.
Adding
pandoc_args: ["--number-sections"]
actually works fine, at least if usingdistill::distill_article
as abase_format
forbookdown::html_document2:
, like so:
Nice trick, it is working for me even for native distill articles
from distill.
The problem is that pandoc number_sections
wants to use H1 as section headings within the document whereas radix/distill uses H2 section headings. So even if you add number_sections
(which you could actually do via pandoc_args: ["--number-sections"]
) you get unsatisfactory output.
from distill.
It seems that section numbering could be customized with pandoc-crossref, cf. http://lierdakil.github.io/pandoc-crossref/#section-numbering
from distill.
Integrating crossref within Radix would also allow to customize Figure and Table labels (cf. http://lierdakil.github.io/pandoc-crossref/#settings-file)
from distill.
The issue w/ relying on pandoc-crossref is that users need to install another Haskell binary (which will I think be too big a hurdle to surmount for most). It would be much better to find a solution based on a a Lua filter.
from distill.
That issue of adding an additional parameter to pandoc has been raised on pandoc's GitHub: jgm/pandoc#5071
However, as long as a new option is not added to Pandoc, another possibility would be to rely on a custom filter, directly provided by Radix.
from distill.
Related Issues (20)
- Upkeep for distill
- Check and add alt-text to pictures, plots, ... in website
- invalid byte sequence when deploying to github HOT 3
- RSS category-based feeds HOT 1
- Creative Commons Markdown Table Not Rendering Properly
- Warning due to deprecation of 'format' argument to 'as.character.POSIXlt()' HOT 2
- Description in _site.yaml causing Error "STRING_ELT() can only be applied to a 'character vector', not a 'list'" HOT 1
- How to add email and multiple affiliations to a single author? HOT 2
- Article description does not show up when adding posts HOT 1
- Improve alt-text for ORCiD icon HOT 3
- Add <hr> for screen reader accessibility HOT 1
- Space between lines in bulleted lists HOT 1
- Various minor accessibility issues
- Release distill 1.6
- Gallery outdated, remove Quarto pages HOT 1
- Javascript & D3 page error HOT 1
- Journal (site) title is incorrectly prepended to the article title in cititations.
- Has anyone used any alternative to Google analytics? HOT 2
- italicized species names in a Rmarkdown distill package
- Using a `distill` vignette on CRAN HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from distill.