Package: pandoctools
PandoctoolsCI ArtifactsPandoctools is a combination of tools that help write reproducible markdown reports. They rely on Pandoc and Jupyter kernels.Introduction articles:Best Python/Jupyter/PyCharm/VSCode experience + report generation with Pandoc filters.Convenient and easily tweakable Atom+Markdown+Pandoc+Jupyter experience (can export to ipynb).“Glueing” part of pandoctools is a profile manager of text processing pipelines. It stores short crossplatform bash scripts that define chain operations over text. They are mostly Pandoc filters but any CLI text filter is OK.Update instructions(Update instructions to v.2.8.0.2)v2.8.0.2is not backward compatible,Default.htmlwas changed andDefault_argsdepends on this new changes (see custom bash functions).$mathjaxvar changed meaning,${mathjax_url}and${extra_inputs}were removed. But profiles can be easily fixed. Uninstall Pandoctools before updating. Update your custom bash scripts as names and logic changed. References:Default_args,Default(profile),Default_pipe,fix custom pipes: add--pipearg to pandoc-crossref (seethisfor details),ContentsPandoctoolsUpdate instructionsContentsNotable parts of PandoctoolsExamplesInstallUseful tips (reload imported modules in Hydrogen, Python kernel, R kernel, Typescript kernel)Alternatives to R Markdown (Markdown-based Literate Programming)Notable parts of PandoctoolsPandoc,Jupyter,pandoc-crossref(dependence) - classical tools.Pandoctools CLI app(integrated): profile manager of text processing pipelines. It stores short bash scripts - called profiles - that define chain operations over text. They are mostly Pandoc filters but any CLI text filter is OK. Profiles can be used to convert any document of choise in the specified manner.Knitty(dependence): Jupyter power in plain Python/Julia/R/any-kernel-lang. Jupyter kernels output as Pandoc filter. Insert python code (or other Jupyter kernel code) to the Markdown documentor write in plain Python/Julia/R with block-commented Markdownand have code's results in the output document. Stitch/Knotr fork: reproducible report generation tool via Jupyter, Pandoc and Markdown. Can export to .html, .pdf,Jupyter .ipynb notebooksand any otherPandoc output formats. You can useipynb-py-convertto convert .ipynb to .py to use with Knitty.SugarTeX(dependence): SugarTeX is a more readable LaTeX language extension and transcompiler to LaTeX.Pyppdf(dependence): Pyppeteer PDF. Prints html output to pdf via patched Pyppeteer.Prism.jsandgithub-markdown-css(integrated): used for default to PDF conversion (but with borrowing fromDefault_argsto custom profile you can use them with to HTML conversion too).libsass-python(dependence): tweak and write css with more convenient sass or scss (seeDefault.sass).Open Fonts(dependence): A collection of beautiful free and open source fonts + Unicode fallback chains. With it you can use all fonts listed there in your CSS (except CJK) out of the box and without installing those fonts into OS.(optional)Tabulate Helperconverts tabular data like Pandas dataframe to GitHub Flavored Markdown pipe table.(optional)Matplotlib Helper: custom helper to tune Matplotlib experience in Atom/Hydrogen and Pandoctools/Knitty.(optional)Feather Helper: concise interface to cache numpy arrays and pandas dataframes.(optional)pypugjs: Write HTML via Pug that is much more readable.Pandoctools is a tool for converting markdown document. But we also need tools for writing markdown and deploying python/Jupyter code blocks.And the best one for it is:Atom editor with plugins. It helps easily type Unicode, interactively run highlighed python/Jupyter code blocks and instantly see results (+ completions from the running Jupyter kernel), can convert basic pandoc markdown to html with live preview.Must have plugins:SugarTeX Completions,Unix Filter,Hydrogen.ExamplesNEW:see automatically generated examples documents (by Travis CI) of the latest Pandoctools version inCI Artifacts(generated on Windows, macOS and Ubuntu).Here areexamplesthat demonstrate converting documents:from markdown.mdwith Jupyter python code blocks, SugarTeX math and cross-references to.ipynbnotebook and to PDF.from Hydrogen/python notebook.pywith Atom/Hydrogen code cells, Knitty markdown incerts (again with SugarTeX math and cross-references) to.ipynbnotebook and to PDF.Examples are given forto .ipynband to .pdf conversion but Pandoctools surely capable of conversion to .html, .md.md or anyPandoc output format.Extras:If you need to capture Matplotlib plots please seematplotlibhelper(the approach showed in examples there can be used with other plot libraries).If you need to autonumber sections seepandoc-crossreforthis SE questionIf you need criticmarkup support please consider using git repository withgit-time-machinefor tracking changes,<!-- html comments -->for adding notes,pigmentsfor highlighting text.InstallWindows notice!Install 64-bitGit Bash. Main installer there would work out of the box and is a recommended option.Alternatives: Portable installer would require setingwin_bashvalue in the%APPDATA%\pandoc\pandoctools\Defaults.ini(after it was autocreated bypandoctools-ready). You can also install conda packages with bash to the environment with pandoctools: eitherconda-forge::gitorpkgs/msys2::posix.If you have an antivirus then the first or two runs may fail - there may be errors like "Permission denied" because of the antivirus checking all the components.Linux notice!If on Ubuntu additionally install (Chrome headless doesn't launch on Unix):sudoapt-getupdate
sudoapt-getinstall-yca-certificatesfonts-liberationlibappindicator3-1libasound2libatk-bridge2.0-0libatk1.0-0libc6libcairo2libcups2libdbus-1-3libexpat1libfontconfig1libgbm1libgcc1libglib2.0-0libgtk-3-0libnspr4libnss3libpango-1.0-0libpangocairo-1.0-0libstdc++6libx11-6libx11-xcb1libxcb1libxcomposite1libxcursor1libxdamage1libxext6libxfixes3libxi6libxrandr2libxrender1libxss1libxtst6lsb-releasewgetxdg-utilsmacOS notice!If on macOS 10.13 you should use"py-pandoc-crossref<0.3.6.3". You can modify CLI command intopandoctools "py-pandoc-crossref<0.3.6.3"or istall additionally after the main installation (conda install -c defaults -c conda-forge xxxorpip install xxx). That is the latest version that supports both panflute and macOS 10.13 (though it hasthis bug).Short instructions:Eitherinstall 64-bitMiniconda3and:condainstall-cdefaults-cconda-forgepandoctoolsOrinstall 64-bit Python and:pipinstallpandoctoolsThen:pandoctools-readyBut it's recommended to create a dedicated environment for the Pandoctools. See below.Via condaCreate "pandoctools" conda environment (do not set custom prefix unless you want to setroot_envin theconfig):(on Unix):cd$root_miniconda_prefixsource./bin/activatebase
condaconfig--addchannelsconda-forge
condaconfig--addchannelsdefaults
condaupdateconda

condacreate-npandoctoolspandoctoolssourceactivatepandoctools
pandoctools-ready(on Windows):cd/d%root_miniconda_prefix%call.\Scripts\activate base
conda config --add channels conda-forge
conda config --add channels defaults
conda update conda

conda create -n pandoctools pandoctoolscallactivate pandoctools
pandoctools-readyJust in case: the right way to remove conda environment 'myenv' is to run:condaremove-nmyenv--all
condaenvremove-nmyenv(in this particular order)Via pipCreate pandoctools venv environment:(on Unix):cd$root_python_prefix./bin/python-mvenv./envs/pandoctoolssource./envs/pandoctools/bin/activate

pipinstallpandoctools
pandoctools-ready(on Windows):cd/d%root_python_prefix%.\python -m venv .\envs\pandoctoolscall.\envs\pandoctools\Scripts\activate

pip install pandoctools
pandoctools-readyIn contrast with conda installation Jupyter notebooks in pip do not supportactivated python kernels(there is a strange bug).Useful tips (reload imported modules in Hydrogen, Python kernel, R kernel, Typescript kernel)Useful tipsAlternatives to R Markdown (Markdown-based Literate Programming)Alternatives to R Markdown