0

I'm new to LaTeX and I have problems trying to cite things in my document. I seem to have set up everything correctly but I still get a question mark symbol instead when I try to cite something. Here's my code (it is a pre-built template from school so sorry if it seems long!):

\documentclass[12pt,french]{memoir}

%Modules obligatoires
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[margin=1in]{geometry} 
\usepackage{hyperref}
\usepackage{url}
\usepackage{array}
\usepackage{booktabs}
\usepackage{enumitem}
\usepackage{cite}
\usepackage{natbib}
\bibliographystyle{apacite}
\usepackage{caption}

%Modules mathématiques et scientifiques
\usepackage{amsmath,amsthm,amssymb}
\usepackage{siunitx}
\sisetup{locale = FR,
separate-uncertainty = true}
\usepackage{gensymb}

%Modules optionnels
\usepackage{float} %pour [H] dans les figures
\usepackage{pdflscape} %en paysage avec \begin{landscape}

% --------------------------------------------------------------
%                         Configuration
% --------------------------------------------------------------

%Informations sur le titre, les auteurs, etc.

\newcommand{\titre}{Le phénomène d'interférence créé par les ondes de la voix}
\newcommand{\auteur}{Charles-Antoine \textsc{Drouin} \\
Tristan \textsc{Forgues}  \\
Francis \textsc{Giguère} \\
Olivia-Rose \textsc{Jalbert-Trudel} \\
}
\newcommand{\groupe}{01}
\newcommand{\prof}{Alexis \textsc{Lévesque-Morin}}
\newcommand{\cours}{Activité d'intégration en physique \\ 
                                  203-FZZ-03\\}
\newcommand{\departement}{physique}

% --------------------------------------------------------------
%                         Fin de la configuration
% --------------------------------------------------------------

\graphicspath{{figures/}{../figures/}} %relative path to figures folder in memoire

\addto\captionsfrench{\renewcommand\listfigurename{Liste des figures}}
\renewcommand\frenchtablename{\textsc{Tableau}}
\newcommand{\source}[1]{\caption*{\hfill {\small Source: {#1}}} } %Ajout de source dans les figures

\makeatletter
\def\@makechapterhead#1{%
  \vspace*{10\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
        \Huge\bfseries \thechapter.\space%
      \fi
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 30\p@
  }}
\makeatother

%numérotation des sous section
\setsecnumdepth{subsection}

%Sous-section dans la table des matière
\maxtocdepth{section}

%Sans double numérotation. Peut être désactivé pour une numérotation par chapitre 
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\counterwithout{equation}{chapter}

%pagetitre
\newlength\drop
\newcommand*{\pagetitre}{%
\thispagestyle{empty}
\begingroup
   { \Large   
   \noindent \auteur 
   Groupe \groupe                    
   \par}
    \vfill
    \centering
    {\huge\bfseries \titre \par}  
    \vspace{2cm}
    Travail présenté à monsieur \prof \par
    \vspace{0.5cm}
     \noindent \cours
     \vfill
    {\large Département de \departement \\
    Programme Sciences de la nature\\
    Cégep Sainte-Foy\\
    \today\par}
\null
\endgroup}

%Création du documents
\begin{document}
\bibliographystyle{ieeetran}

\pagetitre
\openany
\pagenumbering{roman}
\pagestyle{plain}
\newpage

\include{resume}
\include{abstract}

\newpage
\tableofcontents
\newpage
\listoftables
\newpage
\listoffigures
\newpage
\pagenumbering{arabic} 

\include{introduction}

\include{theorie}

\include{resultats}

\include{analyse}

\include{conclusion}

\bibliography{mybib}

\end{document}

Here's the book that I want to cite:

@book{lafrance_physique._2015,
    address = {Montréal (Québec)},
    title = {Physique. 3, 3,},
    isbn = {978-2-7650-3726-2 978-2-8041-9082-8},
    language = {French},
    publisher = {Chenelière éducation},
    author = {Lafrance, René and Parent, Jean},
    year = {2015},
    note = {OCLC: 904283240}
}

When I cite it, I use:

\cite{lafrance_physique._2015}

When I check my finished document, I see a bold question mark instead of a 1... Thanks in advance for the help!!!

David Purton
  • 25,884
  • Usually you have to compile twice in order for the question mark to be replaced by the actual citation. Did you try that? – LarrySnyder610 Apr 17 '19 at 02:31
  • When do you say compile, what do you actually mean? I use TeX Maker and I do a quick run two times before looking at my document. Is this what you mean? Sorry I’m still new to this whole thing... – Charles-Antoine Drouin Apr 17 '19 at 10:06
  • Are you getting any error messages? I am not able to compile your code. If your code has other errors, then it may never get to the \bibliography command, hence it will never fill in the question marks. – LarrySnyder610 Apr 17 '19 at 11:13
  • I've changed the book name to manuel1 and I'm now able to run bibtex without any error messages but when I try to compile my work, I get those errors: ! Undefined control sequence .\b@manuel1 – Charles-Antoine Drouin Apr 17 '19 at 14:23
  • And without any bibliography, so if I remove the \bibliography{mybib} and the file mybib.bib, my project compiles without any issues. – Charles-Antoine Drouin Apr 17 '19 at 14:49
  • We are now outside of my area of expertise, so I'm not sure I can help with the error messages you are getting. But it seems to me that the "question mark" problem is actually a symptom of this error. – LarrySnyder610 Apr 17 '19 at 15:31
  • Thanks for taking the time to help me! Do you know a place I could find more help with this kind of issue? – Charles-Antoine Drouin Apr 17 '19 at 15:33
  • I think you are in the right place. :) But I suggest that you either edit your question, or post a new one, to highlight the error you are getting rather than the question-mark symptom. – LarrySnyder610 Apr 17 '19 at 15:34

0 Answers0