A hack: it's very easy to modify a .bst
file so that it recognises new entry types: simply append lines to the .bst
file such as, to make @undocument a synonym for @misc:
FUNCTION { undocument } { misc }
which just means that the function Bibtex calls to produce the .bbl entry for an @undocument just calls the function it uses to produce an @misc entry.
Biblatex does things a little differently, since it passes the type information as follows:
FUNCTION {article} { type$ output:entry }
where output:entry
is the generic function used to dump all the information about the record to the .bbl for Biblatex to work with (if you didn't pass the type information, as per the first line, Biblatex would think, e.g., @undocument was an @misc entry).
You can then just clone the site definition of biblatex.bst
into your local texmf tree (for Texlive), and add some lines such as:
FUNCTION { undocument } { type$ output:entry }
to your personal version of biblatex.bst. Bibtex will then treat these types just like the other types and you can use them in your bbx/cbx styles.
Postscript
As domwass notes, if you change your version of biblatex.bst
in this way, you have to be aware that upgrades might break Biblatex if you use a local fork based on an older version. While most revisions don't introduce incompatible changes to biblatex.bst
(there were no changes from 0.9e to 1.3 that would have caused problems, I think), the last revision, 1.4, introduced a very big change in the way biblatex.bst
represented information in .bib
files that certainly would have required creating a new patched file.
I am not sure to correctly understand your questions, but the BibLaTeX style files can be put in:
/texmf/tex/latex/biblatex/bbx ---> .bbx files (= bibliographies)
/texmf/tex/latex/biblatex/cbx ---> .cbx files (= in text citations)
/texmf/tex/latex/biblatex/lbx ---> .lbx files (= language strings)
/texmf/tex/latex/biblatex/ ---> other files (.cfg for instance)
You can put most modifications directly in a .cls
, .sty
or .tex
file as well (I say "most" to be on the safe side, I have not tried extensively but so far everything I have modified in a .tex
file has worked).
The last modification overrides the previous ones as usual. Indeed, if you are writing in a .tex
file, you must input your modifications after loading BibLaTeX, because it creates the macros and commands you will be using.
If you have somewhat significant modifications to make, it is better to put them in a dedicated style file in texmf
, so as not to clutter your other files. Also, you can load any style file as an option to the biblatex
package – which seems more appropriate than inputing / loading a separate file. (But nothing prevents you from making shortcuts to your style files if you are lazy to navigate texmf
every time you want to change them.)
Whenever you make a style file, whatever method you pick, you run the risk that a BibLaTeX update may cause some errors (although it is very rare).
Edit (trying to make my answer more complete)
As regards writing style files, I would suggest finding the one that is closest to your needs in the texmf-dist
folder, duplicating it to texmf
and then modifying it. This way you can learn from the style, and you have something to start from.
As regards .bbx
files, as hinted above they are used for typesetting the entire bibliography. Many styles eventually load standard.bbx
. A typical file will contain some information about formatting fields (\DeclareFieldFormat
), some information about formatting entries (\DeclareBibliographyDriver
) and various user (re)defined macros.
In .cbx
files, you will find some information about formatting fields (\DeclareFieldFormat
) and the definition of various citation commands (\DeclareCiteCommand
and \DeclareMultiCiteCommand
). The latter are also implemented through macros.
The .lbx
files contain language related information, which typically includes some typographic settings for the specific language, and the strings that BibLaTeX will use when printing citations and bibliographies (\DeclareBibliographyStrings
).
Best Answer
@lockstep has given the answer already but (depending on your operating system) (this is actually bash on windows/cygwin) you can use a combination of
kpsewhich
and grep to answer such questions.outputs: