GeneralError: File ended while scanning use of \@argdef

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Emma21
Posts: 2
Joined: Thu Mar 17, 2022 12:48 pm

Error: File ended while scanning use of \@argdef

Post by Emma21 »

Hello,

I'm new to Latex and have some issues with a work that i have to submit.
I have an error everytime i try to compile. I know I must have forgotten a '{' somewhere, but I do not where. I was wondering if you could help me solve this problem.
The error is :

! File ended while scanning use of \@argdef.
<inserted text>
\par
<*> ./Devoir.tex
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

Here is what i did until now :

\documentclass[a4paper,twoside,openany]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,main=french]{babel}
\usepackage[left=3cm,right=3cm,top=2cm,bottom=2cm]{geometry}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{ulem}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{marginnote}
\usepackage[marginal,multiple]{footmisc}
\usepackage[para]{manyfoot}
\DeclareNewFootnote[para]{A}[alph]
\DeclareNewFootnote{B}[arabic]
\renewcommand*{\thefootnoteA}{(\alph{footnoteA})}

\newcommand{\marge}{(\textit{Dans la marge:})~} %meaning in the margin


\usepackage{makeidx}
\usepackage{imakeidx}
\usepackage{ifthen}
\usepackage{xparse}

%Initpers used for when the nam of a person is first used in the text
\makeindex[name=noms, title=Index nominum, columns=2]
\newcommand{\initpers}[3]{
\ifthenelse{\equal{#1}{}}{#3 #2}{#1}
}


\newcommand{\pers}[1]{#1\index{#1@#1}%}


\title{XXXXX}
\author{XXXX}

\begin{document}

\begin{titlepage}
\begin{center}

\textsc{\XXXX}\\[2 cm]
\textsc{\large \'{E}dition de données}\\[1.5 cm]
\LARGE \bfseries{XXXXXXXX}
\bigbreak
\bigbreak
\bigbreak
\bigbreak
\large Emma \textsc{bhajbjbb}\\[3 cm]
\includegraphics[scale=0.2]{Logo Séoul 1988.jpg}

\end{center}
\end{titlepage}

\section*{Retranscription}\addcontentsline{toc}{section}{Retranscription}

\input{retranscription devoir.tex}
\newpage
\input{retranscription 2.tex}

\printindex[nom]\addcontentsline{toc}{section}{Index}

\newpage

\begin{figure}

\section*{Numérisation}\addcontentsline{toc}{section}{Numérisation}

\centerline{\includegraphics[scale=0.4]{Telex.jpg}}
\caption{XXXXXXXXX}
\end{figure}

\newpage
\begin{figure}
\centerline{\includegraphics[scale=0.3]{Telex 2.jpg}}
\caption{XXXXXXXXX}
\end{figure}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Error: File ended while scanning use of \@argdef

Post by Bartman »

Please use the code tags to mark multiline code.

The helpers don't have your image files, so they need replacements, e.g. in the preamble:

Code: Select all

\usepackage[demo]{graphicx}
\usepackage{tikz}
The changed order avoids an option clash error message, since tikz also loads graphicx.

You've almost spotted one of the causes of the error in this example, because at the end of the definition of the \pers command, the closing brace is commented out.

Some additions:

The inputenc package no longer has to be loaded with the option since april 2018. More information in ltnews28.

hyperref should be the last package loaded in most cases.

The center environment adds vertical spacing before and after, while the \centering command only aligns in the middle.

The \xxxx command, whose definition is to be printed on the title page in small caps, is not defined anywhere.

I further assume that the optional argument of the \printindex command should be nom without the s, to match the list of options of the \makeindex command.
Emma21
Posts: 2
Joined: Thu Mar 17, 2022 12:48 pm

Error: File ended while scanning use of \@argdef

Post by Emma21 »

Hello, thank you for your help, it's working now.

Sorry for the code tags, i'll keep it in mind for my next post !
Post Reply