I've been using Texmaker, MikTex 2.8 and BibTex fine for a simple report. However, I'm now looking to use the software regularly and am trying to configure it for widespread use. Firstly, I have folder containing all my BibTex files (a different one for each research topic) - with path "C:\BibTex" - and I would like Texmaker to look there when compiling.
I've found this very useful article from http://julien.dutant.free.fr/blog/index ... e-in-latex ----
However, I'm having trouble porting this into Texmaker. If I click options ->configure TexMaker I get the following screen: http://www.xm1math.net/texmaker/doc14.pngA nicer solution involves altering the BibTeX command. Let me first give the idea. When you run BibTeX for your TeX document, something like the following commands is executed:
bibtex MyTeXDocument
bibtex F:\My Stuff\texdocs\MyTeXDocument
Now you can tell BibTeX to lookup for the bibliography file in a different folder by using the --include-directory option:
bibtex --include-directory="F:\My Documents\mybibliographyfolder" MyTexDocument
If your Tex document includes \bibliography{MyBooks}, the command above will search for MyBooks.bib in F:\My Documents\mybibliographyfolder as well as in the Tex document's folder. (If there's a .bib file of that name in both folder, I don't know which one will be used - you try it! But there shouldn't be one in the first place!)
Now you probably don't run BibTeX by yourself, but through a TeX editor like Emacs with AUCTex, TeXnic, WinEdt or some other. So you have to find how to alter the command in the editor's options. Here's how to do with the three just listed:
Emacs with AUCTex.
In short: in the tex-command-list option, there's an entry for the bibtex command that you can alter. In detail: Menu > Options > Customize Emacs > Browse Customization Groups. A new buffer opens in which you can browse the various Emacs settings. Go to: Wp > Tex > AUCTeX > TexCommand > Tex Command List. Open it: the buffer shows a list of entries of the TeX commands that AUCTeX launches. Find the command named "BibTeX", and replace the command field:
bibtex $s
by:
bibtex --include-directory="F:\my bibliography folder" $s
Don't forget to save the new setting (at the top of the buffer, clic on "Save for future sessions").
TeXnic.
Menu > Build > Define Output Profile. A windows opens with the settings for each output profile (tex => dvi, tex => pdf, etc.). Each profile has a bibtex section. Change the field "Command line arguments to pass to BibTeX" from:
"%bm"
to
--include-directory="D:\bib test" "%bm"
Do the same for all outprofiles you use.
WinEdt
Menu > Options > Executions Modes... A window opens with several tabs. In the "Console Applications" tab, you find a list of commands. Select bibtex, and add to the "Switches" field:
--include-directory="F:\my bibliography folder"
And that's it.
(Note, if something goes wrong in WinEdt, it might be useful to look at the output of LaTeX and BibTeX (by default, the console outputs windows close just after the execution of LaTeX/BibTeX is finished. In order to read the output, go back to the Execution modes dialog box, and in the Console Attributes section click "Pause if OK".)
Notes and links
The comp.text.tex mailing list had a thread in 2001 which suggested adding a customized config file for MikTeX, but that is not possible in later versions of MikTeX: the -personal switch of initexmf has been removed.
I found the way to modify AUCTeX on the GNU AUCTeX list here. Note that changing the Tex-Run options will not work when you use AUCTeX.
-------
I've tried copy and pasting the above options into the bibtex field but to no avail as references still don't show up in my report.