not running bibtex enough times
Status: Beta
Brought to you by:
worden
I have reports that the automatic latex make rules sometimes make pdf files without the reference numbers, i.e. they don't run bibtex as many times as they should. Maybe this is when the .bib file is first added? Any more infornation available?
Anonymous
This was caused by something else.
I have just been working on a .tex project where this happened to me. First there was no bibliography section in the pdf at all, until I saved the page, synced the .bib file explicitly, and re-made the .pdf explicitly. Then I had a bibliography but the (sole) citation was not numbered, until I synced the .tex file explicitly and remade the .pdf again. The makefile is supposed to get the pdf right the first time.
See also https://sourceforge.net/p/workingwiki/bugs/204/.
Additionally, a user writes:
I also have some relevant bug reports in recent emails from JD, which I should paste in here.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
A first test of the current make rules. Call it test 1.
A. Place a .tex and .bib file that cite a single reference in an empty directory. Make the .pdf file, making .d, .aux and anything else needed as a side effect.
Passes this test. This was already confirmed by JD, I think.
B. As above, but make the .latexml.html5 output from scratch. I think we can assume making the .latexml.html and .latexml.xhtml are equivalent.
Passes this test as well.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Test 2.
After making the above, leave everything in the directory. Add a second citation to the .tex and .bib.
A. remake the .pdf.
Passes.
B. remake the .html5.
Passes.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Test 3.
Start in an empty directory with a .tex file that cites one of two entries in the .bib. Make the .pdf and .html5. Now change the .tex to cite the other entry.
A. remake the .pdf
Passes.
B. remake the .html5
Passes.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Test 4.
After compiling, leave all files in place. Now edit a .bib entry that's being cited, without editing the .tex.
A. remake the .pdf
Passes.
B. remake the .html5
Passes.
Oh, those were me. I got logged out.
Test 5.
An empty directory, with a .tex file that includes a \cite, but no \bibliography. Make the .pdf and .html5. They have [?] or [] symbols at the broken citation. Now restore the \bibliography into the .tex, referring to a valid .bib file.
A. remake the .pdf
Passes. The citation and references are fixed.
B. remake the .html5
Passes.
Last edit: Lee Worden 2012-09-21
Test 6.
Given a .tex/.bib that have just successfully compiled, change the bibliographystyle and nothing else.
A. remake the pdf
Fails. It acts as if it's remaking, but it produces a pdf file with the old bibliography style.
B. remake the html5
Fails. It remakes, but the output is the same. But I don't think latexml uses bibliography styles, so this is probably correct behavior as far as the makefile is concerned, whether it's doing it for the right reasons or not.
It looks like when you change to a different bibliography style and run latex, it updates the \bibstyle line in the .aux file but doesn't give you anything like a "You need to rerun latex" message. Added a couple makefile lines for checking for that, and it seems to do the right thing now.
checked in in r887.
But I don't think this explains why problems with [?] marks appearing on wiki pages are so common. What's the use case that's producing those? Do we have any live examples?
Last edit: Lee Worden 2012-09-20
I have one, in an email from Jonathan, that may still be a "live example". He had some trouble in a project in the past, to the point of adding a .bbl : rule by hand. I'll export a copy of that and see what I can reverse-engineer from it.
Had some trouble exporting the working directory of that one, but that's a separate matter. Exported source files and had a look. It's a complex hybrid of central and local make rules, with .tex files being made automatically from wikitext source and generic .tex components, and with local rules added to control bibtex behavior. The bibtex rules are the subject of the bug report about that project, and are clearly there because it wasn't working, so ought to be worth understanding. It would be great if I had a simpler case to work with though.
There's also http://sourceforge.net/p/workingwiki/bugs/204/:
I might try making a minimal case that has this problem.
Last edit: Lee Worden 2013-03-13
Test 7.
Start with an empty directory, with a .tex file that cites something, and a .pl script that generates the .bib file. Use the default rules.
A. make the pdf.
Succeeds.
B. make the .html5.
Succeeds.
C. now alter the .pl and remake the pdf.
Succeeds.
D. remake the .html5
Succeeds.
Test 8.
Start with an empty directory, with a .bib file, and a .pl script that generates the .tex file, including a citation and bibliography. Use the default rules.
A. make the pdf.
Fails.
Makes ms.tex, then runs latex ms.tex once; then tries to make ms.bbl and fails with message, "No rule to make target ms.bbl."
B. make the .html5.
Fails.
Makes ms.latexml.xml; then runs latexmlpost to combine all.bib.xml and ms.latexml.xml, and fails because all.bib.xml is not made.
Both these errors seem to arise because ms.d is not being made and used.
Test 9.
Like test 8, but add a line to the makefile: export WW_TEX_D_FILES += ms.d. Starting from bare directory containing only .pl file, .bib file, and makefile.
A. make the pdf
Succeeds.
B. make the html5
Succeeds.
C. edit the script, so it cites a different bib entry, and remake the pdf
Succeeds.
D. remake the html5
Succeeds.
Test 10.
Directory contains a .bib.pl script that makes the .bib, a .tex.pl script that makes the .tex, and a short makefile (including the WW_TEX_D_FILES line).
A. make the pdf file.
Succeeds.
B. make the .html5
Succeeds.
C. Change the .tex.pl to cite something different. remake the pdf.
Succeeds.
D. Change the .bib.pl. remake the pdf.
Succeeds.
E. (oops, got out of order) check whether the .html keeps up with changes in the .tex.pl
Succeeds.
F. and whether the .html tracks changes in the .bib.pl
Succeeds.
G. and whether the .html tracks when both scripts are changed at once.
Succeeds.
H. and whether the .pdf tracks when both scripts are changed at once.
Succeeds.
OK, I'll upload this project to the projects wiki and experiment with it there.
I've updated http://lalashan.mcmaster.ca/theobio/projects/index.php/Auto-bib to the code from Test 10. It passes the tests above, while previewing.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Not sure if this is the same issue, but this directory fails to make manuscript.pdf with "no rule to make manuscript.bbl" when the manual rule for manuscript.bbl is removed. It is highly replicable; whether or not directory is cleared, and whether or not manuscript.bbl exists! You should be able to replicate it in preview.
http://lalashan.mcmaster.ca/theobio/circumcision/index.php/Kenya_IPV_Manuscript/wt
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
The same directory http://lalashan.mcmaster.ca/theobio/circumcision/index.php/Kenya_IPV_Manuscript/, is now refusing to make the latexml target, with the message "no rule to make manuscript.latexml.xhtml5"! manuscript.tex is made automatically, which may be relevant, but it makes fine (and exists). Everything here used to work ... but I still wonder if it's something weird going on in the directory (ie., related to missing figures).
This is the project I mentioned earlier in this thread, without using its name.
Is it possible that since WW is now constructing WW_TEX_D_FILES from the list of source files, it's no longer including manuscript.d, which is where the rules for the .bbl and .latexml.html5 would be found? if so, the approach I mentioned in this thread, of adding it explicitly to WW_TEX_D_FILES, might help. Though since you've now added some rules to work around the absence of those rules, you might need to remove them when the .d file is included.
I haven't checked, but I expect that either
or
would work.
I thought I had posted this as well, but I don't see it here: ".xhtml5" is a typo. There are no rules for that suffix. You want .html5.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Thanks. I've updated and now there's a new kind of error there, likely related to the problem you pointed out (this file is not on the automatic tex list). In case you're interested.