Closed AllenDowney closed 3 years ago
Solution is to downgrade pandoc to 2.3.1.
Here's the issue in the nbconvert repo: https://github.com/jupyter/nbconvert/issues/1456
For those using Ubuntu, the following steps worked for me:
# download pandoc v2.3.1 from their github releases
wget https://github.com/jgm/pandoc/releases/download/2.3.1/pandoc-2.3.1-1-amd64.deb
# install pandoc
sudo dpkg -i pandoc-2.3.1-1-amd64.deb
For those using macOS, there is a well written blog here, although I could not make it work with Big Sur 😢. Instead, the solution was to do a manual install without brew
as follows:
wget https://github.com/jgm/pandoc/releases/download/2.3.1/pandoc-2.3.1-macOS.pkg
sudo installer -pkg pandoc-2.3.1-macOS.pkg -target /
One final gotcha: if you're using conda
you'll find a recent version of pandoc
comes installed. To remove it I ran
conda remove --force pandoc -y
and then installed v2.3.1 of pandoc
using one of the approaches above.
Or this should work on every platform, as long as you have conda installed:
conda install 'pandoc<2.3'
Or
conda install pandoc=3.2.1
should work on every platform, as long as you have conda installed.
There's a typo in the version number here, possibly because I had it permuted in the previous comment - sorry!
For some reason conda install pandoc=2.3.1
does not work for me if I do the following
$ conda create --name foo python=3.8 -y && conda activate foo
$ conda install pandoc=2.3.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- pandoc=2.3.1
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Doing a search for the available versions gives
$ conda search pandoc
Loading channels: done
# Name Version Build Channel
pandoc 1.19.2.1 ha5e8f32_1 pkgs/main
pandoc 2.2.1 h1a437c5_0 pkgs/main
pandoc 2.2.3.2 0 pkgs/main
pandoc 2.9.2.1 0 pkgs/main
pandoc 2.10 0 pkgs/main
pandoc 2.10.1 0 pkgs/main
pandoc 2.11 h0dc7051_0 pkgs/main
so presumably the appropriate choice is conda install pandoc=2.2.3.2
.
conda info
active environment : foo
active env location : /Users/lewtun/miniconda3/envs/foo
shell level : 1
user config file : /Users/lewtun/.condarc
populated config files : /Users/lewtun/.condarc
conda version : 4.9.2
conda-build version : not installed
python version : 3.7.6.final.0
virtual packages : __osx=10.16=0
__unix=0=0
__archspec=1=x86_64
base environment : /Users/lewtun/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/lewtun/miniconda3/pkgs
/Users/lewtun/.conda/pkgs
envs directories : /Users/lewtun/miniconda3/envs
/Users/lewtun/.conda/envs
platform : osx-64
user-agent : conda/4.9.2 requests/2.25.1 CPython/3.7.6 Darwin/20.2.0 OSX/10.16
UID:GID : 501:20
netrc file : None
offline mode : False
conda config --show-sources
==> /Users/lewtun/.condarc <==
auto_activate_base: False
ssl_verify: True
channels:
- defaults
I'm having an odd problem with chapter and section headings. It's odd because it was previously working; I don't think I changed anything, and now it's not working.
Here's the minimum test case that replicates the problem. I have a notebook that looks like this:
And then I run fastdoc like this
And here's the output
I was expecting the first one to be a chapter heading and the second to be a section heading.
And then I'm extra confused because when I build this on Atlas I get two chapters instead of two sections.
Any idea what's happening?