0

I am working on a document, and I had all the references how I wanted them, and was trying to change the style. I clicked something, and now my references have all changed, and I don't know how to get them back because I can't find where the event occurred in the log file. How can I search the log file for these events?

The references should include the author, article name, date accessed, and the URL where the article can be found. The citations in my text take the form of (0, ) at the moment, when they should be the author, and the date. I don't know what I did wrong.

My references look something like this:

\begin{framed}
\noindent \textit{Sidenote:} A polygonal number \cite{Polygonal_number} is a number that can be expressed in dots and arranged in the shape of a polygon. The formula for the $n^{th}$ polygonal number, where the polygon has $s$ sides is: 
\[P(s,n)= \frac{n^2(s-2)- n(s-4)}{2}\]
\end{framed}

and the output in the PDF for my references looks like:

Eric W. Weisstein. Polygonal number, 2017

The .bib file for my references looks like:

@misc{Polygonal_number,
author = "Weisstein, Eric W.",
title = "Polygonal Number",
year = "2017",
url = "http://mathworld.wolfram.com/PolygonalNumber.html",
}

The bibliography commands I am using are:

\usepackage{url, apacite}
\bibliographystyle{plain}
\bibliography{References}
user83024
  • 121
  • Which OS, which IDE? – vaettchen Mar 16 '18 at 13:29
  • Are you working in a LaTeX editor? Did you change settings of your editor or code in the LaTeX file? – Karlo Mar 16 '18 at 13:30
  • Hi, welcome. This doesn't seem like the thing the .log file would say anything about, as it's rewritten for every run of pdflatex (or whatever you're using). How do you make the references in the first place? Which editor are you working in? – Torbjørn T. Mar 16 '18 at 13:32
  • 1
    latex is a program that takes an input file and produces some output. If you have edited the input file then it has no way of knowing that or reverting it. Your editor or source control system may have a way of reverting but that is a question about the backup systems in place, not a question about latex. – David Carlisle Mar 16 '18 at 13:42
  • @TorbjørnT. I make the references by doing \usepackage{url, apacite}, then putting \bibliographystyle{plain} and \bibliography{References}, where References is the name of my .bib file. Also, I'm working in TexMaker. – user83024 Mar 16 '18 at 13:44
  • Well, I can't think why the references would change by you "clicking something". Can you show a minimal example and explain what is wrong with the output? – Torbjørn T. Mar 16 '18 at 13:47
  • @TorbjørnT. My references look something like this: \begin{framed} \noindent \textit{Sidenote:} A polygonal number \cite{Polygonal_number} is a number that can be expressed in dots and arranged in the shape of a polygon. The formula for the $n^{th}$ polygonal number, where the polygon has $s$ sides is: [P(s,n)= \frac{n^2(s-2)- n(s-4)}{2}] \end{framed} The output on the PDF shows the citations like (0, ) and the references only show the author, article name, and date. – user83024 Mar 16 '18 at 13:52
  • I meant a complete example (see the link I posted), and please edit your question and include it there, comments really aren't the best place for code. You also need to explain what you get, and what is wrong with what you get. – Torbjørn T. Mar 16 '18 at 13:54
  • For anyone else seeing your question, please make your example a complete example, so that the code can be copied and used directly, without modification (again, see the link posted). As it stands, anyone who sees your question has to read the comments to figure out which bibliography style you're using, and also have to guess at what you think is wrong. For example, I'm guessing that you want the URL to show, but it's a lot better if those reading the question doesn't have to guess. It increases the chance of you getting the answer you want, and it makes it easier to help. – Torbjørn T. Mar 16 '18 at 14:13
  • 2
    Since the problem is with your bibliography, that's all you need to change. The format you show is the plain format. If you want that, then remove the apacite package. If you want author-year style bibliography, then keep apacite and instead of \bibliographystyle{plain} use \bibliographystyle{apacite}. Then delete your .aux files and compile again, run bibtex etc. again. – Alan Munn Mar 16 '18 at 14:15

1 Answers1

1

Since the problem is with your bibliography, that's all you need to change. The format you show is the plain format. If you want that, then remove the apacite package.

But it seems that you want an author-year style bibliography, in which case you should keep apacite and instead of \bibliographystyle{plain} use \bibliographystyle{apacite}. Then delete your .aux files and compile again, run bibtex etc. again.

If this doesn't solve your problem then you need to provide us with a compilable document that shows the problem, otherwise it will be very hard to help you further.

Alan Munn
  • 218,180
  • How can I provide you with my document? There are errors in it, but they're all related to the bibliography. – user83024 Mar 16 '18 at 14:27
  • @user83024 No you can't. That's not how the site works. Did you do what I suggested? If you don't remove your .aux files, you will get errors related to the previous stuff you did. – Alan Munn Mar 16 '18 at 14:49
  • It's semi-working now. I'm missing a reference and there are huge gaps between the words, which looks really ugly. Also, how do I put numbers next to my references? – user83024 Mar 16 '18 at 17:00