[pmwiki-users] Bibliographies
christian.ridderstrom at gmail.com
christian.ridderstrom at gmail.com
Thu Sep 7 14:11:18 CDT 2006
On Thu, 7 Sep 2006, Tom Backer Johnsen wrote:
> > something like the following functionality.
> >
> > The bib file is either a single pmwiki page (references identified by
> > anchors) or multiple pages (one page per reference).
>
> If this implies that a pmwiki page replaces a standard BibTex file, I am
> sceptical. To accumulate a set of references to be used in various
> kinds of publications is for most researchers a lengthy process, and it
> is clear advantage to use a data base format that is usable in other
> contexts, e.g. Lyx.
Sorry for my long post here, but I think you'll find it useful. Apologies
if I'm explaining things you already know. I also apologize for bursting
in on this thread without having thoroughly read the previous posts as
well as I would like. This link might be useful btw:
http://wiki.lyx.org/BibTeX/BibTeX
I have written several documents using LyX with BibTeX for the references
- it worked splendidly. In fact, I had hundreds of references stored in
four or five different .bib-files that I then used with LyX (via
LaTeX/BibTeX) to produce the documents. So I think storing the references
in a BibTeX format, where one .bib-file corresponds to one wiki page is a
great idea.
Converting such a "database" of references back to .bib-file is then as
simple as appending '?action=source' to the page's URI and finally saving
the resulting web page. Like this (you can try it):
http://pmwiki.org/wiki/Christian/BibTeX?action=source
I therefore would recommend letting a single .bib-file correspond to a
single wiki page. That would immediately allow those of us who know the
BibTeX format to modify the list of references by simply editing the page.
The format isn't that complicated by the way, look at the link above. It
would also be very easy to take an exising .bib-file and paste it as a
wiki page...
As for LyX, it simply presents you with a graphical interface for
selecting references to cite in your document. Actually, LyX allows you to
use other programs to manage your references, e.g. JabRef
http://jabref.sourceforge.net/
where (some of) the other programs can actually be used to get LyX to
insert a citation at the cursor. (Disclaimer: I've never used JabRef for
this, I generally just edit the .bib-files in Emacs)
Here you'll find a list of other programs that work with .bib-files:
http://wiki.lyx.org/BibTeX/Programs
Anyway, as there are lots of programs out there that already exist solely
for the purpose of editing .bib-files, what if we made it very easy to
edit the .bib-file externally? Especially as that part of the problem is
already solved by Pywe, http://pmwiki.org/wiki/Cookbook/Pywe. I think the
following would work for using JabRef:
pyve -e jabref http://pmwiki.org/wiki/Christian/BibTeX
So by simply storing the .bib-file as a wiki page we have two ways of
editing it:
* "Expert" mode, i.e. editing the wiki page directly by hand or from
Emacs using pmwiki-mode and bibtex-mode.
* External program via pywe, i.e. using JabRef or any of the other
programs for editing .bib-files.
If you want to, you can still create a separate mechanism for working with
the list of refences with forms etc. This might be a very nice solution
for those people who doesn't want to install a separate program such as
JabRef. Another alternative might be to see if there is some nice program
written in PhP that is already designed to work from within a web page...
> > References use standard pmwiki markup, with the ability to identify
> > the elements making up each reference (use bibedit for a list of
> > elements).
>
> Yepp, that seems simple even for a complete novice in respect to PhP
> like me, some modifications to BibTexRef should take care of that.
> The inclusion of references should be as simple as possible. I would
> for instance prefer the name of the .bib file to be optional rather
> than having to be explicitly entered for every reference. Most
> writers would after all use only one .bib file for each project.
I actually used several .bib-files as I said above, but it is very common
to only use one. Btw, IIRC, one .bib-file can include another (I might be
wrong though).
In LaTeX there is one directive to specify the *style* of your
bibliography and another to specify which .bib-files to use. This latter
directive also inserts the actual bibliography at that point, so the lines
usually appear at the end of a document. Here's what it looks like:
\bibliographystyle{unsrt}
\bibliography{chr_1st,Christian}
The first line specifies that the bibliography should be of the style
'unsrt' (unsorted) and the second line says that BibTeX should use the
.bib-files 'chr_1st.bib' and 'Christian.bib'.
The actual citing of an entry could look like this
\cite{Ridderstrom:2003:TWR}
This is what LaTeX looks like when it is using BibTeX, but why not modify
it for PmWiki like this:
(:bibliographystyle unsrt:)
(:biblirography SomeGroup.Chr_1st SomeGroup.Christian :)
We might possibly want to extend this by allowing anchors to be used to
only refer to a part of a wiki page, but I' not sure what the gain would
be.
I think the markup for citing something should just be
(:cite Ridderstrom:2003:TWR :)
The directive (:bibliography ...:) would specify where the find the
references (and also where to insert the bibliography), so the directive
for citing does not have to specify this.
Here is an alternative using a link syntax:
[[cite:Ridderstrom:2003:TWR]]
which could simply be shorthand for (:cite ...:), but the difference is
only four characters...
As an aside, when referring to URI:s, I think it is still a good idea to
use a BibTeX format for the actual reference entry. It might look like
this:
@Misc{Tools:Matlab,
author = {{The MathWorks Inc.}},
title = {{MATLAB, Simulink, xPC Target etc}},
howpublished= {\url{http://www.mathworks.com}},
annote = {Reference to MATLAB},
affiliation = {-},
address = {3 Apple Hill Dr., Natick, MA 01760-2098, USA},
location = {-},
}
You don't have to add all the field though... the "howpublished" is the
thing that will result in the URI.
> The creation of a bibliography itself should be a relatively simple
> matter, but where the appearance of the entries themselves in the
> bibliography can be quite complex. I wonder how Lyx works in this
> respect?
I don't quite understand your question here...
Normally LyX produces nicely typeset documents by generating a LaTeX file
(.tex). That file is then parsed by LaTeX, and BibTeX as well if citations
are used. So the real work is done by LaTeX/BibTeX here.
I hope this has helped!
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list