{"id":19345224,"url":"https://github.com/djsutherland/arxiv-collector","last_synced_at":"2025-04-04T09:09:55.206Z","repository":{"id":44386620,"uuid":"154953619","full_name":"djsutherland/arxiv-collector","owner":"djsutherland","description":"A little Python script to collect LaTeX sources for upload to the arXiv.","archived":false,"fork":false,"pushed_at":"2024-08-07T15:06:17.000Z","size":66,"stargazers_count":351,"open_issues_count":12,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T08:08:48.081Z","etag":null,"topics":["arxiv","latex","latexmk","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djsutherland.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-27T10:53:07.000Z","updated_at":"2025-03-26T21:52:37.000Z","dependencies_parsed_at":"2024-11-24T06:01:01.587Z","dependency_job_id":"534a2baf-8f5b-4071-ad1c-769c907b1488","html_url":"https://github.com/djsutherland/arxiv-collector","commit_stats":{"total_commits":97,"total_committers":5,"mean_commits":19.4,"dds":"0.22680412371134018","last_synced_commit":"e9f02da3983665a08af16b84c4aaaf39b0ac5c1b"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djsutherland%2Farxiv-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djsutherland%2Farxiv-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djsutherland%2Farxiv-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djsutherland%2Farxiv-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djsutherland","download_url":"https://codeload.github.com/djsutherland/arxiv-collector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149505,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arxiv","latex","latexmk","python"],"created_at":"2024-11-10T04:05:46.362Z","updated_at":"2025-04-04T09:09:55.190Z","avatar_url":"https://github.com/djsutherland.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"A small script to collect your LaTeX files for submission to the arXiv. Particularly useful if you use biblatex, and you can [use it directly on Overleaf](#using-directly-on-overleaf).\n\n## Usage\n\nInstall with `pip install arxiv-collector` or `conda install -c conda-forge arxiv-collector` – or just download [`arxiv_collector.py`](arxiv_collector.py), it's a stand-alone script with no dependencies. Works with any reasonable version of Python 3, or 2.7 if you really must.\n\nUse with `arxiv-collector` from your project's main directory, or `arxiv-collector file.tex` if you have more than one `.tex` file and it can't guess correctly which one to use; `arxiv-collector --help` for more.\n\n\n## Main features:\n\n- By default, strips potentially-embarrassing comments from your uploaded `.tex` files. (Use `--no-strip-comments` to turn this off; it's based on a regular expression, and it's definitely possible for it to screw up, especially if you use `%` in a `verbatim` block or something.)\n\n- Includes the necessary parts of any system package you tell it to upload. By default, this includes biblatex (if you use it) to avoid errors like\n\n\u003e Package biblatex Warning: File '\u003cfile\u003e.bbl' is wrong format version\n\n- Only uploads things you actually use: if you have an image you're not including anymore or whatever, doesn't upload it.\n\n\n## Requirements:\n\n- A working installation of [`latexmk`](http://personal.psu.edu/jcc8/software/latexmk/), on your PATH. (This is used to make the `.bbl` file and to track which files are used.)\n  - If you have working TeX and Perl installations, you likely already have `latexmk` even if you don't use it. If you don't, you can either install it the \"normal\" way (`tmlgr install latexmk`, `apt-get install latexmk`, ...), or just grab the script with `arxiv-collector --get-latexmk path/to/output/latexmk`.\n  - If `latexmk` isn't on your PATH for whatever reason, add `--latexmk ./path/to/latexmk` to your `arxiv-collector` call.\n  - **NOTE:** `latexmk` version 4.63b has broken dependency tracking, which means `arxiv-collector` won't work with it. You can either update it with your package manager, or you can get a working version, e.g. 4.64a, with `arxiv-collector --get-latexmk path/to/output/latexmk`, and either put it in e.g. `~/bin` or pass `--latexmk` to your `arxiv-collector` invocations.\n\n\n## Caveats\n\nThe script may or may not work if you do something weird with your project layout / etc; always check that the arXiv output pdf looks right. [Let me know](https://github.com/djsutherland/arxiv-collector/issues/new) if you run into any problems, including a copy of the not-working project if possible.\n\nIn particular, if you include figures or other files with absolute paths (`\\includegraphics{/home/me/wow.png}` instead of `\\includegraphics{../wow.png}`), the script will think it's a system file and not include it by default. You can hack it with `--include-packages` to include any directory name in the path.\n\n\n## Using directly on Overleaf\n\nIt's easy to set up Overleaf to run the script on each compilation, so that you're always ready to upload to arXiv at a moment's notice! (You can of course comment out or remove the lines below after running it once, but it shouldn't add much overhead to just do it every time.)\n\nFirst, add `arxiv_collector.py` to your project. You can do \"New file\", \"From external url\", then put in `https://raw.githubusercontent.com/djsutherland/arxiv-collector/master/arxiv_collector.py`.\n\nNow, [add a file called `.latexmkrc`](https://www.overleaf.com/learn/latex/Articles%2FHow_to_use_latexmkrc_with_Overleaf:_examples_and_techniques) if you don't have one already. This is a control file that tells `latexmk` how to compile your project (which is what Overleaf uses behind the scenes). If you use something slightly complicated like an index or a glossary, you might need to add in [Overleaf's default settings file](https://www.overleaf.com/learn/how-to/How_does_Overleaf_compile_my_project%3F), which this will override, but for 95% of projects you don't need to worry about this.\n\nAdd to the `.latexmkrc` file (whether you're starting from blank or from Overleaf's default, doesn't matter) the following contents:\n```\n$dependents_list = 1;\n$deps_file = \".deps\";\n\nEND {\n  system(\"python arxiv_collector.py --latexmk-deps $deps_file\");\n}\n```\n\nNow, after you compile, you can download `arxiv.tar.gz` by clicking on the blue page icon to the right of the big green Recompile button (\"Logs and output files\"), clicking on \"Other logs \u0026 files\", then choosing `arxiv.tar.gz`. Upload that file to the arXiv, and you should be good!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjsutherland%2Farxiv-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjsutherland%2Farxiv-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjsutherland%2Farxiv-collector/lists"}