
7 changed files with 650 additions and 43 deletions
-
4composer.json
-
203composer.lock
-
28public/bibtexbrowser.css
-
30public/index.php
-
3src/Definitions.php
-
231src/bibacid-utf8.bib
-
194src/bibtexbrowser.php
@ -0,0 +1,203 @@ |
|||||
|
{ |
||||
|
"_readme": [ |
||||
|
"This file locks the dependencies of your project to a known state", |
||||
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", |
||||
|
"This file is @generated automatically" |
||||
|
], |
||||
|
"content-hash": "fa3a6762d454ebe3dce634e74511aae2", |
||||
|
"packages": [], |
||||
|
"packages-dev": [ |
||||
|
{ |
||||
|
"name": "kint-php/kint", |
||||
|
"version": "2.2", |
||||
|
"source": { |
||||
|
"type": "git", |
||||
|
"url": "https://github.com/kint-php/kint.git", |
||||
|
"reference": "b091715eadaf6e1a7ef927f3e81d1004611d2aea" |
||||
|
}, |
||||
|
"dist": { |
||||
|
"type": "zip", |
||||
|
"url": "https://api.github.com/repos/kint-php/kint/zipball/b091715eadaf6e1a7ef927f3e81d1004611d2aea", |
||||
|
"reference": "b091715eadaf6e1a7ef927f3e81d1004611d2aea", |
||||
|
"shasum": "" |
||||
|
}, |
||||
|
"require": { |
||||
|
"php": ">=5.1.2" |
||||
|
}, |
||||
|
"require-dev": { |
||||
|
"friendsofphp/php-cs-fixer": "^2.0", |
||||
|
"phpunit/phpunit": "^4.0", |
||||
|
"symfony/finder": "^2.6" |
||||
|
}, |
||||
|
"type": "library", |
||||
|
"autoload": { |
||||
|
"files": [ |
||||
|
"init.php" |
||||
|
], |
||||
|
"classmap": [ |
||||
|
"src/" |
||||
|
] |
||||
|
}, |
||||
|
"notification-url": "https://packagist.org/downloads/", |
||||
|
"license": [ |
||||
|
"MIT" |
||||
|
], |
||||
|
"authors": [ |
||||
|
{ |
||||
|
"name": "Rokas Šleinius", |
||||
|
"homepage": "https://github.com/raveren" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Jonathan Vollebregt", |
||||
|
"homepage": "https://github.com/jnvsor" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Contributors", |
||||
|
"homepage": "https://github.com/kint-php/kint/graphs/contributors" |
||||
|
} |
||||
|
], |
||||
|
"description": "Kint - debugging tool for PHP developers", |
||||
|
"homepage": "https://kint-php.github.io/kint/", |
||||
|
"keywords": [ |
||||
|
"debug", |
||||
|
"kint", |
||||
|
"php" |
||||
|
], |
||||
|
"time": "2017-09-06T17:46:03+00:00" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "monolog/monolog", |
||||
|
"version": "1.23.0", |
||||
|
"source": { |
||||
|
"type": "git", |
||||
|
"url": "https://github.com/Seldaek/monolog.git", |
||||
|
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4" |
||||
|
}, |
||||
|
"dist": { |
||||
|
"type": "zip", |
||||
|
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4", |
||||
|
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4", |
||||
|
"shasum": "" |
||||
|
}, |
||||
|
"require": { |
||||
|
"php": ">=5.3.0", |
||||
|
"psr/log": "~1.0" |
||||
|
}, |
||||
|
"provide": { |
||||
|
"psr/log-implementation": "1.0.0" |
||||
|
}, |
||||
|
"require-dev": { |
||||
|
"aws/aws-sdk-php": "^2.4.9 || ^3.0", |
||||
|
"doctrine/couchdb": "~1.0@dev", |
||||
|
"graylog2/gelf-php": "~1.0", |
||||
|
"jakub-onderka/php-parallel-lint": "0.9", |
||||
|
"php-amqplib/php-amqplib": "~2.4", |
||||
|
"php-console/php-console": "^3.1.3", |
||||
|
"phpunit/phpunit": "~4.5", |
||||
|
"phpunit/phpunit-mock-objects": "2.3.0", |
||||
|
"ruflin/elastica": ">=0.90 <3.0", |
||||
|
"sentry/sentry": "^0.13", |
||||
|
"swiftmailer/swiftmailer": "^5.3|^6.0" |
||||
|
}, |
||||
|
"suggest": { |
||||
|
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", |
||||
|
"doctrine/couchdb": "Allow sending log messages to a CouchDB server", |
||||
|
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", |
||||
|
"ext-mongo": "Allow sending log messages to a MongoDB server", |
||||
|
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", |
||||
|
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", |
||||
|
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", |
||||
|
"php-console/php-console": "Allow sending log messages to Google Chrome", |
||||
|
"rollbar/rollbar": "Allow sending log messages to Rollbar", |
||||
|
"ruflin/elastica": "Allow sending log messages to an Elastic Search server", |
||||
|
"sentry/sentry": "Allow sending log messages to a Sentry server" |
||||
|
}, |
||||
|
"type": "library", |
||||
|
"extra": { |
||||
|
"branch-alias": { |
||||
|
"dev-master": "2.0.x-dev" |
||||
|
} |
||||
|
}, |
||||
|
"autoload": { |
||||
|
"psr-4": { |
||||
|
"Monolog\\": "src/Monolog" |
||||
|
} |
||||
|
}, |
||||
|
"notification-url": "https://packagist.org/downloads/", |
||||
|
"license": [ |
||||
|
"MIT" |
||||
|
], |
||||
|
"authors": [ |
||||
|
{ |
||||
|
"name": "Jordi Boggiano", |
||||
|
"email": "j.boggiano@seld.be", |
||||
|
"homepage": "http://seld.be" |
||||
|
} |
||||
|
], |
||||
|
"description": "Sends your logs to files, sockets, inboxes, databases and various web services", |
||||
|
"homepage": "http://github.com/Seldaek/monolog", |
||||
|
"keywords": [ |
||||
|
"log", |
||||
|
"logging", |
||||
|
"psr-3" |
||||
|
], |
||||
|
"time": "2017-06-19T01:22:40+00:00" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "psr/log", |
||||
|
"version": "1.0.2", |
||||
|
"source": { |
||||
|
"type": "git", |
||||
|
"url": "https://github.com/php-fig/log.git", |
||||
|
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" |
||||
|
}, |
||||
|
"dist": { |
||||
|
"type": "zip", |
||||
|
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", |
||||
|
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", |
||||
|
"shasum": "" |
||||
|
}, |
||||
|
"require": { |
||||
|
"php": ">=5.3.0" |
||||
|
}, |
||||
|
"type": "library", |
||||
|
"extra": { |
||||
|
"branch-alias": { |
||||
|
"dev-master": "1.0.x-dev" |
||||
|
} |
||||
|
}, |
||||
|
"autoload": { |
||||
|
"psr-4": { |
||||
|
"Psr\\Log\\": "Psr/Log/" |
||||
|
} |
||||
|
}, |
||||
|
"notification-url": "https://packagist.org/downloads/", |
||||
|
"license": [ |
||||
|
"MIT" |
||||
|
], |
||||
|
"authors": [ |
||||
|
{ |
||||
|
"name": "PHP-FIG", |
||||
|
"homepage": "http://www.php-fig.org/" |
||||
|
} |
||||
|
], |
||||
|
"description": "Common interface for logging libraries", |
||||
|
"homepage": "https://github.com/php-fig/log", |
||||
|
"keywords": [ |
||||
|
"log", |
||||
|
"psr", |
||||
|
"psr-3" |
||||
|
], |
||||
|
"time": "2016-10-10T12:19:37+00:00" |
||||
|
} |
||||
|
], |
||||
|
"aliases": [], |
||||
|
"minimum-stability": "stable", |
||||
|
"stability-flags": [], |
||||
|
"prefer-stable": false, |
||||
|
"prefer-lowest": false, |
||||
|
"platform": { |
||||
|
"php": ">=4" |
||||
|
}, |
||||
|
"platform-dev": [] |
||||
|
} |
@ -1,28 +0,0 @@ |
|||||
.datePublished { |
|
||||
background-color: blue; |
|
||||
} |
|
||||
.btb-header { } |
|
||||
.rheader { |
|
||||
font-size: large |
|
||||
} |
|
||||
.sheader { |
|
||||
padding-top: 10px; |
|
||||
} |
|
||||
.bibref { |
|
||||
/*padding:3px; */ |
|
||||
/* padding-left:15px; */ |
|
||||
vertical-align:top; |
|
||||
color:white;} |
|
||||
/*.bibtitle { font-weight:bold; }*/ |
|
||||
.bibitem { |
|
||||
text-indent:-35px; |
|
||||
padding-left:35px; |
|
||||
} |
|
||||
.bibbooktitle { font-style:italic; } |
|
||||
.count { color:gray } |
|
||||
.sheader { font-weight:bold; font-size: large;} |
|
||||
.volume { font-style: italic; } |
|
||||
|
|
||||
body { |
|
||||
background:green; |
|
||||
} |
|
@ -1,15 +1,27 @@ |
|||||
<?PHP |
<?PHP |
||||
|
|
||||
require_once "../vendor/autoload.php"; |
|
||||
|
|
||||
use Monperrus\BibtexBrowser\Bibliography; |
|
||||
|
// have this assume same directory as thing
|
||||
|
$_GET['bib'] = "bibacid-utf8.bib"; |
||||
|
|
||||
|
// first step is to get relative reference correct
|
||||
|
|
||||
$config = array("bib" => "bibacid-utf8.bib", |
|
||||
"all" => 1, |
|
||||
"author" => "", |
|
||||
"academic" => 1 |
|
||||
); |
|
||||
|
require_once "../src/bibtexbrowser.php"; |
||||
|
|
||||
$browser = new Monperrus\BibtexBrowser\Bibliography($config); |
|
||||
$browser->print(); |
|
||||
|
|
||||
|
//require_once "../vendor/autoload.php";
|
||||
|
|
||||
|
// use Monperrus\BibtexBrowser\Bibliography;
|
||||
|
|
||||
|
|
||||
|
|
||||
|
// $config = array("bib" => "bibacid-utf8.bib",
|
||||
|
// "all" => 1,
|
||||
|
// "author" => "",
|
||||
|
// "academic" => 1
|
||||
|
// );
|
||||
|
|
||||
|
// $_GET['menu']=1;
|
||||
|
// $browser = new Monperrus\BibtexBrowser\Bibliography($config);
|
||||
|
// $browser->print();
|
||||
|
//s($_SERVER);
|
@ -0,0 +1,231 @@ |
|||||
|
|
||||
|
|
||||
|
@string{foo="Foo"} |
||||
|
@string{bar=foo#" Bar"} |
||||
|
|
||||
|
|
||||
|
%% test the home page feature |
||||
|
@string{hp_J.Abounader="http://www.google.com"} |
||||
|
|
||||
|
@inproceedings{classical, |
||||
|
author = {J. Abounader and D. Tooj}, |
||||
|
title = bar, |
||||
|
institution = {Queen's University, Kingston, ON.}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
|
||||
|
%% testing the abstract |
||||
|
@inproceedings{with_abstract, |
||||
|
author = {J. Abounader and D. Tooj}, |
||||
|
title = {This is with abstract}, |
||||
|
institution = {Queen's University, Kingston, ON.}, |
||||
|
year = {1997}, |
||||
|
abstract = {This is an abstract |
||||
|
on several lines} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
%% using double quotes |
||||
|
%% also Took test the advanced search |
||||
|
@TECHREPORT{dquotes, |
||||
|
author = "J. Abounader and Tooj, D.", |
||||
|
title = "using double quotes ", |
||||
|
institution = "Queen's University, Kingston, ON.", |
||||
|
year = "1997" |
||||
|
} |
||||
|
|
||||
|
|
||||
|
%% using single value (year) |
||||
|
@TECHREPORT{singlevalue, |
||||
|
author = {The }, |
||||
|
title = {The year}, |
||||
|
institution = {Queen's University, Kingston, ON.}, |
||||
|
year = 1997 |
||||
|
} |
||||
|
|
||||
|
|
||||
|
%% no new line |
||||
|
@TECHREPORT{Abounader1997e, author = {J. Abounader and D. Lamb}, title = "using double quotes", institution = {Queen's University, Kingston, ON.}, year = 1997 } |
||||
|
|
||||
|
|
||||
|
|
||||
|
%% intersting: bibtex does not allow \} in brackets enclosed entries and \" in quotes enclosed entries |
||||
|
|
||||
|
%% escaped quotes |
||||
|
@TECHREPORT{notallowed1, |
||||
|
author = {J. Abounader and D. Lamb}, |
||||
|
title = "escaped \"quotes\"", |
||||
|
institution = {Queen's University, Kingston, ON.}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
|
||||
|
%% escaped braces |
||||
|
@TECHREPORT{notallowed2, |
||||
|
author = {J. Abounader \} and D. Lamb}, |
||||
|
title = "escaped braces", |
||||
|
institution = {Queen's University, Kingston, ON.}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
|
||||
|
@article{testsearch1, |
||||
|
author = {Jacob G{\"o}del}, |
||||
|
title = {using Banach Space}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
@article{testsearch2, |
||||
|
author = {Jacob {G}{\"{o}}del}, |
||||
|
title = {using banach space}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
@article{testsearch3, |
||||
|
author = {Jacob {G\"{o}del}}, |
||||
|
title = {using {Banach} Space}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
@article{testsearch4, |
||||
|
author = {Jacob Gödel}, |
||||
|
title = {using {B}anach Space}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
@article{testsearch5, |
||||
|
author = {Jacob Gödel}, |
||||
|
title = {using {Banach Space}}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
%% bug from Jakob Kellner |
||||
|
%% copied from ams.org |
||||
|
@article {MR1841330, |
||||
|
AUTHOR = {Lejay, Antoine}, |
||||
|
TITLE = {Homogenization of divergence-form operators with lower-order |
||||
|
terms in random media}, |
||||
|
JOURNAL = {Probab. Theory Related Fields}, |
||||
|
FJOURNAL = {Probability Theory and Related Fields}, |
||||
|
VOLUME = {120}, |
||||
|
YEAR = {2001}, |
||||
|
NUMBER = {2}, |
||||
|
PAGES = {255--276}, |
||||
|
ISSN = {0178-8051}, |
||||
|
CODEN = {PTRFEU}, |
||||
|
MRCLASS = {35B27 (31C25 35R60 60H30 60J60)}, |
||||
|
MRNUMBER = {MR1841330 (2002g:35023)}, |
||||
|
MRREVIEWER = {Jean-Fran{\c{c}}ois Clouet}, |
||||
|
DOI = {10.1007/PL00008783}, |
||||
|
URL = {http://dx.doi.org/10.1007/PL00008783}, |
||||
|
} |
||||
|
|
||||
|
@article{serge, |
||||
|
author = "Serge Bug", |
||||
|
title = "curly {braces} in quote", |
||||
|
year = 2010 |
||||
|
} |
||||
|
|
||||
|
@article{cediltest, |
||||
|
author = "Serge Bug", |
||||
|
title = "\ccurly \c{c}urly {\c{c}}urly ", |
||||
|
year = 2010 |
||||
|
} |
||||
|
|
||||
|
|
||||
|
%%%%% now testing the string concatenation |
||||
|
@string{str1="toto"} |
||||
|
@string{str2="titi"} |
||||
|
|
||||
|
@book{stgringconcat:test1, |
||||
|
author = {J. Abounader and D. Lamb}, |
||||
|
title = str1#str2, |
||||
|
institution = {Queen's University, Kingston, ON.}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
|
||||
|
% with space |
||||
|
@bookchapter{stgringconcat:test2, |
||||
|
author = {J. Abounader and D. Lamb}, |
||||
|
title = str1 # str2, |
||||
|
institution = {Queen's University, Kingston, ON.}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
|
||||
|
% with another value |
||||
|
@inbook{stgringconcat:test3, |
||||
|
author = {J. Abounader and D. Lamb}, |
||||
|
title = str1 # {3344}, |
||||
|
institution = {Queen's University, Kingston, ON.}, |
||||
|
year = {1997} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
%% Saturday, October 09 2010 |
||||
|
%% taken from http://en.wikipedia.org/wiki/BibTeX |
||||
|
@PROCEEDINGS {conference:06, |
||||
|
editor = {First Editor and Second Editor}, |
||||
|
title = {Proceedings of the Xth Conference on XYZ}, |
||||
|
booktitle = {Proceedings of the Xth Conference on XYZ}, |
||||
|
year = {2006}, |
||||
|
month = oct, |
||||
|
} |
||||
|
|
||||
|
@INPROCEEDINGS {author:06, |
||||
|
title = {Some publication title}, |
||||
|
author = {First Author and Second Author}, |
||||
|
crossref = {conference:06}, |
||||
|
pages = {330?331}, |
||||
|
} |
||||
|
|
||||
|
|
||||
|
%% Thursday, October 28 2010 |
||||
|
%% two test cases for special key |
||||
|
@INPROCEEDINGS {author+06, |
||||
|
title = {Some publication title}, |
||||
|
author = {First Author and Second Author}, |
||||
|
year = {2011}, |
||||
|
} |
||||
|
|
||||
|
@INPROCEEDINGS { author06 , |
||||
|
title = {Some publication title}, |
||||
|
author = {First Author and Second Author}, |
||||
|
year = {2011}, |
||||
|
} |
||||
|
|
||||
|
%% testing the accented i and j |
||||
|
@INPROCEEDINGS {paper000, |
||||
|
title = {Some publication title}, |
||||
|
author = {F\`\irst A\`{\i}thor and S{\`\i}cond Author\`\I}, |
||||
|
year = {2011}, |
||||
|
} |
||||
|
|
||||
|
%% bug reported by Mark Hereld |
||||
|
@misc{mark, |
||||
|
title = {Bug in Urls}, |
||||
|
author = {Mark Hereld}, |
||||
|
howpublished = {\url{http://foo.com/under_score.html}}, |
||||
|
year = {2011}, |
||||
|
} |
||||
|
|
||||
|
%% handling of percentage |
||||
|
@misc{mark, |
||||
|
title = {Percentage \%}, |
||||
|
abstract = {Percentage \%}, |
||||
|
author = {MM}, |
||||
|
year = {2015}, |
||||
|
} |
||||
|
|
||||
|
% bug https://github.com/monperrus/bibtexbrowser/issues/40 |
||||
|
@Article{Baldwin2014Quantum, |
||||
|
Doi = {10.1103/PhysRevA.90.012110}, |
||||
|
Url = {http://link.aps.org/doi/10.1103/PhysRevA.90.012110} |
||||
|
} |
||||
|
|
||||
|
@article{croatiantest, |
||||
|
author = "Strabi{\'{c}} Strabi\'{c}", |
||||
|
title = "Fancy accents bug", |
||||
|
year = 2015 |
||||
|
} |
||||
|
|
||||
|
@article{kjsdf 8, |
||||
|
title = "Entry with + in the key", |
||||
|
author = "Foo Bar", |
||||
|
year = 2017 |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue