1

Overleaf gives me an error saying that there's an incomplete if-else. I don't have any if-else in the document. I'm not sure why there's an error.

If I comment out the second \item the compiler is able to render a pdf. So I want to know:

  • How do I add multiple entries as a bullet point?
  • What exactly is the error? As I mentioned, there's no if-else in the document.

Document.tex

\documentclass{resume}

\begin{document}

\fontfamily{ppl}\selectfont

\noindent


\begin{center}

        \csection{Publications}{\small
    \begin{itemize}
         \item \frcontent{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}{Lorem, Ipsum, \textbf{Dolor Sit}, Consectetur Adipiscing, Elit, Sed Do Eiusmod, Tempor Incididunt, Ut Labore, Et Dolore, Magna Aliqua. }

         \item \frcontent{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}{\textbf{Dolor Sit, A.}, Ipsums, C., Harrell, D. F., \& \textbf{Lorem Ipsum}. }
         
    \end{itemize}
    } %Line 19
    
    
    
 


\end{center}
\end{document}


Here's the resume.cls file:

\LoadClass[14pt]{extreport}

\usepackage{ifthen}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{geometry}
\usepackage{array}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{xltabular}
\usepackage{graphicx}
\usepackage{outlines}

\setlist[itemize]{leftmargin=*}
\linespread{1.15}
\geometry{a4paper,
    left={0.5in},
    top={0.4in}, 
    right={0.5in},
    bottom={0.4in}
}
\newcommand\clink[1]{{\usefont{T1}{lmtt}{m}{n} #1 }}
\pagenumbering{gobble}
\newenvironment{csection}[2]{
    \textbf{#1} 
    \vspace{0.15cm} 
    \hrule 
    {#2}
}{}
\newenvironment{frcontent}[4]{
    {
        \textbf{#1} \leavevmode\newline
        {\footnotesize  
            \ifthenelse{\equal{#2}{}}{}{{#2 \leavevmode\newline}}
            \ifthenelse{\equal{#3}{}}{}{{#3 \leavevmode\newline}}
            \ifthenelse{\equal{#4}{}}{}{{\textit{#4}}}
        }
    }
}{}


Here's the compiler's error message.

Incomplete \iffalse; all text was ignored after line 19.
inserted text> 
                \fi 
<*> ExtraResumeFields.tex
                         
The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.

! Emergency stop.
<*> ExtraResumeFields.tex
                         
*** (job aborted, no legal \end found)

 
Here is how much of TeX's memory you used:
 10163 strings out of 478542
 157938 string characters out of 5850413
 485753 words of memory out of 5000000
 27964 multiletter control sequences out of 15000+600000
 406149 words of font info for 34 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 75i,1n,80p,486b,272s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

3
  • By definition of your resume.cls csection is an environment which needs \begin{csection} and \end{csection} but you call it as regular command \csection. Thus, it can't work. I wonder how it can work with out commented itemize. Commented Oct 17, 2023 at 14:17
  • this is unrelated to overleaf, that is just hosting your texlive installation. The error is in ExtraResumeFields.tex which I don't think you have shown? Commented Oct 17, 2023 at 14:17
  • 1
    Also frcontent is an environment requiring 4 arguments, but you've turned it into a command taking two, which won't work. Commented Oct 17, 2023 at 14:27

1 Answer 1

1

In fact, you do have if-else statements in your document, it's just not so obvious because they are hidden inside the definition of frcontent. I think the problem is basically that you're using frcontent as a macro with only 2 arguments, whereas it is actually defined as an environment with 4 mandatory arguments. As pointed out by lukeflo in the comments, the same goes for csection: it is defined as an environment with 2 arguments so it should be used as such.

The following compiles without errors.

\documentclass[14pt]{extreport}

\usepackage{ifthen}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{geometry}
\usepackage{array}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{xltabular}
\usepackage{graphicx}
\usepackage{outlines}

\setlist[itemize]{leftmargin=*}
\linespread{1.15}
\geometry{a4paper,
    left={0.5in},
    top={0.4in}, 
    right={0.5in},
    bottom={0.4in}
}
\newcommand\clink[1]{{\usefont{T1}{lmtt}{m}{n} #1 }}
\pagenumbering{gobble}
\newenvironment{csection}[2]{
    \textbf{#1} 
    \vspace{0.15cm} 
    \hrule 
    {#2}
}{}
\newenvironment{frcontent}[4]{
    {
        \textbf{#1} \leavevmode\newline
        {\footnotesize  
            \ifthenelse{\equal{#2}{}}{}{{#2 \leavevmode\newline}}
            \ifthenelse{\equal{#3}{}}{}{{#3 \leavevmode\newline}}
            \ifthenelse{\equal{#4}{}}{}{{\textit{#4}}}
        }
    }
}{}

\begin{document}
\begin{center}

    \begin{csection}{Publications}{}
    \small
    \begin{itemize}
         \item \begin{frcontent}{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}{Lorem, Ipsum, \textbf{Dolor Sit}, Consectetur Adipiscing, Elit, Sed Do Eiusmod, Tempor Incididunt, Ut Labore, Et Dolore, Magna Aliqua. }{}{}
         \end{frcontent}

        \item \begin{frcontent}{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}{\textbf{Dolor Sit, A.}, Ipsums, C., Harrell, D. F., \& \textbf{Lorem Ipsum}. }{}{}
        \end{frcontent}
         
    \end{itemize}
    \end{csection}

\end{center}
\end{document}
1
  • Indeed. I make a similar mistake all the time. In each case, some macro (not my own) needs more arguments than I supplied. Commented Oct 17, 2023 at 17:07

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.