I am using this template to generate a bioRxiv preprint. This includes two files merged together, the main text and supplementary information. However, when page numbering, the bottom-right of the first page shows

enter image description here

Showing 1-21, rather than just 1, where 21 is the last page of the supplementary info. The other pages are single-numbered. Is it possible to simply remove this feature on the first page, or change it to show only the pages on the main text?

My attempt: Without delving into the bioRxiv template, I was able to use setcounter at the end of the supplementary info as follows


where 17 is the last page of the main text. This fixes the issue, but it generates an extra blank page. Could I somehow hide/ghost this page, yet keeping the last page number fixed?

  • 2
    Please read about Minimal Working Example and update your question accordingly.
    – Miyase
    Commented Dec 26, 2022 at 15:08
  • @Miyase unfortunately I am not able to provide an MWE, but I will edit it to explain my attempted workaround.
    – sam wolfe
    Commented Dec 26, 2022 at 15:37

2 Answers 2


The class file zHenriquesLab-StyleBioRxiv.cls contains this definition:

    \footerfont \@leadauthor\ifnum \value{authors} > 1\hspace{2pt}\textit{et al.}\fi\hspace{7pt}|\hspace{7pt}bio\textcolor{red}{R}$\chi$iv\hspace{7pt}|\hspace{7pt}\today\hspace{7pt}|\hspace{7pt}\thepage\textendash\pageref{LastPage}

Make that

    \footerfont \@leadauthor\ifnum \value{authors} > 1\hspace{2pt}\textit{et al.}\fi\hspace{7pt}|\hspace{7pt}bio\textcolor{red}{R}$\chi$iv\hspace{7pt}|\hspace{7pt}\today\hspace{7pt}|\hspace{7pt}\thepage

i.e. remove \textendash\pageref{LastPage} }}

There is also an error message about cleveref. Remove the first occurrence of \RequirePackage{cleveref}

And, by the way, the watermark doesn't work with modern LaTeX. So take out (or comment out) this part:

  • This is great, exactly what I was looking for! I didn't know about the lastpage package, quite useful. Interestingly enough, if you label the last page of the main text (\label{maintext_finalpage}, e.g.), you can simply reference it by changing the argument in \pageref, in that same code. No need for \setcounter shenanigans. Thank you!
    – sam wolfe
    Commented Dec 26, 2022 at 16:17
  • This is a minor comment: for some reason, when clicking the linked page (the 17, in 1-17, e.g.), it does not directly move me to that page, but rather the page where the bibliography starts. Note that I have put the label \label{maintext_finalpage} after all the code in 01_Article_MainText.text, including the bibliography. Any idea why?
    – sam wolfe
    Commented Dec 26, 2022 at 16:24
  • Adding \phantomsection before \label solved it.
    – sam wolfe
    Commented Dec 26, 2022 at 16:29

The following code did the trick


Would be nice, however, to either make it automatic (instead of manually inputting the number of the page, 17) or actually edit the bioRxiv \documentclass. Any suggestions are appreciated.

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