<head> <meta charset="utf-8"> <title>DocNotes</title> <style> body { font-family: Helvetica, Arial, sans-serif; } th, td { text-align: left; vertical-align: top; padding: 2px 5px; } li { margin-bottom: 1em; } .citation { color: green; } </style> </head> <body> <? if ($collection = $_GET['collection']): ?> <? $docs = $mendeley->http('library/collections/' . urlencode($collection)); $items = array(); foreach ($docs['document_ids'] as $id){ $doc = $mendeley->http('library/documents/' . $id); if (!$doc['notes']) continue; $doc['id'] = $id; $items[] = $doc; } $citations = $mendeley->cite($items, 'nlm'); preg_match_all('!<div class="csl-right-inline">(.+?)</div>!s', $citations, $matches); ?> <h1>DocNotes</h1> <ol id="notes">