From 9e850feb60db9fea11b1ec32fb133598f9ac1b14 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 2 Jan 2017 13:41:39 -0500 Subject: [PATCH] update wiki doc --- bibtexbrowser-documentation.wiki | 51 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/bibtexbrowser-documentation.wiki b/bibtexbrowser-documentation.wiki index 5e2116c..2d6fa4a 100755 --- a/bibtexbrowser-documentation.wiki +++ b/bibtexbrowser-documentation.wiki @@ -1,4 +1,4 @@ - -'''Stable Version''': [[http://www.monperrus.net/martin/bibtexbrowser.php.txt|bibtexbrowser.php]] +'''Stable Version''': [[http://www.monperrus.net/martin/bibtexbrowser.php.txt|bibtexbrowser.php]] [[https://github.com/monperrus/bibtexbrowser/commits/master|Changelog]] Don't hesitate to contact me to be added in the [[http://www.monperrus.net/martin/bibtexbrowser/users|lists of bibtexbrowser users]]:-) @@ -56,7 +57,7 @@ Don't hesitate to contact me to be added in the [[http://www.monperrus.net/marti The following uses bibtexbrowser under the hood: * [[http://www.monperrus.net/martin/bibtex-prettyprint|A pretty-printer and cleaner for Bibtex]] * [[http://github.com/KaiBi/IEEEStyleForBibtexbrowser|A custom citation style for bibtexbrowser adhering to the IEEE citations guidelines (on github)]] -* Generating publication lists in Latex using [[http://www.monperrus.net/martin/bibtex2latex]] +* Generating publication lists in Latex using [[http://www.monperrus.net/martin/bibtex2latex]] * [[http://www.monperrus.net/martin/feeding-mysql-database-with-bibtexbrowser|Feeding a MySQL database from the content of a bibtex file]] * Publication lists in Wordpress with [[http://www.monperrus.net/martin/wp-publications|wp-publications]] * [[http://www.monperrus.net/martin/publication-lists-with-hal-and-bibtexbrowser|Publication lists with HAL and bibtexbrowser]] @@ -96,10 +97,10 @@ $db->load('biblio.bib'); // can also be $query = array('year'=>'.*'); $query = array('year'=>'2014'); $entries=$db->multisearch($query); -uasort($entries, 'compare_bib_entries'); +uasort($entries, 'compare_bib_entries'); -foreach ($entries as $bibentry) { - echo $bibentry->toHTML()."<br/>"; +foreach ($entries as $bibentry) { + echo $bibentry->toHTML()."<br/>"; } ?> @@ -189,7 +190,7 @@ For contributing with a new style, [[http://www.monperrus.net/martin/|please dro ====How to change the link style?==== -By default each bibliographic entry is followed by +By default each bibliographic entry is followed by [bibtex] [pdf] [doi], etc. This can be tailored by configuring as follows (in the file ''bibtexbrowser.local.php'') @@ -198,15 +199,15 @@ define('BIBTEXBROWSER_LINK_STYLE','MyFancyBib2links'); function MyFancyBib2links(&$bibentry) { // bib is a special type of link. without the url argument or with an invalid image, it prints '[bibtex]' $result = $bibentry->getBibLink(); - + $result .= ' '.$bibentry->getLink('url'); - + // Google Scholar ID. empty string if no gsid field present $result .= ' '.$bibentry->getGSLink(); - + // returns an empty string if no doi field present $result .= ' '.$bibentry->getDoiLink(); - + return $result; } ?> @@ -262,7 +263,7 @@ You may create your own one in ''bibtexbrowser.local.php'' (see also "creating a
 define('BIBLIOGRAPHYSECTIONS','my_sectioning');
 function my_sectioning() {
-return  
+return
   array(
   // Books
     array(
@@ -313,7 +314,7 @@ Add in ''bibtexbrowser.local.php'':
 global $BIBTEXBROWSER_LANG;
 $BIBTEXBROWSER_LANG=array();
 $BIBTEXBROWSER_LANG['Refereed Conference Papers']="Conférences avec comité de lecture";
-... 
+...
 $BIBTEXBROWSER_LANG['Year']="Année";
 ?>
 
@@ -345,9 +346,9 @@ $db = new BibDataBase(); $db->load('biblio.bib'); $query = array('year'=>'2014'); $entries=$db->multisearch($query); -uasort($entries, 'compare_bib_entries'); -foreach ($entries as $bibentry) { - echo $bibentry->getYear().'
'; +uasort($entries, 'compare_bib_entries'); +foreach ($entries as $bibentry) { + echo $bibentry->getYear().'
'; } ?> @@ -409,7 +410,7 @@ and then in ''bibtexbrowser.after.php'': class PgmDispatcher extends Dispatcher { function getDB() { $db = new BibDataBase(); - + // builds the first entry $entry = new BibEntry(); $entry->setType("article"); @@ -417,7 +418,7 @@ class PgmDispatcher extends Dispatcher { $entry->setField("year", "2014"); $entry->setKey("kolp"); $db->addEntry($entry); - + // builds the second entry $entry2 = new BibEntry(); $entry2->setType("article"); @@ -425,13 +426,13 @@ class PgmDispatcher extends Dispatcher { $entry2->setField("year", "2013"); $entry2->setKey("tili"); $db->addEntry($entry2); - + return $db; } } ?> - + ====How to remove fields from the bibtex text?==== If you want to remove some fields (e.g. abbrv and comment) from the resulting bibtex, add in ''bibtexbrowser.local.php'': @@ -480,7 +481,7 @@ include('bibtexbrowser.php'); ''output.php'':
 OUTPUT (no header sent)
-<?php 
+<?php
 define('BIBTEXBROWSER_URL','elem.php');
 include('bibtexbrowser.php');
 ?>
@@ -489,8 +490,8 @@ include('bibtexbrowser.php');
 ''elem.php'':
 
 ELEM (no header sent)
-<?php 
-include('bibtexbrowser.php'); 
+<?php
+include('bibtexbrowser.php');
 ?>
 
@@ -499,7 +500,7 @@ include('bibtexbrowser.php'); You must add a ''@string'' block in the bibtex file, which contains the links. The key is a concatenation of ''hp_'' and then ''FirstNameLastName'' (no space). For instance:
-@String { 
+@String {
   hp_ericfoo      = {http://www.foo.de/},
   hp_joebar      = {http://www.joebar.me/},
 }