0

In one of my arxiv articles, I am using listings environment combined with the tcolorbox package. Here's a minimal example:

\documentclass{article}

\usepackage[many,breakable,listings]{tcolorbox}
\tcbset{nobeforeafter} 

\newtcblisting{mylistings}{%
    breakable,
    enhanced,
    size=fbox, 
    pad at break*=1mm,
    opacityfill=1,
    boxrule=1pt,
    before skip=\bigskipamount,
    after={\par\noindent},
    colback=lightgray,
    colframe=lightgray,
    attach title to upper,
    listing only,
    listing options={
        language=Python,
        upquote= true,
        tabsize=4,
        keywordstyle=\bfseries,
        basicstyle=\small\ttfamily,
        basewidth=.5em,
        aboveskip=0pt,
        belowskip=-2pt,
        showstringspaces=false,
        breaklines=true,
        sensitive=true,
    },
}

\begin{document}
\begin{mylistings}
%display latex
\end{mylistings}
\end{document}

In arxiv, it appears to happen that the text after the % sign vanishes even though everything works fine on all of my machines.


Edit 07/22/2020:

The output in arxiv looks as follows:

enter image description here

5
  • Remember that arxiv is using a 4+ years old latex installation (probably texlive 2016). Tcolorbox have probably got some updates since then. Might not be a good idea to apply advanced packages for stuff that goes onto arxiv
    – daleif
    Commented Jul 20, 2020 at 17:56
  • Well, this article is my thesis, and at that time I wrote it, I had other things in mind. Probably, there are special commands to mimic the wanted behavior?
    – YoungMath
    Commented Jul 20, 2020 at 18:43
  • I think it is possible to only submit a pdf file on arxiv, file that was compiled on your personal computer.
    – pluton
    Commented Jul 20, 2020 at 19:56
  • Unfortunately, it is not. arxiv recognizes LaTeX written code and requires to upload the source code. There are tricks possible, like including the pdf in another LaTeX document, yes. However, it would be nice when it can be worked out without any tricks.
    – YoungMath
    Commented Jul 21, 2020 at 8:19
  • What is the trick of including a pdf in another Latex document? Thx
    – pluton
    Commented Jul 23, 2020 at 12:40

1 Answer 1

2

Your minimal working example appears to work just fine in arXiv, and compiles with identical output in texlive 2020. minimal working example, compiled in arXiv

I see that it's rotating due to the stamping operation, so if you want to disable that, you'll need to supply a 00README.XXX plain text file with the appropriate control value. If you are having a specific issue, please contact arXiv help along with your submit-id for specific assistance relative to your source.

5
  • I checked again, and the text after the percent sign still vanishes in arxiv. I've added a screenshot in my original post. In case this might be important: I use arxiv-collector to upload the tex file.
    – YoungMath
    Commented Jul 22, 2020 at 20:25
  • It looks like the arxiv-collector package is stripping comments. I see in the submission uploaded to arXiv, that there's nothing after the %.
    – Jake
    Commented Jul 22, 2020 at 20:29
  • (as an arXiv admin, I can see these things when I have the submit-id, which was why I suggested pinging help earlier)
    – Jake
    Commented Jul 22, 2020 at 20:32
  • according to the project site for github.com/djsutherland/arxiv-collector it looks like the default behavior is to strip the comments. So what's being left behind is just the %, which explains the output of what you're seeing.
    – Jake
    Commented Jul 22, 2020 at 21:00
  • Okay, that's perfect. Then I know where the behavior comes from, and I can fix this. Thank you! :)
    – YoungMath
    Commented Jul 22, 2020 at 21:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .