Comments (13)
Closing for now — talked with @jhamrick and it's been long enough since they've had to do something like that for nbgrader that it's unlikely that this is still a bug.
from nbconvert.
(and pandoc 1.19 is working great with nbconvert)
from nbconvert.
I think this is a recent change in behavior in pandoc, where when you pass snippets, if there's only one header it uses ===
, regardless of the originating format. What version of pandoc are you using?
from nbconvert.
pandoc 1.15.0.6
Compiled with texmath 0.8.2.2, highlighting-kate 0.6.
(OS X)
All of the files I'm using have more than one header level, including a top-level ====
/#
near the beginning of the file. Thanks for looking into it.
from nbconvert.
Indeed it is from a change in pandoc. v.1.13.2 works great. v.1.14 (next version; May 28, 2015) breaks. It's probably this change:
Normalize headings to sequential levels (Nikolay Yakimov). This is pretty much required by docutils.
Ironically, this is what is killing docutils for me in my Jupyter/Notebook to Sphinx workflow.
So it seems to be a pandoc problem in some sense rather than a nbconvert problem, but I wonder if there's a hint that nbconvert could be making to not have this behavior function.
from nbconvert.
Yup, I think we just need to ask pandoc what the right thing to do is.
from nbconvert.
I made a note there. Thanks!
from nbconvert.
Pandoc has slightly improved the situation, but there doesn't appear to be anything we can do in the meantime on the nbconvert side.
from nbconvert.
Ugh, @willingc and I just came across this in the nbgrader documentation. A workaround for nbconvert could potentially be to create a special preprocessor just for the rst exporter that does the following:
- Change the type of all markdown cells to raw nbconvert, and convert their source to rst
- Parse out the heading levels from the original markdown cells and make sure they are the right level in the rst output
It's pretty hacky, but I think it would mostly work, at least. I may write something like this for the nbgrader docs, since I really need the heading levels there to be correct, but maybe it's too hacky for nbconvert proper...
from nbconvert.
@jhamrick are you running on a machine you control? Pinning pandoc to 1.13 might be the easiest temporary solution.
from nbconvert.
The other workaround is going nbconvert → md; pandoc → rst. I'm not sure how much is lost there, though.
from nbconvert.
A fix has been merged into pandoc that should improve things once released. I'm guessing it will first appear in 1.16, which means we should consider blacklisting (or warning, at least) 1.14-1.15 for rst export.
from nbconvert.
Supposedly 1.15.1 (15 October 2015) fixed this. I upgraded on one server and it appears to be functional. It's not enough for a close yet, but it's enough that I'll be willing to try out on a production machine soon.
from nbconvert.
Related Issues (20)
- Error: `403 : Forbidden The error was: '_xsrf' argument missing from GET` on JupyterHub >= 4.1 HOT 3
- problem with --to html and --to pdf
- Problem with WebPDF in a conda environment
- TagRemovePreprocessor.remove_cell_tags for empty tags
- X.jupy.org
- Convert error .ngscript to .html
- lxml_clean_html dependency issue in nbconvert lower version (6.5.1) HOT 1
- nbconvert for python 3.9 crashing during the templateexporter.py HOT 1
- Encountered problems pip installing at two different levels. HOT 1
- Update mermaid to v10.9.1 HOT 2
- Poetry and nbconvert dependency resolution (ModuleNotFoundError: No module named 'attrs')
- Template Not Found: Unable to locate base.tplx or other built-in LaTeX templates HOT 1
- incorporate cell metadata element "scrolled" for conversion to html
- Notebook to script does not respect leading whitespace
- Can't use nbconvert 7.16.4 with JupyterLab v4.2.2 HOT 1
- nbconvert picks up wrong images
- `remove_input_tags` doesn't seem to be working (in the way I understand it) HOT 1
- Convert to markdown, overlapping images with different cells and the same name, causing confusion HOT 1
- Support pandoc 3.2.1
- WebPDF exporter hangs and cpu usage spikes to 100% if DISPLAY variable is set.
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 nbconvert.