ReScience / template

Template for article submission

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

arXiv deposits with ReScience template

labarba opened this issue Β· comments

Hi folks! πŸ‘‹
With my student @mesnardo, we are about to make our first submission to ReScience C πŸš€
Here's our article repo: http://github.com/barbagroup/rescience-rollingpitching

We want to upload the preprint to arXiv, and why not do so with the ReScience C styling, which looks so good. Here's another author's preprint on arXiv: https://arxiv.org/abs/2008.07380

We thought we could just delete the .yaml and .py files after processing, and make a .zip with the rest for uploading to arXiv (see the arXiv branch on our repo), but this will bring all the fonts, which arXiv probably won't like.

What to do?

@broukema β€” could you share with us how you did it?

Over email, @rougier suggested that the template might be modified to use the Roboto/Roboto Slab packages, instead of local fonts. arXiv processes submissions with TexLive 2020.

You can see the exact set of source files by going to https://arxiv.org/abs/2008.07380; clicking on Other formats (top right in the Download section); and downloading the gzipped tar file. :)

ArXiv now has a web upload format (as opposed to the original only-email-based submission) and allows a draft to be stored for a short time (1-2 weeks, I think?). So you can try many times and only stress a robot rather than a human.

You can go to the source repository: https://codeberg.org/boud/RBG08 to see the history of what I changed and when. I don't remember if I needed any last-minute hacks.

This raises a side issue (feel free to copy/paste/redirect this) for ReScience C in general. Pretending to be someone who knows nothing about my article except for the Zenodo version-of-record, it takes quite a large number of URL clicks to get to the RBG08 source code of my ReScience C article. The shortest path I found was 3 clicks from my Zenodo article:

@pdebuyl - you might want to add https://codeberg.org/boud/RBG08 to the Zenodo record https://zenodo.org/record/3956058 as metadata for something like "source files", although this might be ambiguous in this context, so choose whatever description seems to make the most sense. Metadata added to Zenodo do not modify the timestamp (as opposed to ArXiv: some metadata can be changed without modifying the timestamp, but modifying the Comments: field does modify the timestamp, making a new version). Even better: first add the four URLs of metadata from the bottom of the first pdf page as Zenodo metadata, and then add the source URL. Just a suggestion...

@broukema Does that mean you upload the font to arXiv?

We have an arxiv branch on the repository that has the non-tex files removed. My first hopeful try was downloading that as a .zip and uploading it to arXiv. It complained that the file set included a .bib and warned me that the auto-tex processing doesn't run bibtex, so I had to add the .bbl. I ran the makefile locally on the main branch to generate the .bbl and then added this file for an attempt at compiling it.

The summary is:

Processing Status: Failed: XeTeX/LuaTeX are not supported at current time.

The detailed errors:

! Fatal Package fontspec Error: The fontspec package requires either XeTeX or
(fontspec) LuaTeX.
(fontspec) 
(fontspec) You must change your typesetting engine to,
(fontspec) e.g., "xelatex" or "lualatex"instead of
(fontspec) "latex" or "pdflatex".

Type <return> to continue.
... 

l.45 \msg_fatal:nn {fontspec} {cannot-use-pdftex}

? 
! Emergency stop.

arXiv did not complain about uploading the fonts, but it is unable to process with the fontspec package. SIGH.

How did you get around this, @broukema ?

You can try to add %!TeX program = xelatex at the top of article.tex

Anything that relies on something other than TeX or (PDF)LaTeX will fail. At this time arXiv does not support processing with: XeTeX and its variants including LuaTeX, LyX, or PDFTeX.

From https://arxiv.org/help/faq/mistakes

Thank you! That got it to process by the AutoTeX. But it failed utterly. The first error is:

(./content.tex
! Undefined control sequence.
l.1 \section
{Introduction}
? 
! Emergency stop.

So it looks like it doesn't know to process article.tex first. I added %!TEX root = article.tex on the top of the three other tex files, replaced those files, and tried to process again. FAILED. The first error is:

(./content.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-09-06>
! Undefined control sequence.
l.1 \section
{Introduction}
? 
! Emergency stop.
l.1 \section
{Introduction}
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on content.log.

[verbose]: pdflatex 'content.tex' failed.

Thank you for your help!

Ok, so we need to stick to pdflatex and make use of the Roboto package for font.

I commented and uncommented lines under "Font stack" (line 50) as shown in the modified rescience.cls file in @broukema's repo.

Now it failed thus:

(/texlive/2020/texmf-dist/tex/latex/roboto/T1Roboto-LF.fd)) (./header.tex
! Undefined control sequence.
l.13 ...rent page.north west) {\small \SpaceRoboto
RESCIENCE C};
? 
! Emergency stop.
l.13 ...rent page.north west) {\small \SpaceRoboto
RESCIENCE C};

So I entered new line breaks and commented line 14 as in header.tex in @broukema's repo.

Now it failed thus:

! Undefined control sequence.
\@title ...N \\ } } } \vspace {-.25em} \RobotoCon 
\articleTITLE 
l.20 {\let\newpage\relax\maketitle
} \maketitle
? 
! Emergency stop.

... and I don't quite know where to look for this problem.

Ah! At the end of rescience.cls! Commented that line and re-uploaded.

Now arXiv says:

Processing Status: Succeeded with warnings. We recommend that you
inspect the log (see below).

A R X I V S U B M I T T E D !!!!!!!!

It gave a boat load of warnings (a lot about fonts), the PDF doesn't look as good as the true ReScience template, but it went through!!!
πŸ˜…

@pdebuyl - you might want to add https://codeberg.org/boud/RBG08 to the Zenodo record https://zenodo.org/record/3956058 as metadata for something like "source files", although this might be ambiguous in this context, so choose whatever description seems to make the most sense. Metadata added to Zenodo do not modify the timestamp (as opposed to ArXiv: some metadata can be changed without modifying the timestamp, but modifying the Comments: field does modify the timestamp, making a new version). Even better: first add the four URLs of metadata from the bottom of the first pdf page as Zenodo metadata, and then add the source URL. Just a suggestion...

"https://codeberg.org/boud/RBG08" "is the source this upload is derived from"

I selected "N/A" for "Resource type of the related identifier". It is optional and no entry fitted well.

@broukema any comment on the specifics of the edit? I am waiting for your confirmation.

Do you have a link to the arxiv to check for differences?

@rougier -- it is scheduled to be announced at Tue, 4 May 2021 00:00:00 GMT. I can email you the PDF I downloaded from the preview?

@broukema any comment on the specifics of the edit? I am waiting for your confirmation.

Yes, i agree that these are the best choices. Fine by me to go ahead. :)

@broukema Does that mean you upload the font to arXiv?

No. Whatever hack I did (if needed, I don't remember) should be visible in the source at ArXiv. Anyway, the problem looks like it's solved. :)