0

I'm including some code in a paper submission to arxiv (I assume to prevent galley proofs from being uploaded as discussed here: https://academia.stackexchange.com/questions/49386/why-does-arxiv-not-allow-numbered-lines-in-submissions). However, I used the Listings package in Latex and was rejected by the automod because line numbers are not allowed. For completeness, here is the Latex code for the Listings package from How to add line numbers to a program listing/code?:

\usepackage{listings} %For code in appendix
\lstset
{ %Formatting for code in appendix
    language=Matlab,
    basicstyle=\footnotesize,
    numbers=left,
    stepnumber=1,
    showstringspaces=false,
    tabsize=1,
    breaklines=true,
    breakatwhitespace=false,
}

I think the code is more useful with the line numbers since it can go for a few lines in this particular case. So, I'd like to keep including them. I tried changing the numbers=left to numbers=right and changing the numbersep=5pt default to something to keep the numbers in the box, but automod still rejected it.

Has anyone else found an issue with arxiv on this? Did you find a way to put line numbers into the code snippet? Is there a better package or way to still have line numbers but not have them show up for arxiv's moderation?

muzimuzhi Z
  • 26,474
Thomas
  • 13
  • If you can find an arxiv paper that that contains numbered code lines, then you may learn how it achieved this from its source. – muzimuzhi Z Dec 05 '21 at 09:25
  • I just used line numbers for code in code listings, and it worked. I got no error from arxiv. It might be they only allow line numbers for code listing, but not line number for the paper itself. – Nasser Nov 02 '22 at 00:06

1 Answers1

1

arXiv doesn't allow line numbers in the full text, and we don't care if it's within code blocks, or lines of a table, etc., these are more useful with them in place.

This error in arXiv is sometimes a false-positive, so I suggest reaching out through our official support channels if you are still having difficulties. Remember to include your submit-id so that we can find your submission's source more quickly.

Jake
  • 1,159