I want to use the extract/append possibility offered by the CLI to integrate refbase with latexmk by setting up a latexmk-"custom dependency" for generating *.bib from *.aux.
While trying this, I realized a strange (at least to me) behavior: If the "refbase" Perl-script is called directly from the prompt, everything works fine. However, if called from within a wrapper (Perl-)script by invoking
system("refbase --host=http://beta.refbase.net/ --firstname.lastname@example.org --password=user --extract='foo.aux' --format=bibtex --append='foo.bib' --update=1");
the refbase-server responds with:
SELECT author, title, type, year, publication, abbrev_journal, volume, issue, pages, keywords, abstract, address, corporate_author, thesis, publisher, place, editor, language, summary_language, orig_title, series_editor, series_title, abbrev_series_title, series_volume, series_issue, edition, issn, isbn, medium, area, expedition, conference, notes, approved, contribution_id, online_publication, online_citation, created_date, created_time, created_by, modified_date, modified_time, modified_by, call_number, serial, orig_record, serial, file, url, doi, isbn, type FROM refs WHERE ((cite_key RLIKE "^(Eisenlohr2004|Roters_etal2010)$")) ORDER BY author, year DESC, publication
caused the following error:
Error 1054: Unknown column 'cite_key' in 'where clause'
I confirmed this with my own as well as with the beta.refbase.net server…
Any clue what the difference in direct versus "system" calling might be??
Thanks for help
Problem is solved: Perl "system" call requires single ticks, not quotes…
So a working latexmk custom dependency would look like:
add_cus_dep( 'aux', 'bib', 0, 'refbase' );
$source = $_;
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.