@STRING{ac = "Acta Cryst."}
@STRING{cjb = "Can. J. Bot"}
% @STRING{ac = "Acta Crystallographica"}
% @STRING{cjb = "Canadian Journal Botany"}
I want to be able to comment out the short versions if I want the long
names, and vice-versa.
Actually, I suspect that I am doing this the wrong way entirely. Any
comments?
Owen
\bibliographystyle[shortjournalnames]{bstfile}
and program bstfile.bst to recognize the option and read the correct
file of abbreviations.
Unfortunately, at present \bibliographystyle doesn't take options, and
BibTeX has no facility for reading them. It also has no equivalent of
\input or #include for .bst files; for the above to work you'd want to
\input{shortabbrev} or \input{longabbrev}. Oren promised that BibTeX
1.0 will have these or some equivalent features, but it's not clear when
1.0 will be released. I think it's been in the works for a long time.
Andrew.
O> How is it possible to put comments into a BiBTeX .bib file?
Anything not in an entry is ignored.
O> Or alternatively, how do I get it to do this:
O> @STRING{ac = "Acta Cryst."}
O> @STRING{cjb = "Can. J. Bot"}
O> % @STRING{ac = "Acta Crystallographica"}
O> % @STRING{cjb = "Canadian Journal Botany"}
The % will be ignored. Delete/undelete the @ before the STRING
instead. Or simply change the order of the declarations; the last
definition of a string will be the effective one (you better test this
assertion).
O> I want to be able to comment out the short versions if I want the long
O> names, and vice-versa.
O> Actually, I suspect that I am doing this the wrong way entirely. Any
O> comments?
That I can't tell you. What you are doing will work as you intend.
There are other ways to get the same effect, such as to use an
abbreviation mechanism within LaTeX rather than BibTeX (e.g., abbrevs
package). You could use the combination BibTeX and LaTeX to write a
.bst+.sty combination that would use the short name in the references
iff a LaTeX flag were set.
OMA> How is it possible to put comments into a BiBTeX .bib file? Or
OMA> alternatively, how do I get it to do this:
OMA> @STRING{ac = "Acta Cryst."} @STRING{cjb = "Can. J. Bot"}
OMA> % @STRING{ac = "Acta Crystallographica"} @STRING{cjb = "Canadian
OMA> % Journal Botany"}
OMA> I want to be able to comment out the short versions if I want the
OMA> long names, and vice-versa.
I think the easiest way is to make two little files, "longstring.bib"
and "shortstring.bib" and then have
\bibliography{longstring,database1,database2,...}
or
\bibliography{shortstring,database1,database2,...}
in the document.
Hope this helps
- Carsten
--
Carsten Dominik <dom...@astro.uva.nl> \ _ /
Sterrenkundig Instituut "Anton Pannekoek" |X| _
Kruislaan 403; NL-1098 SJ Amsterdam /| |\ _ _ _/ \
phone +31 (20) 525-7477; FAX +31 (20) 525-7484 ___|o|____/ ~~ \___/ ~~~~~
Carsten Dominik <dom...@astro.uva.nl> writes:
>I think the easiest way is to make two little files, "longstring.bib"
>and "shortstring.bib" and then have
>
> \bibliography{longstring,database1,database2,...}
>
>or
>
> \bibliography{shortstring,database1,database2,...}
This is what I do. Be sure your strings definition file is the first
.bib file in \bibliography{}.
This works great for me, *except* ... is there a way to get Alpha (a
Mac editor) to stop treating externally-defined strings as normal text,
and putting {}'s around them, when formatting BibTeX entries? Alpha
knows about strings defined in the current file, but not about strings
that are defined in some other file.
--
Una Smith una....@yale.edu
Department of Ecology and Evolutionary Biology
Yale University