Hi again,

On Thu, Sep 15, 2011 at 7:08 PM, Murat Yildizoglu <myi...@gmail.com> wrote:
> I am meeting another problem with elyxer conversion. If I do not put
> the .bib files in the same folder as the .lyx file, elyxer does not
> seem able to find them, and the bibliography is empty. If I put them
> in the same folder, I get the bibliography.

You can also use relative paths, and they are supposed to work! Where
are you placing the .bib files?

> Also, I have not been able to find a way to generate a standard agsm
> (harvard) style bibliography reference. I only get a number between
> brackets [1] as reference, even if I choose author-name in the options
> of natbib in the document properties box.
>
> Only author-name2 gives me a real author-name type of reference (but
> brackets, and also with the key typed in the beginning of the full
> reference in the typest bibliography).

Let me explain you a little bit how BibTeX support works in eLyXer: it
keeps its own templates to transform the variables into references and
formats. These templates can be located in src/conf/base.conf. For
example the one you are using (I assume it is authordate2) looks like
this:

[BibStylesConfig.authordate2]
cite:$surname, $year
default:$authors. $year. <i>$title</i>. $publisher.{ URL <a
href="$url">$url</a>.}{ $note.}
@article:$authors. $year. $title. <i>$journal</i>,
<b>$volume</b>($number), $pages.{ URL <a href="$url">$url</a>.}{
$note.}
@book:$authors. $year. <i>$title</i>. $publisher.{ URL <a
href="$url">$url</a>.}{ $note.}

As you see, the first line defines the style, authordate2; the second
line the citing style, in this case author surname and year. I am
afraid the cites always show the brackets right now. After that you
can see how eLyXer will display the default document type, then an
article and a book.

> These are very commonly necessary functions, so I assume that I am
> doing something strange. How can I correct these problems?

It is just that these templates are user-contributed; apparently you
are the first to request the agsm format. If you want you can edit
your elyxer.py file and insert a new style: just go after the
vancouver style and insert this:

[BibStylesConfig.vancouver]
...

[BibStylesConfig.agsm]
cite:$surname, $year
default:$authors. $title; {$publisher, }$year.{ $howpublished.}{ URL:
<a href="$url">$url</a>.}{ $note.}
@article:$authors. $title. <i>$journal</i>,
$year{;{<b>$volume</b>}{($number)}{:$pages}}.{ URL: <a
href="$url">$url</a>.}{ $note.}
@book:$authors. $title. {$publisher, }$year.{ URL: <a
href="$url">$url</a>.}{ $note.}

Note that each document type (@article) has variables ($title) which
are taken from the .bib file, and some HTML code (<i>$journal</i>) to
format the text.

Now you can play with it until you like the result, and then send it
my way. Alternatively, you can send me another sample privately and I
will work on it.

Thanks,

Alex.

Reply via email to