This is my first time posting on stackoverflow, I hope I'm doing this right.
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 sudo apt install
. I tried to open my file, and I get errors. I get the "! Extra \fi" error message for line 25, where I have the \usepackage[toc,page]{appendix}
line, and loads of other errors messages, like "! Extra \else." at line 36 (\usepackage{textcomp}
).
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.
\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*=-- ,
\renewcommand{\cftaftertoctitle}{\hrulefill}
\begin{document}
% My doc
\end{document}
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..
Best Answer
The posted document does not give the error in the title but a different error
which looks like you have omitted
}}
before the line with% new commands
If you add them you get
I have no idea what that command is supposed to do, so I commented it out. (but it has a
(
and no matching)
)Then you get the error
) ! Extra \else. \bbl@switch ... date#1\endcsname \relax \fi \else \ifbbl@usedategroup \bbl@u... l.102 \begin{document}
I'm not sure you can have both
frenchle
and[french]{babel}
at the same time, but in any event if you comment out thefrenchle
package it runs without error. I also commented out several other pbsolete or duplicated packages