mf_jupyter
Jupyter notebook tools and Latex templates for astronomy journals
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.9%) to scientific vocabulary
Keywords
Repository
Jupyter notebook tools and Latex templates for astronomy journals
Basic Info
- Host: GitHub
- Owner: mfouesneau
- License: bsd-3-clause
- Language: TeX
- Default Branch: master
- Size: 1.32 MB
Statistics
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
- Releases: 1
Topics
Metadata Files
README.md
mf Jupyter: Notebook with my suite to easy latex conversion
A package to offer tools to create and convert a notebook into TeX files for further publications (e.g., articles, notes).
This package provides a collection of tools to automate validation procedures in the CU8 activities.
This version relies on nbconvert >= 7.0
Documentation not entirely up to date
Notebook content
Check out the examples/template_notebook.ipynb.
Manual command
bash
jupyter nbconvert \
--config=config.py --to=latex --template=tufte \
--TemplateExporter.extra_template_basedirs=${PWD}/templates \
examples/template_notebook.ipynb --debug
Notebook content and metadata
The furnished template contains a few blocks as examples. There are only a few options that are used for converting a notebook. These options are always set through the metadata that one can access through the toolbar on each cell. If the toolbar is not visible, use the menu View > Cell Toolbar > Edit Metadata.
Recognized metadata keywords
hide: set totruewill tell the converter to skip the cellabstract: set to indicate to the converter that this cell contains the abstract block content. (\begin{abstract} ... \end{abstract})
.. note::
More keywords will be soon available.
Python tools
To simplify the interface between python notebook and Latex, mf_jupyter provides some tools, such as making captions for figures with labels and the pdf associated export. But also some other neat tools. Below is a list of functions (use the Python help to know more)
Acknowledgements: Allows to use text as acknowledgments using the proper environment.AppendixMark: set the appendix begin markLatexFigure: generate a caption (with a label) to go with a figure. This will also save the figure to a file (pdf by default) to be included as a floating figure in the latex fileLatexNumberFormatter: formats numbers into scientific notations using Latex representation.LatexSubfigures: takes a list of Python figures to create a single floating figure in latex with optional captions per sub-figure.Matrix: creates a Latex matrix text that can be used as markdown and in latex.Table: Makes a table into a latex table format.add_citation_button: add a button in the notebook toolbar to generate Bibtex reference from bibcode.add_hide_button: add a button to the cell toolbar to allow a quick set or unset onhidemetadata.View > Cell Toolbar > mf_jupyter.add_input_toggle: add a button in the notebook toolbar to hide codes and only keep text and outputs/figures visible.
Avaiblable templates
All templates are usable with make using their name, for example, make mnras.
Specific
dpac: Gaia DPAC technical note templatetufte: Tufte handsout conversion
Journals
aa: Astronomy & Astrophysics formatapj: convert into ApJ formatmnras: convert into MNRAS format
Virtual Environment instead
python has now a built-in virtual environment that can be used similarly to conda.
shell
python -m venv --prompt myenv venv
source venv/bin/activate
pip install --upgrade pip
pip install .
Owner
- Name: Morgan Fouesneau
- Login: mfouesneau
- Kind: user
- Website: http://mfouesneau.github.io/
- Twitter: mfouesneau
- Repositories: 30
- Profile: https://github.com/mfouesneau
@mfouesneau@mastodon.online
Citation (CITATION.cff)
# For citing software, see:
# http://journals.aas.org/authors/references.html
# GitHub has Zenodo DOI integration:
# https://guides.github.com/activities/citable-code/
# What is a CITATION.cff file:
# https://citation-file-format.github.io/
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: online-dot
message: If you use this software, please cite it using the metadata from this file.
date-released: 2023-04-17
url: 'https://github.com/mfouesneau/mf_jupyter'
version: 0.5
type: software
authors:
- family-names: Fouesneau
given-names: Morgan
orcid: 'https://orcid.org/0000-0001-9256-5516'
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1