Write scientific articles in markdown
Project description
texmark
Write scientific articles in markdown
Installation
for development, after cloning:
pip install -e .
and soon:
pip install texmark
Example
See example.md for a sample markdown file with yaml metadata in the header.
The command to convert the markdow to tex is:
texmark example.md
And to convert to PDF
texmark example.md --pdf
For another journal, it is enough to change the journal -> template' field in the yaml metadata. For testing it is also possible to pass -jfor--journal-template`:
texmark example.md --pdf -j science -o build/example-science.pdf --tex build/example-science.tex
See the example tex and pdf results in build
For now only copernicus and science template are available.
Only partial support is provided. Upon submission you'll most likely need
to rework the final latex version, especially to handle things like appendix or special sections.
Alternatively, you may write your custom template (see the advanced section)
Collect figures and tables at the end of the document
Just add
collect_figures_and_tables: true
to your markdown yaml metadata.
Advanced: latex template
The templates are written in jinja2.
Just copy from e.g. texmark/templates/science/template.tex to your own, e.g. custom_template.tex And run again with:
texmark example.md --pdf -j science -o build/example-science.pdf --tex build/example-science.tex --template custom_template.tex
The -j journal template option (here science) is still used to set custom filters (e.g. only \cite for Science, no \citet ; extract specific sections as metadata to be injected as {{section}} instead of {{body}} etc). The machinery is defined in texmark/filters.py and can in principle be extended or copied.
Two approaches are possible:
- just add more filters via the
--filterscommand or in the yaml metadata. - extend the existing filters in a module, e.g. custom_filter.py, that extends the
filtersdict from thetexmark.filtersmodule (see the source code to check the details). And then pass it via--filters-module custom_filterparameter (orcustom_filterin the metadata) to prompt the texmark filter to load that module and make it available via-j your-custom-name. Note that will require you to explicitly pass--templateas well. Unless you overwrite an existing filter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file texmark-0.5.tar.gz.
File metadata
- Download URL: texmark-0.5.tar.gz
- Upload date:
- Size: 112.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee2db10ee46bac15113b482a38d3eae5aa370de707c3b9324e3eac92c8c5911a
|
|
| MD5 |
77c2d1298809bc384f059e8e5a7bc80b
|
|
| BLAKE2b-256 |
bb0db2e438a86737641b6539f739c131617d3d81dc968c9647721dd22b8eb6b1
|
Provenance
The following attestation bundles were made for texmark-0.5.tar.gz:
Publisher:
pypi.yml on perrette/texmark
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
texmark-0.5.tar.gz -
Subject digest:
ee2db10ee46bac15113b482a38d3eae5aa370de707c3b9324e3eac92c8c5911a - Sigstore transparency entry: 217626941
- Sigstore integration time:
-
Permalink:
perrette/texmark@a73f8bded9ab13704b58f08ca5c4988069008f6c -
Branch / Tag:
refs/tags/v0.5 - Owner: https://github.com/perrette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@a73f8bded9ab13704b58f08ca5c4988069008f6c -
Trigger Event:
push
-
Statement type:
File details
Details for the file texmark-0.5-py3-none-any.whl.
File metadata
- Download URL: texmark-0.5-py3-none-any.whl
- Upload date:
- Size: 115.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e4c2e2b06ca7562d7c94f3bb5cef83db940259ad965ef73cb0403d53c35f81c
|
|
| MD5 |
486072d8d46361c88d68acd7ec34b8ce
|
|
| BLAKE2b-256 |
47a57dbafd2951d26c04ccc3c4d25875ee60b187101d880fc9b5a5a626e936af
|
Provenance
The following attestation bundles were made for texmark-0.5-py3-none-any.whl:
Publisher:
pypi.yml on perrette/texmark
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
texmark-0.5-py3-none-any.whl -
Subject digest:
3e4c2e2b06ca7562d7c94f3bb5cef83db940259ad965ef73cb0403d53c35f81c - Sigstore transparency entry: 217626949
- Sigstore integration time:
-
Permalink:
perrette/texmark@a73f8bded9ab13704b58f08ca5c4988069008f6c -
Branch / Tag:
refs/tags/v0.5 - Owner: https://github.com/perrette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@a73f8bded9ab13704b58f08ca5c4988069008f6c -
Trigger Event:
push
-
Statement type: