title: Extra fi error when compiling LateX file on a different OS
body: <p>This is my first time posting on stackoverflow, I hope I'm doing this right.</p>
  
  <p>I had a LateX file on a windows 7 computer at university. It used to compile perfectly with TeXMaker. Recently, because of the university closing for summer, I had to take it home where I only have a Ubuntu laptop. I downloaded yesterday the latest version of TeX Live - Full as well as the TeXMaker interface using <code>sudo apt install</code>. I tried to open my file, and I get errors. I get the "! Extra \fi" error message for line 25, where I have the <code>\usepackage[toc,page]{appendix}</code> line, and loads of other errors messages, like "! Extra \else." at line 36 (<code>\usepackage{textcomp}</code>).</p>
  
  <p>I have to say that no package was downloaded after the installation of TeXLive Full (which is weird, I don't think the installation downloaded all of them) and that I'm a complete newbie to LateX and on Ubuntu. Does any of you have an idea how to make the file compile properly ? Here's the first lines of the code, that lead to errors.</p>
  
  <pre><code>\documentclass[12pt,twoside]{report}
  \usepackage{etex}
  \usepackage[T1]{fontenc}
  \usepackage{lmodern}
  \usepackage[a4paper]{geometry}
  \usepackage[frenchb]{babel}
  \usepackage{amsmath,amssymb,amsthm}
  \usepackage[utf8]{inputenc} 
  \usepackage{array}
  \usepackage{frenchle}
  \usepackage{caption}
  \usepackage{subcaption}
  \usepackage{graphicx} 
  \usepackage{fancybox} 
  \usepackage{cases}
  \usepackage{eurosym}
  \usepackage{ulem}
  \usepackage{tikz}
  \usepackage[makeroom]{cancel}
  \usepackage{hyperref}
  \usepackage{sidecap}
  \usepackage{listings}
  \usepackage{multicol}
  \usepackage[toc,page]{appendix} 
  \usepackage{wrapfig}
  \usepackage{tocloft}
  \usepackage[ampersand]{easylist}
  \usepackage{xcolor}
  \usepackage{amssymb}
  \usepackage{underscore}
  \usepackage{textcomp}
  \usepackage{tikz}
  
  
  \setlength{\oddsidemargin}{-1.cm} 
  \setlength{\evensidemargin}{0.cm} 
  \setlength{\topmargin}{-1.cm} 
  \setlength{\textheight}{24.cm} 
  \setlength{\textwidth}{17.cm}
  \setlength{\parskip}{2ex} 
  \setlength{\footnotesep}{2ex}
  \setlength{\parindent}{0ex}
  \addtolength{\skip\footins}{2ex}
  
  
  \makeatletter
  
  \def\clap#1{\hbox to 0pt{\hss #1\hss}}%
  \def\ligne#1{%
  \hbox to \hsize{%
  \vbox{\centering #1}}}%
  \def\haut#1#2#3{%
  \hbox to \hsize{%
  \rlap{\vtop{\raggedright #1}}%
  \hss
  \clap{\vtop{\centering #2}}%
  \hss
  \llap{\vtop{\raggedleft #3}}}}%
  \def\bas#1#2#3{%
  \hbox to \hsize{%
  \rlap{\vbox{\raggedright #1}}%
  \hss
  \clap{\vbox{\centering #2}}%
  \hss
  \llap{\vbox{\raggedleft #3}}}}%
  \def\maketitle{%
      \setcounter{page}{0}
  \thispagestyle{empty}\vbox to \vsize{%
  \haut{}{\@blurb}{}
  \vfill
  \vspace{1cm}
  \begin{flushleft}
  \usefont{OT1}{ptm}{m}{sl}
  \huge \@title
  \end{flushleft}
  \par
  \hrule height 4pt
  \par
  \begin{flushright}
  \usefont{OT1}{phv}{m}{n}
  \Large \@author
  \par
  \end{flushright}
  
  %new commands
  \newcommand{\mychapter}[1]{\textcolor{mygrey}{\chapter{\uppercase{#1}}}}
  \newcommand{\mychapteretoile}[1]{\textcolor{mygrey}{\chapter*{\uppercase{#1}}}}
  \newcommand{\mysection}[1]{\textcolor{myblue}{\section{#1}}}
  \newcommand{\mysectionetoile}[1]{\textcolor{myblue}{\section*{#1}}} 
  \newcommand{\mysubsection}[1]{\textcolor{myblue}{\subsection{#1}}}
  \newcommand\crule[3][black]{\textcolor{#1}{\rule{#2}{#3}}}
  
  %renewcommand
  \ListProperties(Space=.01cm, Space*=.01cm, Progressive=3ex, Style*=-- , 
  Style2*=$\bullet$ ,Style3*=$\circ$ ,Style4*=\tiny$\blacksquare$ )
  %\renewcommand{\theenumii}{\Alph{enumii}}
  %\renewcommand{\labelitemii}{\theitemii}
  %\renewcommand{\labelitemi}{$\star$}
  
  \renewcommand{\cftaftertoctitle}{\hrulefill}
  
  
  \begin{document}
  % My doc
  \end{document}
  </code></pre>
  
  <p>I have to say that this compiles perfectly on the Windows PC I used.
  PS : I also have other errors, like the figures that can't be found. I'm quite sure I did something wrong..</p>