Comments (14)
The bug has been fixed in v0.4.0.
The usage of recursive includes has been updated in README.md.
from pandoc-include.
Hi, @ksebby
Could you post a simple piece of code to reproduce the problem?
I have tested locally and can't reproduce it.
from pandoc-include.
Thanks @DCsunset. I am running
pandoc docs/templates/Tools.md --filter pandoc-include -o docs/ToolsGuide.md -t markdown -s
in the root directory of this repo https://github.com/xDBio-Inc/cwl-tools/tree/combined_karl
from pandoc-include.
I got rid of the need for recursion in my docs as it wasn't really necessary. If you still want to play around with it you can git checkout 888943a
from the main branch. Thanks.
from pandoc-include.
Sorry for missing your comment 4 days ago (because Github didn't send to me any notification).
It seems that the paths in the file are not processed correctly.
I may fix the bug later.
from pandoc-include.
@DCsunset It looks like this bug reappears in v0.7.0 ... at least on my Mac. I have one Main.md
which includes xxx/Main.md
which in turn includes xxx/1.md
and xxx/2.md
. Running pandoc Main.md --filter pandoc-include -o Main.pdf
results in
Traceback (most recent call last):
File "/Users/normenmueller/Library/Python/3.7/bin/pandoc-include", line 8, in <module>
sys.exit(main())
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/pandoc_include.py", line 160, in main
return pf.run_filter(action, doc=doc)
File "/usr/local/lib/python3.7/site-packages/panflute/io.py", line 258, in run_filter
return run_filters([action], *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/panflute/io.py", line 239, in run_filters
doc = doc.walk(action, doc)
File "/usr/local/lib/python3.7/site-packages/panflute/base.py", line 265, in walk
ans = list(chain.from_iterable(ans))
File "/usr/local/lib/python3.7/site-packages/panflute/base.py", line 263, in <genexpr>
ans = ((item,) if type(item) != list else item for item in ans)
File "/usr/local/lib/python3.7/site-packages/panflute/base.py", line 260, in <genexpr>
ans = (item.walk(action, doc) for item in obj)
File "/usr/local/lib/python3.7/site-packages/panflute/base.py", line 276, in walk
altered = action(self, doc)
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/pandoc_include.py", line 108, in action
fn + ' ' + entry + ' ' + os.getcwd())
TypeError: can only concatenate str (not "NoneType") to str
Error running filter pandoc-include:
Filter returned error status 1
Traceback (most recent call last):
File "/Users/normenmueller/Library/Python/3.7/bin/pandoc-include", line 8, in <module>
sys.exit(main())
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/pandoc_include.py", line 160, in main
return pf.run_filter(action, doc=doc)
File "/usr/local/lib/python3.7/site-packages/panflute/io.py", line 258, in run_filter
return run_filters([action], *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/panflute/io.py", line 239, in run_filters
doc = doc.walk(action, doc)
File "/usr/local/lib/python3.7/site-packages/panflute/base.py", line 265, in walk
ans = list(chain.from_iterable(ans))
File "/usr/local/lib/python3.7/site-packages/panflute/base.py", line 263, in <genexpr>
ans = ((item,) if type(item) != list else item for item in ans)
File "/usr/local/lib/python3.7/site-packages/panflute/base.py", line 260, in <genexpr>
ans = (item.walk(action, doc) for item in obj)
File "/usr/local/lib/python3.7/site-packages/panflute/base.py", line 276, in walk
altered = action(self, doc)
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/pandoc_include.py", line 132, in action
raw, extra_args=pandoc_options)
File "/usr/local/lib/python3.7/site-packages/panflute/tools.py", line 413, in convert_text
out = inner_convert_text(text, in_fmt, out_fmt, extra_args)
File "/usr/local/lib/python3.7/site-packages/panflute/tools.py", line 436, in inner_convert_text
out = run_pandoc(text, args)
File "/usr/local/lib/python3.7/site-packages/panflute/tools.py", line 337, in run_pandoc
raise IOError('')
OSError
Error running filter pandoc-include:
Filter returned error status 1
from pandoc-include.
@normenmueller I fixed some bugs and release v0.7.2. I hope it solves this problem.
from pandoc-include.
@DCsunset Thanks for the fast reply and patch!
However, it still does not work... guess there is a problem with spaces in path names? I tried !include 10\ Anhang/Main.md
but
pandoc Main.md --filter pandoc-include -o Main.pdf
Traceback (most recent call last):
File "/Users/normenmueller/Library/Python/3.7/bin/pandoc-include", line 8, in <module>
sys.exit(main())
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/pandoc_include.py", line 161, in main
return pf.run_filter(action, doc=doc)
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/panflute/io.py", line 266, in run_filter
return run_filters([action], *args, **kwargs)
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/panflute/io.py", line 247, in run_filters
doc = doc.walk(action, doc)
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/panflute/base.py", line 265, in walk
ans = list(chain.from_iterable(ans))
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/panflute/base.py", line 263, in <genexpr>
ans = ((item,) if type(item) != list else item for item in ans)
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/panflute/base.py", line 260, in <genexpr>
ans = (item.walk(action, doc) for item in obj)
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/panflute/base.py", line 276, in walk
altered = action(self, doc)
File "/Users/normenmueller/Library/Python/3.7/lib/python/site-packages/pandoc_include.py", line 108, in action
'%r %r %r' % (fn, entry, os.getcwd()))
ValueError: Included file not found: '10\xa0Anhang/Main.md' None '/Users/normenmueller/Worspace/eam/ads'
Error running filter pandoc-include:
Filter returned error status 1
from pandoc-include.
The spaces needn't be escaped. You might remove the backslashes and try it again.
from pandoc-include.
@DCsunset I guess the error is on my site, but !include 10 Anhang/Main.md
also does not work. No error is thrown, though, but it just quits normally with a PDF but without the included content.
from pandoc-include.
@normenmueller Could you post the !include
lines in your Main.md
and xxx/Main.md
?
If you add some options to pandoc-include
, you could post it as well.
Then I could try to reproduce it on my machine.
from pandoc-include.
/doc
|- 01 Intro/
|- ...
|- 10 Annex/
|- Main.md
|- 1.md
|- 2.md
|- Main.md
Main.md
---
title: '...'
subtitle: '...'
author: Normen Müller
abstract: |
tbd
...
!include 10 Annex/Main.md
/10 Annex/Main.md
# Bla Blub
!include ./1.md
!include ./2.md
Shell:
$ cd /doc
$ pandoc Main.md --filter pandoc-include -o Main.pdf
from pandoc-include.
There seems no problem when compiling on my computer.
Did you update pandoc-include
to v0.7.2?
from pandoc-include.
My mistake. If you rename the resulting PDF but open the old PDF... then the error is in front of the computer ;-)
from pandoc-include.
Related Issues (20)
- 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
- Adjust section level in included markdown files HOT 12
- 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
- Filename's underscore gets escaped? HOT 2
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.