[pmwiki-users] Bibliographies

Tom Backer Johnsen backer at psych.uib.no
Fri Sep 8 00:39:52 CDT 2006


christian.ridderstrom at gmail.com wrote:
> 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

First: do not apologise.  The comments are lengthy but useful.
Second, I have known about Lyx for some time now (past year or so) and
I am very impressed.  This includes BibTex.  So I know about the Wiki
in that site (which evidently is based on PmWiki).
> 
> 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

To a large extent, that presupposes that my coauthors know the BibTex
format, which will definitely not the normal thing.
> 
> 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...

I agree, it is not complicated.  But I can imagine the expression on
the face of some of my students who know little and understand even
less about references or the whole idea behind research reports of
different kinds.  They need a different interface than a "raw" BibTex
file.  So do some of my coauthors.
> 
> 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/

The Lyx graphical interface to a database is fine as it is.  Is it
possible to create something similar for PmWiki?  Otherwise a simple
syntax thing is good enough.  Look up the name of the reference, and
that is it.  After all, the important task is the text, not the
references.

> 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

Seen it.  Most of the programs are for Linux which I normally do not
use. There are very few programs for administration of BibTex
databases under windows.

> 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.

Interesting.  I think it is a good strategy to use existing tools as
far as possible.  There is no reason to "reinvent the wheel" unless
there is a need to do so.
> 
> 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...

Some PhP procedure is obviously a better solution.  But where can one
find such a procedure?
> 
>>> 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 :)

Looks reasonable to me.  One should keep oneself close to the Lyx
syntax in order to simplify a transformation of the PmWiki markup to
something close to Lyx.
> 
> 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...

Well, there are a number of different styles as to how the references
should appear in the bibliography.  Sorting them is one problem, how
thae appear is another question, that seems to be dependent on the
chosen style.
> 
> 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.

What I really would want to have is some procedure that:  Given a set
of pages in PmWiki in a predefined sequence containing images, tables,
and references to entries in BibTex database:  Produce a Lyx type of
file with all the required elements for a book.  I accept the need for
final adjustments, but that is the basic goal.  How is that goal
accomplished?

Tom

> 
> I hope this has helped!
> /Christian
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users


-- 
+----------------------------------------------------------------+
| Tom Backer Johnsen, Psychometrics Unit,  Faculty of Psychology |
| University of Bergen, Christies gt. 12, N-5015 Bergen,  NORWAY |
| Tel : +47-5558-9185                        Fax : +47-5558-9879 |
| Email : backer at psych.uib.no    URL : http://www.galton.uib.no/ |
+----------------------------------------------------------------+





More information about the pmwiki-users mailing list