Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] Bibtex style

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] Bibtex style


Chronological Thread 
  • From: Bas Spitters <address@hidden>
  • To: address@hidden
  • Cc: address@hidden, Mingfeng Yang <address@hidden>
  • Subject: Re: [TeXmacs] Bibtex style
  • Date: Fri, 9 Dec 2005 21:38:34 +0100

On Thursday 08 December 2005 16:02, Bas Spitters wrote:
> On Thursday 08 December 2005 14:59, Henri Lesourd wrote:
> > Mingfeng Yang wrote:
> > > But what I want to know is the format of the reference. For example,
> > > some journals need the reference in "author, journal, time, page"
> > > format, and the citation in the text should be in superscript or in
> > > parenthesis or bracket etc. I googled, and found out that bibtex can
> > > handle this according to a corresponding bibliography style file. But
> > > the grammar of this file looks very complicated. :(
> >
> > Unfortunately, I'm afraid that in this respect,
> > using TeXmacs changes absolutely nothing at all
> > to the bibTeX crappy style file syntax :-(...
>
> These guys claim they can do better: you can use python and XML.
> Use the script pybformat
> http://arch.pybliographer.org/documentation/script-scripting-existing.html
> and create your own styles:
> http://arch.pybliographer.org/documentation/styles.html
>
> I have not tested this. If this works I guess it should not be too
> difficult add it to texmacs, since texmacs just does latex import.(?)

As I suspected this is indeed not difficult.

Choose Preferences -> bibtex command -> other and type pybtex

This should be enough to get it to work. However, there are a few small
problems:
1. pybtex does not use the global variables BIBINPUTS and BSTINPUTS which
texmacs passes to bibtex.
2. The pybtex separates its fields by a \newblock followed by an empty line.
Texmacs does not like this and wants a completely empty line.

Here are two workarounds:
1. make a soft-link in the directory $TEXMACS_HOME_PATH/system/bib:
ln -s [place where your bib-file is stored]

2. In the file /usr/share/pybliographer/Pyblio/Output/LaTeX.py
Change the line:
self.out.write ('\\bibitem[%s]{%s}\n' % (key, entry.key.key))
in:
self.out.write ('\n\\bibitem[%s]{%s}\n' % (key, entry.key.key))


The real solutions:
1. Is there a python-hacker that can tell me how to do this easily?
2. Texmacs import of bbl-files should accept
\newblock
as a valid separator between bibitems.


I think it would be an improvement for texmacs to allow pybtex as an optional
bibtex command, as Henri said the bibTeX style file syntax is crappy.

Bas



Archive powered by MHonArc 2.6.19.

Top of Page