pandoc-include
pandoc-include copied to clipboard
Include only certain line numbers
Pandoc-include doesn't currently allow us to include only a range of line numbers, does it? For example, if I have a complete poem or program in a file (e.g., poem.md or program.xq), but my text I only want to include lines 6-12 and later lines 13-18. If pandoc-include doesn't support this, is it planned, or if not, are you aware of any projects that support this? Thanks.
I had no plans for this feature, but it sound useful, and it should be feasible. Please give me some time to think about how this should be done!
@steindani Thanks so much for considering the idea! I'd still find it useful and would be happy to test it if you decide to give it a shot.
@joewiz what do you think about the following include syntax?
```cropped
alpha.md <- the source file
2 <- number of skipped lines (0 to start from the first line, optional)
1 <- number of lines to include (optional)
```
@steindani I'm far from a pandoc or markdown extension syntax expert, but this looks great! My only thought is to change "cropped" to "include-lines". Cropping might suggest image slicing, whereas include-lines seems like a natural extension of your original function. Just an idea though!