Re: automate journal abbreviations?
- From: Joseph Wright <joseph.wright@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 Mar 2009 06:08:59 -0700 (PDT)
On Mar 11, 1:42 pm, alistair k <alistai...@xxxxxxxxxxxxxx> wrote:
In the past I've tried out some automated stuff at the LaTeX level.
However, you either need to do a rather long match for a full title
(which might have varying braces, etc.) or do something on a
word-by-wrod basis (which is problematic with things like "J. Phys.
Chem. A": the "A" is a pain).
As things stand, I have full titles in the .bib file. BibDesk's
autocomplete function keeps everything consistent so long matches for
full titles should be ok.
Where can I find out more about how to do this? This kind of LaTeX work
is new to me.
Okay, this is not a "one change" thing to do. At a LaTeX level, you
need a function which reads a journal title, then sees if there is an
abbreviation that matches. Two macros are needed: one to create
abbreviations and one to try to abbreviate a title. I'll assume that e-
TeX is available for this.
\documentclass{article}
\makeatletter
% Here, a macro is created for each journal title, storing the
% abbreviation.
\newcommand*{\DefineJournalAbbreviation}[2]{%
\@namedef{journal@#1}{#2}%
}
\DeclareRobustCommand*{\AbbreviateJournal}[1]{%
\ifcsname journal@#1\endcsname % Look for macro
\@nameuse{journal@#1}% Use macro
\else
#1% No luck - use original text
\fi
}
\makeatother
\DefineJournalAbbreviation{Journal of the American Chemical Society}
{J.~Am.\ Chem.\ Soc.}
\begin{document}
\AbbreviateJournal{Journal of the American Chemical Society}
\AbbreviateJournal{An unknown journal}
\end{document}
You also need get \AbbreviateJournal wrapped around the text of the
titles in the bibliography. If you use biblatex this would be done by
modifying your .bbx file. For standard BibTeX, you need to create a
modified .bst file which does this. Most BibTeX styles have lines
such as:
journal emphasize "journal" output.check
which we could modify to:
"\AbbreviateJournal"{ journal * "}" * emphasize "journal" output.check
to wrap the title up inside the appropriate macro.
Hope this helps.
--
Joseph Wright
.
- Follow-Ups:
- Re: automate journal abbreviations?
- From: alistair k
- Re: automate journal abbreviations?
- References:
- automate journal abbreviations?
- From: alistair k
- Re: automate journal abbreviations?
- From: alistair k
- Re: automate journal abbreviations?
- From: alistair k
- Re: automate journal abbreviations?
- From: Joseph Wright
- Re: automate journal abbreviations?
- From: alistair k
- automate journal abbreviations?
- Prev by Date: Re: kvoptions and options dependencies, check if option was explicit set to false
- Next by Date: large figures at the bottom of the page
- Previous by thread: Re: automate journal abbreviations?
- Next by thread: Re: automate journal abbreviations?
- Index(es):
Relevant Pages
|