Comments (12)
I believe you could use the incrementSection
option to specify how many levels you want to increment. The reason for not detecting it automatically is that it will make it impossible to add some level 1 sections at the end (like the appendix)
from pandoc-include.
incrementSection helps some but doesn't solve all cases. Consider for example nested includes. When writing a document which might be included the author doesn't know the current level and hence doesn't know desired increment.
How about incrementSection="auto"?
from pandoc-include.
For incrementSeciont
, the author of the included document doesn't need to know how many levels to increment. It's the responsibility of the author who wants to include other documents. Maybe I misunderstood your question. If so, could you provide an example to explain why the author doesn't know the current level?
from pandoc-include.
from pandoc-include.
Is it necessary for doc2 to know the the absolute level in doc1? incrementSection
works by incrementing all the section levels. So as long as doc2 knows the how to set doc3's level relatively, it should work because doc1 can increment the levels of both doc2 and doc3 altogether
from pandoc-include.
from pandoc-include.
Yes I think so. It's based on the nature of recursive include. You can always try it easily to verify it when you doubt it.
from pandoc-include.
I've tested now and it works as you say. So current functionality works but I still think incrementSection="auto" would be a nice feature (saving me some thinking and make it easier to rearrange).
from pandoc-include.
Yes I think that may help. However, it's hard to define the auto behaviour as there's no end boundary for sections.
For example, if we have the following markdown:
# Sec 1
Section 1
# Sec 2
Section 2
!include file.md
What would you expect the incrementSection to be? It's reasonable to use either 0 or 1 here.
from pandoc-include.
from pandoc-include.
I see. It makes sense now. auto
is a kinda confusing name as I originally thought you were suggesting a more intelligent approach. I would vote for current
as it always needs to match with the current level.
from pandoc-include.
from pandoc-include.
Related Issues (20)
- pandoc-include crash when the first line of some code is indented HOT 1
- Implicit header references do not work, when file with header is included after the reference HOT 5
- reST directives are not executed in the included files HOT 4
- Bug with code blocks (containing tab?) HOT 2
- Another issue with code blocks and horizontal lines HOT 3
- Included figures with relative paths are not found HOT 3
- Comments in code blocks returns error HOT 1
- Hard line breaks are not preserved HOT 1
- Invalid API Version HOT 1
- Error: invalid api version HOT 3
- Parameterized include HOT 2
- files with _ (underscore) in their name HOT 1
- No longer automatically inserting pagebreaks HOT 2
- support mdbook include syntax HOT 1
- add id-prefix option
- Could not find executable pandoc-include HOT 3
- newlines in src do not work HOT 1
- invalid api version? HOT 3
- Too strict on "File not found" HOT 15
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 pandoc-include.