{ "info": { "author": "Jonathan Sick", "author_email": "jonathansick@mac.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7" ], "description": "########\npreprint\n########\n\n*Tools for preparing astrophysics papers.* Preprint lets you automatically compile, typeset document differences and package the manuscript for publication.\n\nInstallation requires `cliff `_, the `watchdog `_ package, the `GitPython >=0.3 `_ package, and a recent version of setuptools.\nPreprint also works well with `latexmk `_ for compiling latex, and `vc `_ for adding version control meta data to compiled documents.\n\nTo install from PyPI::\n\n pip install preprint\n\nOr to install from source, check the code out and run::\n\n python setup.py install\n\nAfter installing, try ``preprint --help`` for more info.\n\nPreprint currently supports the following commands (see below for a reference):\n\n- ``preprint make`` to do a one-off compilation of the paper,\n- ``preprint watch`` to automatically compile the paper if source is changed,\n- ``preprint diff`` to run ``latexdiff`` against a commit in Git,\n- ``preprint pack`` to package the document for journals or the arXiv.\n- ``preprint init`` to setup your project with ``preprint.json`` configurations.\n\nCheck the `GitHub Issues `_ to submit additional ideas.\n\n===================\nA taste of preprint\n===================\n\nPreprint is pretty easy to use.\nHere's a few commands to give a flavour of what it can do::\n\n preprint init # this is all the setup you need\n preprint make # compiles the doc according to your compile command\n preprint watch --diff 8a42f2b # live-updating latex diff against git history\n preprint pack my_paper --style arxiv # pack it up for arXiv submission\n\n\n====================================\nConfiguration System / preprint.json\n====================================\n\n``preprint`` configurations are determined from (in order of increasing precedence): internal defaults, a project-specific JSON file, and command line arguments.\n\nTo create a ``preprint.json`` configuration file for your project, from your paper's directory simply run::\n\n preprint init\n\nIt will automatically find the root latex file for your paper.\nYou can open ``preprint.json`` to take a look at its format and modify the configurations further.\nHere is an example of its format::\n\n { \n \"master\": \"paper.tex\",\n \"exts\": [\"tex\", \"pdf\", \"eps\"],\n \"cmd\": \"latexmk -f -pdf -bibtex-cond {master}\"\n }\n\nIf set in ``preprint.json``, any command line setting of the same name does not need to repeated.\n\nList of Configurations\n----------------------\n\nmaster\n (type: string) Name of latex document to be compiled (or the root latex document containing `\\documentclass`).\n Defaults to ``'article.tex'``, but ``preprint init`` will set this for you.\n\nexts\n (type: list of strings) List of file extensions used by the ``watch`` command.\n If any file with this extension in changed in the project, a compile will be triggered by ``preprint watch``.\n This setting is also used by ``preprint pack`` to figure out your preferences for figure file types.\n For example, ``[\"tex\", \"pdf\", \"eps\"]`` will try to include ``pdf`` figures before falling back to ``eps`` files, while ``[\"tex\", \"eps\", \"pdf\"]`` will have the opposite behavior.\n Defaults to ``[\"tex\", \"pdf\", \"eps\"]``.\n\ncmd\n (type: string) The command to run when making a document.\n This is used by ``preprint make`` and ``preprint watch`` (``preprint diff`` and ``preprint watch --diff`` will always use latexmk).\n The command string can include ``{master}`` to interpolate the path of the master tex file.\n Defaults to ``\"latexmk -f -pdf -bibtex-cond {master}\"``.\n\n=================\nCommand Reference\n=================\n\ninit\n----\n\n``preprint init`` will create a default ``preprint.json`` configuration file for your project.\n\nUsage::\n\n preprint init\n\nAfter running, take a look at ``preprint.json`` to edit the configurations.\nSee *'Configuration System / preprint.json'* (above) for more information.\n\nmake\n----\n\n``preprint make`` will perform a one-off compilation of your paper.\n\nUsage::\n\n preprint [--master MASTER] make [--cmd CMD]\n\n Optional arguments:\n --master Name of the root LaTeX file (eg, paper.tex)\n --cmd Name of command to run when a change occurs\n\n\nIf ``preprint.json`` is setup, you can just run::\n\n preprint make\n\n\nwatch\n-----\n\n``preprint watch`` will automatically compile your paper if a TeX or graphics source file is changed.\n\nUsage::\n\n preprint [--master MASTER] watch [--exts EXT1, ..., EXTN; --cmd CMD; --diff [SHA]]\n\n Optional arguments:\n --master Name of the root LaTeX file (eg, paper.tex)\n --exts List of file extensions (defaults to `pdf eps tex`)\n --cmd Name of command to run when a change occurs\n --diff Run a latexdiff compile against the given commit SHA from the git repository (HEAD if blank).\n\nFor example, to continuously compile the document whenever ``.tex`` or figures have changed, and assuming you've setup a ``preprint.json`` file with the name of your master document, just run::\n\n preprint watch\n\nTo continuously run a latexdiff-based compile, showing all changes you've made against the HEAD of the git repository, run::\n\n preprint watch --diff\n\nThe document will be saved to ``build/PAPER_NAME_diff.pdf``.\nThis is a nice way of keeping track of what you're doing.\n\nFinally, to continuously run a latexdiff-based compile against an arbitrary commit in your git history, just copy the commit SHA fragment (say, ``b91688d``) and run::\n\n preprint watch --diff b91688d\n\n\ndiff\n----\n\n``preprint diff`` will typeset the document with revisions highlighted between the currently checked-out version, and a previous git commit.\nThis command is powered by the `latexdiff `_ (which is probably installed with your tex distribution).\nThe command also requires `latexmk `_ to compile the difference document.\nThis command is compatible with documents that use ``\\input{}`` to combine text documents; in fact, included documents are inlined recursively.\n``preprint diff`` was inspired by `this blog post `_ by Andy Casey.\n\nUsage::\n\n preprint [--master MASTER] diff PREV_SHA [-n NAME]\n\n Arguments:\n PREV_SHA A SHA fragment or tag name pointing to the previous revision.\n\n Optional arguments:\n --master Name of the root LaTeX file (eg, paper.tex)\n -n Output name of the difference document (eg. diff.tex)\n\n\npack\n----\n\n``preprint pack`` prepares a preprint for submission to a journal.\nThis pipeline includes:\n\n1. Creating a build directory and copying over just the required manuscript files,\n2. Inlining all inputted latex files (either with ``\\input{}`` or ``\\InputIfFileExists`` syntax),\n3. Copying the ``.bbl`` bibliography or inlining it into the manuscript, as necessary.\n4. Moving figures to the root directory and updating tex source,\n5. Deleting comments; don't be a tweet on @OverheardOnAph,\n6. Renaming figures to conform to AASTeX if necessary,\n7. Making JPEG versions of figures to to fulfill arXiv file size requirements, if necessary. This requires `imagemagick `_.\n\nThis command is inspired by Erik Tollerud's `Astropysics package `_, but is designed around regular expressions for text transformation.\nThe implementation should thus be easier.\n\nUsage::\n\n preprint [--master MASTER] pack NAME [--style STYLE; --exts EXT1, ..., EXTN]\n\n Arguments:\n NAME Name of the build. Products copied to build/NAME directory.\n\n Optional arguments:\n --master Name of the root LaTeX file (eg, paper.tex)\n --exts File format priority for figures (e.g., ``eps, pdf``)\n --style Style for the build (default is ``aastex``, can also be ``arxiv``).\n --maxsize Maximum size of figure in MB before compressing into jpg (for\n ``arxiv``). Default is 2.5 MB.\n\nNote that the ``--exts`` option can be used to prefer a certain file format for the build if you maintain both EPS and PDF figure sets.\nFor example, to generate a manuscript for a AAS journal, run::\n\n preprint pack my_aas_build --style aastex --exts eps\n\nAnd to build for the arxiv, where PDF figures are preferred, run::\n\n preprint pack my_arxiv_build --style arxiv --exts pdf\n\n=====\nAbout\n=====\n\n`Preprint is developed on GitHub `_.\nContributions and suggestions are welcome;\nread `the CONTRIBUTING guidelines `_ for instructions on how to help.\n\nCopyright 2014 Jonathan Sick, @jonathansick\n\nLicensed BSD.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jonathansick/preprint", "keywords": null, "license": null, "maintainer": null, "maintainer_email": null, "name": "preprint", "package_url": "https://pypi.org/project/preprint/", "platform": "Any", "project_url": "https://pypi.org/project/preprint/", "project_urls": { "Homepage": "https://github.com/jonathansick/preprint" }, "release_url": "https://pypi.org/project/preprint/0.3/", "requires_dist": null, "requires_python": null, "summary": "Tools for writing latex papers", "version": "0.3" }, "last_serial": 1378922, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d8fc19f2d80bb45e987ba9854ba11064", "sha256": "23986c85e91cbdb2c3f18d258cb04342e02ee2d7309ebc210486d7bf28240e18" }, "downloads": -1, "filename": "preprint-0.1.tar.gz", "has_sig": false, "md5_digest": "d8fc19f2d80bb45e987ba9854ba11064", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12312, "upload_time": "2014-01-21T15:53:31", "url": "https://files.pythonhosted.org/packages/a1/f2/189990bd6bf22a20c88a8a500e0442da9074f14138373eaede34fcebe4f4/preprint-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "ff5290ac8d4da553ac252ab4ce2262f5", "sha256": "99ec948cf39ccc600485c70aa9aeb8d945226e78275ebff2d8383e1e328a82c9" }, "downloads": -1, "filename": "preprint-0.2-py2.7.egg", "has_sig": false, "md5_digest": "ff5290ac8d4da553ac252ab4ce2262f5", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 38124, "upload_time": "2014-10-02T15:32:26", "url": "https://files.pythonhosted.org/packages/23/f5/aa98dda8e91671bd7f70454a325392b63291826daf0314737549b26bf532/preprint-0.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "4a0246c1d1146145af352427b9a18aa4", "sha256": "7b70d7efbad8793237625b722bcf7b983dec21f399225313247f9e3f8a5eca00" }, "downloads": -1, "filename": "preprint-0.2.tar.gz", "has_sig": false, "md5_digest": "4a0246c1d1146145af352427b9a18aa4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16717, "upload_time": "2014-05-11T18:15:49", "url": "https://files.pythonhosted.org/packages/5c/38/c45e4553e951d552fa840ed9f1a4a378e2effc10ca3339ce40174971d201/preprint-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "185ce1053bbc482e0c07ddabadeea6de", "sha256": "44c81727179067db234a081923d6d31f620fad396c62b15dad4f75b2abc84b01" }, "downloads": -1, "filename": "preprint-0.2.1.macosx-10.9-x86_64.tar.gz", "has_sig": false, "md5_digest": "185ce1053bbc482e0c07ddabadeea6de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25574, "upload_time": "2014-10-02T15:32:30", "url": "https://files.pythonhosted.org/packages/a3/82/87fb768e97b698b9ad6b2533521d10d96d162d238d8c9c87974dfb4c25c7/preprint-0.2.1.macosx-10.9-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "9e8eed74f94fb0ef363c7795b7698eeb", "sha256": "b63749bc30605b7f87bbe820665053760847a3e882b7ddc4c636cd348793f6ed" }, "downloads": -1, "filename": "preprint-0.2.1.tar.gz", "has_sig": false, "md5_digest": "9e8eed74f94fb0ef363c7795b7698eeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16880, "upload_time": "2014-10-02T15:32:33", "url": "https://files.pythonhosted.org/packages/2c/2f/97f60893480fe6ee26c935d218ba8bd8c9d47fb3414572fe9804f993d03b/preprint-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "1c59f3a429135e4c746fcc540d6b1e0f", "sha256": "536e94256cf1f7f66fb291414341b493c88cc8158825af535904ed1f568771f8" }, "downloads": -1, "filename": "preprint-0.2.2-py2.7.egg", "has_sig": false, "md5_digest": "1c59f3a429135e4c746fcc540d6b1e0f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 29116, "upload_time": "2015-01-12T02:12:06", "url": "https://files.pythonhosted.org/packages/0f/16/30dc907fb48489bbadae9f569d2a5f6c7b988b8c40b81d182431d2496ed2/preprint-0.2.2-py2.7.egg" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "7f7d98619945a01dbb28ee6e0d9dbbbf", "sha256": "6b18504e64fd8ce2f72e26298e4ecafec047434972b09a4b51b3b7c894e66390" }, "downloads": -1, "filename": "preprint-0.3.macosx-10.10-x86_64.tar.gz", "has_sig": false, "md5_digest": "7f7d98619945a01dbb28ee6e0d9dbbbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20424, "upload_time": "2015-01-12T02:12:10", "url": "https://files.pythonhosted.org/packages/ec/97/b9b47109cee6a33b3dd04464c30ed6d30af8ad436b5d2783791af9bde3fe/preprint-0.3.macosx-10.10-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "d0a82102e3c8a5ec00abb7f49c826aa3", "sha256": "6d18ae9307a402f061934d8d8807c8c55d55d443e236348a54d1088a50cd672d" }, "downloads": -1, "filename": "preprint-0.3.tar.gz", "has_sig": false, "md5_digest": "d0a82102e3c8a5ec00abb7f49c826aa3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15473, "upload_time": "2015-01-12T02:12:14", "url": "https://files.pythonhosted.org/packages/53/b5/a9bbea4df821e87149cad51ed30352a4dca2aa0f34a36a64908995e6045d/preprint-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7f7d98619945a01dbb28ee6e0d9dbbbf", "sha256": "6b18504e64fd8ce2f72e26298e4ecafec047434972b09a4b51b3b7c894e66390" }, "downloads": -1, "filename": "preprint-0.3.macosx-10.10-x86_64.tar.gz", "has_sig": false, "md5_digest": "7f7d98619945a01dbb28ee6e0d9dbbbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20424, "upload_time": "2015-01-12T02:12:10", "url": "https://files.pythonhosted.org/packages/ec/97/b9b47109cee6a33b3dd04464c30ed6d30af8ad436b5d2783791af9bde3fe/preprint-0.3.macosx-10.10-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "d0a82102e3c8a5ec00abb7f49c826aa3", "sha256": "6d18ae9307a402f061934d8d8807c8c55d55d443e236348a54d1088a50cd672d" }, "downloads": -1, "filename": "preprint-0.3.tar.gz", "has_sig": false, "md5_digest": "d0a82102e3c8a5ec00abb7f49c826aa3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15473, "upload_time": "2015-01-12T02:12:14", "url": "https://files.pythonhosted.org/packages/53/b5/a9bbea4df821e87149cad51ed30352a4dca2aa0f34a36a64908995e6045d/preprint-0.3.tar.gz" } ] }