0

I use Texpad, and typeset with intermediate files hidden. Since I use BibTeX for references, I periodically need to access the BBL file, for example to create a file containing the references that's separate from the main document.

The typical way I do this is quite annoying: I elect to show the intermediate files, then typeset again, then copy the contents of the BBL file, then delete all the intermediate files again.

My question is whether there is an easier way to do this? For example, is it possible from the terminal to generate just the BBL file, without any of the other intermediate files?

  • 2
    No. Short answer. – Johannes_B Jun 24 '18 at 13:34
  • 2
    If I understand texpad.com/support/osx/typesetting/hide-intermediate-files correctly, you could also simply make the hidden folder .texpadtmp visible (I don't own a Mac so I wouldn't know how to do that) and get the .bbl from there. I think that usually these 'hide temporary files' options cause more problems than they solve and would leave them turned off. If you have each document you write in a folder of its own the directories are clean enough, I think. – moewe Jun 24 '18 at 13:44
1

When you launch BibTeX with eg bibtex document, the program will not look to document.tex but search for document.aux and read in it:

  1. the list of .bib files
  2. the .bststyle to use
  3. your ``\cite```s.

Hence the .aux files is mandatory. Beside this it produces the expected document.bbland only one additional "intermediate" file: the BibTeX log file document.blg.

off topic for Texpad, but could be useful for other people: MiKTeX pdftex has an option --aux-directory (used with e;g. --aux-directory=.\build), where the intermediate files, including the .aux file are stored in the build folder, which is more generic. However, the regular BibTeX run is no longer possible : one has to use a batch (or shell) script to either copy the .aux file to the working directory or copy the .bib files to the build directory. Here is the bibtex-build batch file I use under Windows (to be converted by somebody else to Apple script for Mac OS X users)

@echo off
SETLOCAL ENABLEEXTENSIONS
copy *.bib build
cd build
for %%f in (*.aux) do (
bibtex %%~nf
)
echo error level is %ERRORLEVEL% 
if %ERRORLEVEL% EQU 0 (
    goto fin
) ELSE (
    pause
)
:fin
cd ..

The loop over *.aux could seem superfluous, but is needed if one use the multibib package or similar one which produces several .aux for a single document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.