Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration with jupyter? #6

Open
Benfeitas opened this issue Mar 19, 2019 · 5 comments
Open

integration with jupyter? #6

Benfeitas opened this issue Mar 19, 2019 · 5 comments

Comments

@Benfeitas
Copy link

Awsome job on this! I am wondering if you see this being used in jupyter md? Thanks a lot in advance!

@diallobakary4
Copy link

A Jupiter notebook can be converted such that only the markdown cell are outputted. This following command is exhaustive in doing and you may find more details in the documentation.
jupiter nbconvert --to markdown --no-prompt --no-input --TemplateExporter.exclude_raw=True TemplateExporter.exclude_output=True --MarkdownExporter.exclude_code_cell=True --MarkdownExporter.exclude_input=True --MarkdownExporter.exclude_input_prompt=True --MarkdownExporter.exclude_output=True --MarkdownExporter.exclude_output_prompt=True --MarkdownExporter.exclude_raw=True --MarkdownExporter.exclude_unknown=True output.md
The notebook is exported into markdown.
So following the markdown syntax here while writing in your notebook and the markdown file can easily be converted to a manuscript using pandoc. Obviously, pandoc cross-ref and pandoc cite-proc will be doing the majority of the conversion for crossreferencing and citations. Pandoc-csv2table and pandoc-placetable are two interesting filters to automatically refer to a csv file in the markdown (import the csv as a markdown table).
It allows also some formatting flexibility when submitting to journals with different formatting. Pandoc has the --reference-doc=reference_doc.docx option, "reference_doc.docx" can be any journal word template. Some minor manual adjustment may be required. In a similar when exporting to pdf you can use a latex template,

@Benfeitas
Copy link
Author

@diallobakary4 thank you so much, this is very useful! I am only getting started at using jupyter for this function. Perhaps a bit unrelated to this thread, but do you have any reference guide for the pandoc filters?

@diallobakary4
Copy link

There is the pandoc website https://pandoc.org/filters.html
Also most filters have a github page on which there is the related documentation:
https://github.com/jgm/pandoc-citeproc
https://github.com/lierdakil/pandoc-crossref
https://github.com/baig/pandoc-csv2table
Some interesting reading here:
https://pandoc-scholar.github.io/
https://blog.kdheepak.com/downloads/writing-papers-with-markdown.ieee.pdf
It will really be great to have all of integrated into the Jupyter lab and notebook by default as the format is popular in teaching and academia. It can really speed up the formatting process and the attached notebook to publications will make research reproducible and facilitate access to raw data.

@diallobakary4
Copy link

Another interesting approach here https://github.com/chrisjsewell/ipypublish

@Benfeitas
Copy link
Author

Linked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants