arxiv-collector

授权协议 BSD-3-Clause License
开发语言 Python
所属分类 企业应用、 LaTeX排版系统
软件类型 开源软件
地区 不详
投 递 者 洪伟彦
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

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.

Usage

Install with pip install arxiv-collector or conda install -c conda-forge arxiv-collector – or just download 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.

Use 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.

Main features:

  • 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.)

  • 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

Package biblatex Warning: File '.bbl' is wrong format version

  • Only uploads things you actually use: if you have an image you're not including anymore or whatever, doesn't upload it.

Requirements:

  • A working installation of latexmk, on your PATH. (This is used to make the .bbl file and to track which files are used.)
    • 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.
    • If latexmk isn't on your PATH for whatever reason, add --latexmk ./path/to/latexmk to your arxiv-collector call.
    • 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.

Caveats

The 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 if you run into any problems, including a copy of the not-working project if possible.

In 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.

Using directly on Overleaf

It'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.)

First, 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.

Now, add a file called .latexmkrc 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, which this will override, but for 95% of projects you don't need to worry about this.

Add to the .latexmkrc file (whether you're starting from blank or from Overleaf's default, doesn't matter) the following contents:

$dependents_list = 1;
$deps_file = ".deps";

END {
  system("python arxiv_collector.py --latexmk-deps $deps_file");
}

Now, 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 & files", then choosing arxiv.tar.gz. Upload that file to the arXiv, and you should be good!

 相关资料
  • Description: The project hosts an aesthetic and simple LaTeX style suitable for "preprint" publications such as arXiv and bio-arXiv, etc.It is based on the nips_2018.sty style. This styling maintains

  • arXiv Vanity arXiv Vanity renders papers from arXiv as responsive web pages so you don't have to squint at a PDF. It turns this sort of thing: Into this: This is the web interface for viewing papers.

  • arxiv_latex_cleaner This tool allows you to easily clean the LaTeX code of your paper to submit toarXiv. From a folder containing all your code, e.g. /path/to/latex/, itcreates a new folder /path/to/l

  • To train the model, simply run train.py: $ python3 train.py Then, to generate a sample abstract, run sample.py: $ python3 sample.py If you want to change the starting seed of the generated abstrac

  • 问题内容: 假设您有一个数字。中的值可以是类型,等等。声明时,可以使用通配符()声明,也可以不使用通配符。 所以,现在我想在和它所有的使用(显然下面的代码只是为了说明问题的例子)。让我们开始流式传输: 但是,我不能在:上执行相同的操作 编译器在调用时抱怨以下消息: Test.java:找不到符号 symbol:方法intValue() 位置:java.lang.Object类型的变量编号 从编译器

  • 问题内容: 我想通过Java 8 和接口将a 转换为via ,我可以使用两个选项。 首先: 第二个: 哪个是更好的选择?什么时候应该使用每个选项? 问题答案: 在处理并行流时,它们之间是有区别的。 ->是非并行收集器 ->是并发收集器(这可以从它们的特征中看出)。 区别在于 toMap 将创建多个中间结果,然后将其合并在一起(多次调用该Collector的Supplier),而 toConcurr