0

I just added a PDF in my Overleaf project (created by myself from Samsung Notes, never had a problem before) and adding this pdf using

\includepdf[pages=-]{Tp12.pdf}

(see pictures below) with

\usepackage{pdfpages}

caused me a timeout error:

timeout error

Here is my pdf's location (the two first never caused any problem, and are not shorter).

pdf location

This pdf has a size of 4,97 Mo.

Here is my head declaration in main.tex:

\documentclass{report}

\sceau{Pictures/sceau.jpg}

\usepackage{pdfpages}
\usepackage{xurl}
\usepackage{multicol}
\newenvironment{Figure}
  {\par\medskip\noindent\minipage{\linewidth}}
  {\endminipage\par\medskip}
  
  \usepackage{hyperref}

\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=teal,      
    urlcolor=cyan,
    pdftitle={Overleaf Example},
    pdfpagemode=FullScreen,
    }

\urlstyle{same}

\definecolor{RED}{RGB}{247,197,197}
\definecolor{GREEN}{RGB}{197,247,232}
\definecolor{GREEN_OCTAVE}{RGB}{68,200,81}
\definecolor{BLUE}{RGB}{197,232,247}
\definecolor{GRAY}{gray}{0.9}
\definecolor{lilas}{RGB}{238, 130, 238}

%+++++++++++New Commands++++++++++++
\newcommand{\bc}{\begin{center}}
\newcommand{\ec}{\end{center}}
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\def\bi{\begin{enumerate}}
 \def\ei{\end{enumerate}}
 \newcommand{\dst}{\displaystyle}
\newcommand{\ba}{\begin{array}}
\newcommand{\ea}{\end{array}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\K}{\mathbb{K}}
\newcommand{\ra}{\rightarrow}
\newcommand{\Ra}{\Rightarrow}
\newcommand{\lra}{\longrightarrow}
\newcommand{\Lra}{\Longrightarrow}
\newcommand{\Eq}{\Leftrightarrow}
\newcommand{\Leq}{\Longleftrightarrow}
\newcommand{\Lagr}{\mathcal{L}}

\addbibresource{biblio.bib}

\begin{document}

I hope I gave everything you need. I can't share the whole project for privacy issues.

9
  • 4
    what do you expect anyone here can say? The system has a timelimit so any big enough project will give that error. It is not a tex error it is just a commercial decision to limit the processing time unless you pay more. May 20, 2022 at 18:27
  • 5
    The documentclass report doesn't define \sceau, so \sceau can't occur right after \documentclass without triggering error-messages. Seems \addbibresource right before \begin{document} is not defined by any of the packages exhibited in your preamble. I doubt you gave sufficient information. Portions of code not revealed might form a never ending tail-recursive loop or provide another reason for reaching processing-time-limit. How can one know? If \includepdf[pages=-]{Tp12.pdf} is all you added, then reaching the processing-time limit is likely not to be due to a TeX-related bug. May 20, 2022 at 18:45
  • 1
    @EmileCouzin Overleaf is just a Web-Interface for calling the TeX-program of some release of the TeX-Distribution TeX Live via internet. (Afaik with Overleaf they use some Ubuntu docker-image. Which Ubuntu depends on which release of Tex Live you select after clicking "Menu" on the top-left corner of the window of the browser where overleaf is displayed.)You can look at the error-messages written by the TeX-compiler to the .log-file by clicking the symbol for "Logs and output files" at the right of the "Recompile" button and then clicking "Expand" in the field "Raw logs". If this reveals ... May 21, 2022 at 9:07
  • 1
    @EmileCouzin ... If this reveals that the reaching of the processtime-limit is not due to a bug in your TeX-code but is due to the hugeness of your project, consider installing/using a TeX Distribution on your local machine instead of using overleaf via internet. May 21, 2022 at 9:08
  • 1
    Andreas has uploaded a new version to ctan that will not loop forever here (alhough that will not be on overleaf until the next texlive update) May 22, 2022 at 20:11

2 Answers 2

4

You can simplify your example to

\documentclass{article}

\usepackage{pdfpages}

\begin{document}

aaa

\includepdf[pages=-]{missing.pdf}

\end{document}

This gives the error

! Package pdfpages Error: Cannot find file `missing.pdf'.

See the pdfpages package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.9 \includepdf[pages=-]{missing.pdf}
                                     
? 

If you choose to scroll past the error (effectively what overleaf will do for you) then tex will try to recover but gives a series of spurious internal errors and never terminates

! Package pdfpages Error: Cannot find file `missing.pdf'.

See the pdfpages package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.9 \includepdf[pages=-]{missing.pdf}
                                     
? 

! Package pdfpages Error: Cannot find file `-'.

See the pdfpages package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.9 \includepdf[pages=-]{missing.pdf}
                                     
? 
! Undefined control sequence.
\AM@expand@range ...M@i \relax \@tempcntb =\AM@ii 
                                                  \relax \ifnum \@tempcnta <...
l.9 \includepdf[pages=-]{missing.pdf}
                                     
? 
! Undefined control sequence.
\AM@expand@range ...M@i \relax \@tempcntb =\AM@ii 
                                                  \relax \ifnum \@tempcnta <...
l.9 \includepdf[pages=-]{missing.pdf}
                                     
? 
! Missing number, treated as zero.
<to be read again> 
                   \relax 
l.9 \includepdf[pages=-]{missing.pdf}
                                     
? 
....

Always check the log file for errors

enter image description here

3
  • 2
    Overleaf could make this a bit easier to find, I retracted a close vote on the question, but the genral principle of always check the log file does apply, even on Overleaf. May 21, 2022 at 7:01
  • Why does TeX never terminate here? What about the “that makes 100 errors” barrier? May 25, 2022 at 15:41
  • 1
    @HenriMenke I really didn't look: it's just usual random unplanned expansion nonsense and evenally after a dozen or so errors gets to \def\foo{\foo}\foo and just hangs in a loop. I mailed him and Andreas has fixed the package so it doesn't do that any more. May 25, 2022 at 15:44
0

I just found out what the problem was: I wrote \includepdf[pages=-]{Tp12.pdf} instead of \includepdf[pages=-]{pdf/Tp12.pdf} ! It was just that, I forgot to put the file's name before !

4
  • 1
    that would give a tex missing file error May 21, 2022 at 5:52
  • But it didn't ! May 21, 2022 at 6:03
  • 2
    Impossible to say as it doesn't correspond to the code or project that you showed May 21, 2022 at 6:09
  • Oh, sorry I made a mistake by writing "Pdf12" instead of "Tp12" in my answer ^^ It's edited and now corresponds to my code May 21, 2022 at 6:45

You must log in to answer this question.

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