mixin githubIconLink(repo) a(href='https://github.com/' + repo, target='_blank', title='Source on GitHub') i.fab.fa-2x.fa-github(title='GitHub') mixin pub(year, title) if attributes.lingbuzz - attributes.url = 'https://lingbuzz.net/lingbuzz/' + attributes.lingbuzz - attributes.oa = true td.icon if attributes.type if attributes.type == 'phd-thesis' i.fa.fa-graduation-cap(title="PhD thesis") else if attributes.type == 'master-thesis' i.fa.fa-graduation-cap(title="Master thesis") else if attributes.type == 'bachelor-thesis' i.fa.fa-graduation-cap(title="Bachelor thesis") else if attributes.type == 'review' i.far.fa-comment(title="Book review") else if attributes.type == 'chapter' i.fa.fa-book-open(title="Book chapter") else - throw 'pub: unknown type' else i.far.fa-file-lines(title="Journal article") td.icon if attributes.oa if attributes.url - var oaurl = attributes.url else if attributes.doi - var oaurl = 'https://doi.org/'+attributes.doi else - throw 'pub: oa set but no doi or url' a.oa(href!=oaurl, target='_blank') i.ai.ai-lg.ai-open-access(title="Open Access") td p if !attributes.authors - attributes.authors = 'Staps, Camil' | !{attributes.authors}. #{year}. | if attributes.url a(href!=attributes.url, target='_blank')!= title else if attributes.publisher && !attributes.pages i!= title else | !{title} | if attributes.journal |. !{attributes.prejournal}#[em!=attributes.journal] if attributes.volume | #{attributes.volume} if attributes.issue | (#{attributes.issue}) else if attributes.booktitle | . In !{attributes.editors} (eds.), #[em!=attributes.booktitle] else if attributes.misc | . #{attributes.misc} if attributes.pages - attributes.pages = attributes.pages.replace('-', '–') if attributes.journal | :!{attributes.pages} else | , !{attributes.pages} | . if attributes.address | #{attributes.address}: if attributes.publisher | #{attributes.publisher}. if attributes.doi | #[span.sc doi]: - var doiurl = 'https://doi.org/'+attributes.doi a(href!=doiurl, target='_blank')!= attributes.doi | . if attributes.errata | (There are #[a(href!=attributes.errata) errata].) mixin review(year, author, title) - attributes.type = 'review' +pub(year, 'Review of: ' + author + ', ' + title)&attributes(attributes)