2

Sorry for the nebulous title, but I have several problems (all related which is why there is a single post).

My Setup: I am using Win32 + TeXworks with MiKeTeX. I believe everything is up-to-date. I am trying to use \documentclass[man]{apa6} with biber as the back-end. I am VERY new to LaTeX, so please do treat me like an idiot at this point because I don't have a clue what's going on with LaTeX.

references.bib

masterone.tex // this is my 'master' tex file. I then break up the sections into separate files.

introduction.tex // one of the sections with a citation in it.

NB: I HAVE tried to compile the shortsample and longsample files that come with apa6, and I get the same painful results noted below. I'm starting to think something isn't installed correctly, but I don't know for sure or how to check. I do biber version is 1.5. Not sure on MiKeTeX/LaTeX but it was whatever was available to download in early Oct, 2013.

//

Problem-1: Because I have references in a *.bib file, I am running latex (at the cmd line) against my mainthesisdoc.tex. Then running biber mainthesisdoc, then latex mainthesisdoc again...

Question-1: I'm assuming this is what I NEED to do (else script it out). If that is true, what is occurring in the backend that requires me to run latex, biber, then latex again? I would have thought this process would have been a single step?

//

Problem-2: I'm doing something wrong, but I can't figure it out. Sometimes the above process works and generates the references section, sometimes it doesn't. I'd post output, but I don't want to spam anyone.

Question-2: Can someone suggest what I might post up or why it will sometimes generate and other times it wont?

//

Problem-3: In using apa6, the results are... not desirable. I'm seeing issues where citations aren't working and the reference page isn't being generated. Using \parencite it creates a cite like this:

blah blah blah (Dougger2008 )

Notice the intentional cite reference where in my .tex file it has \parencite{Dougger2008}

It should look like:

blah blah blah (Dougger, 2008).

Notice that it's not bolded, it's [Last Name], [Year] and then there is no trailing whitespace at the end of [Year] and the ending parens (like in the above example).

Question-3: Is this a symptom that suggests the biber step didn't work? Is this related to why I am not getting a reference page on most runs?

//

Problem-4: In the above example, the citation is bolded in the resultant PDF.

Question-4: How do I remove the bold from every citation? That's not APA-6th ed. at all and I can't fathom why this is desirable.

Thank you in advance, and please don't shoot/hate me for the long post. This is a weeks long battle being vented on tex.sx.

UPDATE/SOLUTION:

I don't know how or why, but based on the answers I got from Werner I suspected that something wasn't installed correctly. Everything I was doing, even running the examples, wasn't working.

