improves the configurability of the output through CSS classes (adds .bibmenu and .bibanchor)
This commit is contained in:
@@ -88,8 +88,6 @@ Create a bib file with the publication records (e.g. csgroup2008.bib) and upload
|
|||||||
'''Handling mutliple bibtex files''': If you want to include several bibtex files, just give bibtexbrowser the files separated by semi-columns e.g:
|
'''Handling mutliple bibtex files''': If you want to include several bibtex files, just give bibtexbrowser the files separated by semi-columns e.g:
|
||||||
''bibtexbrowser.php?bib=strings.bib;csgroup2008.bib''
|
''bibtexbrowser.php?bib=strings.bib;csgroup2008.bib''
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
=====FAQ=====
|
=====FAQ=====
|
||||||
|
|
||||||
====How to embed a publication list in an home page?====
|
====How to embed a publication list in an home page?====
|
||||||
@@ -131,7 +129,6 @@ include( 'bibtexbrowser.php' );
|
|||||||
</td>
|
</td>
|
||||||
</tr><!-- end individual -->
|
</tr><!-- end individual -->
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
====How to change the reference style?====
|
====How to change the reference style?====
|
||||||
@@ -147,9 +144,16 @@ If bibtexbrowser.css exists, it is used, otherwise bibtexbrowser uses its own em
|
|||||||
.bibtitle { font-weight:bold; }
|
.bibtitle { font-weight:bold; }
|
||||||
.bibbooktitle { font-style:italic; }
|
.bibbooktitle { font-style:italic; }
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
For instance, one can tweak the output by disabling the display of some headers and pieces of information.
|
||||||
|
<pre>
|
||||||
|
.bibmenu {display:none} /* disables the [bibtex] and the like */
|
||||||
|
.bibanchor {display:none} /* disables the index [1] or [Name2010], etc. depending on the value of the configuration value ABBRV_TYPE and BIBTEXBROWSER_LAYOUT
|
||||||
|
.theader {display:none}
|
||||||
|
.sheader {display:none} /* disables the year header e.g., 2001 */
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
'''By setting your own style function'''
|
'''By setting your own style function'''
|
||||||
The bibliography style is encapsulated in a function. If you want to modify the bibliography style, you can copy the default style in a new file, say ''bibtexbrowser-yourstyle.php'', and rename the function ''DefaultBibliographyStyle'' in say ''MyFancyBibliographyStyle''.
|
The bibliography style is encapsulated in a function. If you want to modify the bibliography style, you can copy the default style in a new file, say ''bibtexbrowser-yourstyle.php'', and rename the function ''DefaultBibliographyStyle'' in say ''MyFancyBibliographyStyle''.
|
||||||
|
|||||||
+4
-4
@@ -1392,7 +1392,7 @@ class BibEntry {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$result .= bib2html($this);
|
$result .= bib2html($this);
|
||||||
$result .= $this->bib2links();
|
$result .= ' '.$this->bib2links();
|
||||||
switch(BIBTEXBROWSER_LAYOUT) { // close row
|
switch(BIBTEXBROWSER_LAYOUT) { // close row
|
||||||
case 'list':
|
case 'list':
|
||||||
$result .= '</li>'."\n";
|
$result .= '</li>'."\n";
|
||||||
@@ -1474,7 +1474,7 @@ class BibEntry {
|
|||||||
|
|
||||||
/** Returns an anchor for this entry. */
|
/** Returns an anchor for this entry. */
|
||||||
function anchor() {
|
function anchor() {
|
||||||
return '<a name="'.$this->getRawAbbrv().'"></a>';
|
return '<a class="bibanchor" name="'.$this->getRawAbbrv().'"></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** returns a collection of links for the given bibtex entry
|
/** returns a collection of links for the given bibtex entry
|
||||||
@@ -1483,7 +1483,7 @@ class BibEntry {
|
|||||||
function bib2links() {
|
function bib2links() {
|
||||||
$href = 'href="'.$this->getURL().'"';
|
$href = 'href="'.$this->getURL().'"';
|
||||||
|
|
||||||
$str = '';
|
$str = '<span class="bibmenu">';
|
||||||
|
|
||||||
if (BIBTEXBROWSER_BIBTEX_LINKS) {
|
if (BIBTEXBROWSER_BIBTEX_LINKS) {
|
||||||
// we add biburl and title to be able to retrieve this important information
|
// we add biburl and title to be able to retrieve this important information
|
||||||
@@ -1505,7 +1505,7 @@ class BibEntry {
|
|||||||
$str .= ' <a href="http://scholar.google.com/scholar?cites='.$this->getField("gsid").'">[cites]</a>';
|
$str .= ' <a href="http://scholar.google.com/scholar?cites='.$this->getField("gsid").'">[cites]</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $str;
|
return $str.'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user