Published
Edited
Jul 27, 2020
Importers
5 stars
Insert cell
Insert cell
bibtex = FileAttachment("taser-report@3.json")
Insert cell
md`## 5. Creating in-page links

Great! You're all set. To create a link to the source use a Markdown tag with the first four letters of the author and the year like this: [Amnesty International Report](#Amne18).
`
Insert cell
Insert cell
Insert cell
taserBibliography = {
let bib = md`${bibliography.format('bibliography', {
format: 'text',
template: 'md',
prepend() {
return `* `;
}
})}`;
bib.querySelectorAll('li a:first-child').forEach(link => {
link.setAttribute('name', link.hash.substr(1));
link.removeAttribute('href');
});
return bib;
}
Insert cell
Insert cell
bibtexJson = bibtex.json()
Insert cell
bibliography = new Cite(bibtexJson)
Insert cell
Cite = {
const Cite = await require('https://bundle.run/citation-js@0.5.0-alpha.5');
Cite.plugins.config.get('@csl').templates.add('md', csl);
return Cite;
}
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more