If you have come to this question because you have installed MikTeX and are unable to make a reference section, and Biber isn't giving you a *.bbl file, you might want to download Biber directly and replacing C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\biber.exe (or wherever you installed it). As soon as I did this and followed the steps of running latex -> biber -> latex latex it worked flawlessly and my reference section popped up!

  • do you clean files at any point? – Mark Mendoza Oct 23 '13 at 03:48
  • Are you getting any errors when you run any of those commands? You can check how up-to-date everything is by adding \listfiles to your preamble. For biber and biblatex it is very important that the versions are matched; the biblatex manual provides a compatibility table in § 1.5.5. – jon Oct 23 '13 at 05:12
  • @jon, I am getting a warning (not an explicit error) when I run Biber. It says "Biber 1.5 was used, expecting 1.3" but then it continues to run. I didn't download biber, I let MiKeTeX do the package management (or TeXworks, not sure who's doing what). I do see other eye-catching messages when I run LaTeX but I won't be able to post the messages until I get home later tonight. – Justin Carroll Oct 23 '13 at 11:40
  • @Mr Komandex, In my "normal workflow" approach which has been to always run latex > biber > latex just because that seems to generate the most desirable results I can get (most of the time), I do not remove/clean any files out. However, when things are beginning to work correctly, I will remove everything other than the .bib and .tex files and see if I can recreate my success. Often I cannot and it sets me back. (I'm painfully trying to figure out the workflow so I can ensure that I can have uninterrupted success in the future which is why I keep deleting). Should I be removing files? – Justin Carroll Oct 23 '13 at 11:43

1 Answers1

4

All your problems seem to deal with a single problem, dealing with your workflow. Let's attempt to address the questions in sequence:


Problem 1:

In order to display the references, you NEED to do this, yes. However, you only need to do this one time. That is, you can call latex > biber > latex > latex in one go, and subsequent calls should only require latex and that's it. Why? Well, the answer is partly in Understanding how references and labels work, but I'll explain some more biber-related details here:

When you call latex, it parses the document and prints a bunch of information relevant to the specific compilation in the .aux file. This includes all you \labels, when you \cite something, when you write a \section, what your .bib file is called, etc. A whole bunch of stuff. Now, when you run biber, it reads the .aux file and matches up the \cites with your .bib file, perhaps does some sorting of the content, as well as formatting the layout based on the .bst file (authors in \scshape, title in \itshape, year between brackets, etc.). As output, biber writes a .bbl file that contains the actual LaTeX-recognized thebibliography environment. So, in essence, biber transforms (say)

@article{abc,
  author = {some author},
  title  = {some title},
  year   = {some year},
  ...
}

into

\begin{thebibliography}{x}
  \bibitem{abc}
  {\scshape some author}, {\itshape some title}, ({\upshape some year}), ..
\end{thebibliography}

(I've obviously simplified things here). So, LaTeX doesn't understand the regular .bib format, but biber does.* Once you have a valid .bbl file, you have to compile again with latex, which will now be able to read the (valid) bibliography and print it in your document. Another compilation is sometimes necessary because the additional content (the bibliography as well as valid \cites) could cause other content in the document to shift, and references to become incorrect.

*In fact, BibTeX does and that's why it's a separate process to do this. A similar thing is needed when you have an index in your document - a separate process manages, sorts, collates and eventually constructs the .ind file.


Problem 2:

This may be because your workflow removes (deletes) the .bbl from the working folder. The .bbl contains the thebibliography environment and if it's not there, then latex (or actually biblatex) assumes you haven't run biber yet.


Problem 3:

This is indeed a symptom of that suggests biber didn't work (see Problem 1). All references that are invalid (not found) have a default (bibkey ) output. Once you have a valid bibliography, this should go away.


Problem 4:

This is the same as Problem 3 above.


So, in short, you should compile latex > biber > latex > latex on the first go, followed by latex (or more) on subsequent runs. Whenever there is a change in a citation (you've added content to an existing citation, removed an entry or added a new one), you'll have to include biber in the workflow again.

Werner
  • 603,163
  • Awesome! Thanks for taking the time to explain that. That helps to demystify the magic behind the scenes. When I get home later tonight I will give your suggestions a shot and see if that improves my output. In TeXworks I have been using the defaulted option that says "pdflatex > MakeIndex > Biblatex" and then a custom command I put in that calls "Biber" on the "$basename" then the "pdflatex > MakeIndex > Biblatex" again... so maybe I have been removing the .bbl file as you suggest. Thoughts? – Justin Carroll Oct 23 '13 at 11:47
  • @JustinCarroll: Some editors have a clean-up procedure built in, but I can't say in your case (I don't use TeXworks). Just check the working folder for auxiliary files after a compile. Then also for a .bbl after calling biber. If there is a problem in your .bib file, then biber will throw errors, which could also be the problem. – Werner Oct 23 '13 at 14:14
  • My apologies for the lengthy delay - Im just now getting a chance to try this out. However none of this has worked. However, I have new information based on what you told me. Running "latex -> biber -> latex" does give me the .aux file, but at no point do I see the .bbl file created. I can't seem to get the reference section to generate at all! Thoughts? – Justin Carroll Oct 27 '13 at 22:32
  • @JustinCarroll: Does biber produce any output? It should show how its parsing your .bib file... – Werner Oct 28 '13 at 03:49
  • I finally figured it out (I'll update my answer) but you were damn close to figuring it out (and I wouldn't have figured it out had you not pointed me in the right direction - so thank you!!!! a thousand times over for your attention/help on this). For SOME reason, for which I have not figured out, MiKTeX was using a version of Biber that wasn't working. I downloaded Biber itself (most recent) and replaced my old Biber and BAM! Like magic it started working, nothing else changed! – Justin Carroll Oct 29 '13 at 23:14