- #1
ChrisJ
- 70
- 3
Hi, not sure if this is the correct section so feel free to move if needed.
First time using latex to create a pdf here, having trouble getting cross-references and citations to work. They just appear in the text as question marks.
I got my bibliography to work, using Bibtex, but when using \cite{key} in it just appears as a question mark. The same goes for labels for headings, equations etc, again, just question marks appear.
My example code is like the below\documentclass{article}
\usepackage{graphicx}
\section{Introduction\label{my_intro}}
text text text text text text \ref{my_intro} text text text text
\begin{equation}
\label{TISE}
(\frac{\hbar^2 }{2m_e} \nabla^2 + V) \phi = E_n \phi_n
\end{equation}
text text text text \ref{TISE} text text text text \cite{bibtexkey}
\begin{figure}
\centering
\includegraphics[width=3.0in]{figure.png}
\caption{Simulation Results\label{myfig}}
\end{figure}
text text \ref{myfig} text text
\section{References}\bibliographystyle{unsrt}
\bibliography{refs}\end{document}Im on linux and installed texlive, I first run the pdf using "pdflatex myfile.tex" then rub bibtex on the aux file and then recompile the pdf. This generates the pdf, bibliography is there, formatted all nicely, my figure works great etc, everything is great, apart from where I reference stuff in text.
I have tried both the style where the \label{mylabel} bit is both in the argument of \caption and \heading (as is in the example above) and also out of the argument but directly after and both don't work.
Any help is much appreciated!
Thanks :)EDIT: Sorry, I didnt realize the foum would parse the tex code above without the [tex] tags, is there a way I can get it to parse it as plaintext?
First time using latex to create a pdf here, having trouble getting cross-references and citations to work. They just appear in the text as question marks.
I got my bibliography to work, using Bibtex, but when using \cite{key} in it just appears as a question mark. The same goes for labels for headings, equations etc, again, just question marks appear.
My example code is like the below\documentclass{article}
\usepackage{graphicx}
\section{Introduction\label{my_intro}}
text text text text text text \ref{my_intro} text text text text
\begin{equation}
\label{TISE}
(\frac{\hbar^2 }{2m_e} \nabla^2 + V) \phi = E_n \phi_n
\end{equation}
text text text text \ref{TISE} text text text text \cite{bibtexkey}
\begin{figure}
\centering
\includegraphics[width=3.0in]{figure.png}
\caption{Simulation Results\label{myfig}}
\end{figure}
text text \ref{myfig} text text
\section{References}\bibliographystyle{unsrt}
\bibliography{refs}\end{document}Im on linux and installed texlive, I first run the pdf using "pdflatex myfile.tex" then rub bibtex on the aux file and then recompile the pdf. This generates the pdf, bibliography is there, formatted all nicely, my figure works great etc, everything is great, apart from where I reference stuff in text.
I have tried both the style where the \label{mylabel} bit is both in the argument of \caption and \heading (as is in the example above) and also out of the argument but directly after and both don't work.
Any help is much appreciated!
Thanks :)EDIT: Sorry, I didnt realize the foum would parse the tex code above without the [tex] tags, is there a way I can get it to parse it as plaintext?
Last edited: