Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a biber.conf file with regular expressions for matching and replacing journal names for their abbreviations (following Paul Stanley's advice).
Right now the file is located in my home dir as .biber.conf and so it is always loaded.
I'd like to be able to control the loading of this file in cases where I don't need to use it.

According to the biber manual this should be easy to achieve by renaming the file to say JourAbs.bcf and parsing it to biber like this: biber <options> JourAbs.bcf.

What I can't figure out is how to code this in the preamble. I tried: \usepackage[style=ISMEJ, natbib=true, backend=biber JourAbs.bcf]{biblatex}, but that doesn't seem to work. I get: ! Package biblatex Error: Option 'backend=biberjourab invalid.

I know there's also the option of using \DeclareSourcemap but that would require generating a whole new file for some 50+ journals with an entirely different syntax. I'd resort to that only if there are some clear advantages to using this method.

(I'm using: kubuntu 12.04; lyx 2.0.4; biblatex 2.2; biber 1.2)

share|improve this question
    
I've never done this. But don't you just set backend=biber in the file and then pass the options to biber on the command line when you run biber? (Or set up Latexmk or ... your favourite editor to take care of that) –  Paul Stanley Oct 19 '12 at 10:10
    
Yep, that would be the standard way, I guess, but I compile my docs using lyx or occasionally kile and not through command line. –  Roey Angel Oct 19 '12 at 10:45
1  
You can have a local biber.conf in the current directory. If you want to use the same file in multiple projects, you could soft link to one central copy. Your suggestion of placing this in a .bcf file seems wrong, that file gets rewritten by the latex runs. Also the biber documentation says that certain commands can only be in the biber.conf file. –  Andrew Swann Oct 19 '12 at 16:37
    
This seems to work fine. Why didn't publish it as an answer? I'll keep the questions open in case someone comes with a more 'elegant' answer. –  Roey Angel Oct 19 '12 at 19:33
1  
You can't do this in the LaTeX file. The backend=biber just tells biblatex which internal code to use, it has nothing to do with specifying the command-line for biber. If you want to use an alternative config file, you have to run biber with the --configfile|-g flag. –  PLK Oct 20 '12 at 20:38
show 1 more comment

1 Answer 1

up vote 1 down vote accepted

To summarise the comments to my question. Apparently it is not possible to parse a specific file to biber when calling it from within a LaTeX document. The options are therefore:

  1. Create a .biber.conf file in the home directory, which will be loaded automatically biber whenever it is used (I have no idea what's the Windows/Mac alternative.)
  2. Add a biber.conf file to the same directory of the LaTeX document (or create a link to where the biber.conf file is located).
  3. Supply the commands directly in the preamble, or if these are too long write them into a text document and use \input{} to include them.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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