Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
update bookdown; tweak csl and bib
Browse files Browse the repository at this point in the history
  • Loading branch information
nhejazi committed Jul 6, 2023
1 parent af589a1 commit b82ef9b
Show file tree
Hide file tree
Showing 4 changed files with 396 additions and 68 deletions.
4 changes: 2 additions & 2 deletions index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ date: "updated: `r format(Sys.time(), '%B %d, %Y')`"
documentclass: book
site: bookdown::bookdown_site
bibliography: [book.bib, packages.bib]
biblio-style: apalike
csl: jrss.csl
link-citations: yes
fontsize: '12pt, krantz2'
monofontoptions: "Scale=0.7"
link-citations: yes
colorlinks: yes
lot: yes
lof: yes
Expand Down
305 changes: 305 additions & 0 deletions jrss.csl
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="en-GB">
<info>
<title>Journal of the Royal Statistical Society</title>
<title-short>JRSS</title-short>
<id>http://www.zotero.org/styles/journal-of-the-royal-statistical-society</id>
<link href="http://www.zotero.org/styles/journal-of-the-royal-statistical-society" rel="self"/>
<link href="http://www.zotero.org/styles/sage-harvard" rel="template"/>
<link href="https://rss.onlinelibrary.wiley.com/hub/journal/1467985x/author-guidelines" rel="documentation"/>
<link href="https://wol-prod-cdn.literatumonline.com/pb-assets/hub-assets/rss/Notes_for_Authors_2019-1552404816963.pdf" rel="documentation"/>
<author>
<name>Patrick O'Brien</name>
</author>
<category citation-format="author-date"/>
<category field="math"/>
<issn>0964-1998</issn>
<eissn>1467-985X</eissn>
<updated>2019-08-24T04:25:28+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale xml:lang="en-GB">
<terms>
<term name="editor" form="short">
<single>ed.</single>
<multiple>eds</multiple>
</term>
</terms>
</locale>
<macro name="editor">
<names variable="editor" delimiter=", ">
<label form="short"/>
<name prefix=" " and="text" initialize-with=". "/>
</names>
</macro>
<macro name="proceedings-editor">
<names variable="editor" delimiter=", " prefix="(" suffix=")">
<label form="short" suffix=" "/>
<name and="text" initialize-with="" delimiter=", " sort-separator=" "/>
</names>
</macro>
<macro name="author">
<names variable="author">
<name and="text" delimiter-precedes-last="never" initialize-with=". " name-as-sort-order="all"/>
<label form="short" prefix=" (" suffix=")"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text variable="container-title" font-style="italic"/>
<text macro="title"/>
</substitute>
</names>
</macro>
<macro name="author-count">
<names variable="author">
<name form="count"/>
<substitute>
<names variable="editor"/>
</substitute>
</names>
</macro>
<macro name="author-short">
<names variable="author">
<name form="short" and="text" delimiter=", " delimiter-precedes-last="never" initialize-with=""/>
<et-al font-style="italic"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text variable="container-title" font-style="italic"/>
<text macro="title"/>
</substitute>
</names>
</macro>
<macro name="access">
<choose>
<if variable="DOI">
<text variable="DOI" prefix="DOI: "/>
</if>
<else-if variable="URL">
<text value="Available at: "/>
<text variable="URL"/>
<group prefix=" (" delimiter=" " suffix=")">
<text term="accessed"/>
<date variable="accessed">
<date-part name="day" suffix=" "/>
<date-part name="month" suffix=" "/>
<date-part name="year"/>
</date>
</group>
</else-if>
</choose>
</macro>
<macro name="title">
<choose>
<if type="book">
<text variable="title" font-style="italic" text-case="title"/>
</if>
<else-if type="bill graphic legal_case motion_picture report song thesis" match="any">
<text variable="title" font-style="italic"/>
</else-if>
<else>
<text variable="title"/>
</else>
</choose>
</macro>
<macro name="publisher">
<choose>
<if type="thesis" match="any">
<group delimiter=", ">
<text variable="publisher"/>
<text variable="publisher-place"/>
</group>
</if>
<else-if type="paper-conference" match="any">
<text variable="publisher"/>
</else-if>
<else>
<group delimiter=": ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
</else>
</choose>
</macro>
<macro name="year-date">
<choose>
<if variable="issued">
<date variable="issued">
<date-part name="year"/>
</date>
</if>
<else>
<text term="no date" form="short"/>
</else>
</choose>
</macro>
<macro name="locator">
<choose>
<if type="article-journal">
<text variable="volume" font-weight="bold"/>
<text macro="pages"/>
</if>
</choose>
</macro>
<macro name="published-date">
<choose>
<if type="report" match="any">
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month" form="long"/>
</date>
</if>
</choose>
</macro>
<macro name="genre">
<choose>
<if type="webpage post-weblog" match="none">
<text variable="genre"/>
</if>
</choose>
</macro>
<macro name="pages">
<choose>
<if type="chapter" match="any">
<group delimiter=" ">
<label variable="page" form="short"/>
<text variable="page"/>
</group>
</if>
<else-if type="article-journal">
<text variable="page" prefix=", "/>
</else-if>
</choose>
</macro>
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short"/>
</group>
</if>
<else>
<text variable="edition" suffix="."/>
</else>
</choose>
</macro>
<macro name="container-details">
<choose>
<if type="chapter post-weblog post" match="any">
<group delimiter=", ">
<group delimiter=" ">
<text term="in" text-case="capitalize-first"/>
<choose>
<if type="chapter">
<text variable="container-title" font-style="italic" text-case="title"/>
</if>
<else>
<text variable="container-title" font-style="italic"/>
</else>
</choose>
<text macro="editor" prefix="(" suffix=")"/>
</group>
<text macro="pages"/>
</group>
</if>
<else-if type="paper-conference" match="any">
<group delimiter=", " prefix="In: ">
<group delimiter=" ">
<choose>
<if variable="container-title">
<text variable="container-title" font-style="italic"/>
</if>
<else>
<text variable="event" font-style="italic"/>
</else>
</choose>
<text macro="proceedings-editor"/>
</group>
<text variable="publisher-place"/>
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month" form="long" suffix=" "/>
<date-part name="year"/>
</date>
<group delimiter=" ">
<label variable="page" form="short"/>
<text variable="page"/>
</group>
</group>
</else-if>
<else-if type="webpage" match="none">
<group delimiter=", ">
<group delimiter=" ">
<text macro="editor"/>
<text variable="container-title" form="short" font-style="italic"/>
</group>
<choose>
<if type="article-newspaper article-magazine" match="any">
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month" form="long"/>
</date>
</if>
</choose>
</group>
</else-if>
</choose>
</macro>
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year">
<sort>
<key macro="author-short"/>
<key macro="year-date"/>
<key variable="title"/>
</sort>
<layout prefix="(" suffix=")" delimiter="; ">
<group delimiter=", ">
<text macro="author-short"/>
<text macro="year-date"/>
</group>
</layout>
</citation>
<bibliography hanging-indent="true" et-al-min="4" et-al-use-first="3">
<sort>
<key macro="author" names-min="1" names-use-first="1"/>
<key macro="author-count" names-min="3" names-use-first="3"/>
<key macro="author" names-min="3" names-use-first="1"/>
<key macro="year-date"/>
<key variable="title"/>
</sort>
<layout suffix=".">
<group delimiter=" ">
<text macro="author"/>
<text macro="year-date" prefix="(" suffix=")"/>
<text macro="title" suffix="."/>
<choose>
<if variable="container-title" match="none">
<text macro="edition"/>
</if>
</choose>
<group delimiter=". ">
<group delimiter=", ">
<text macro="container-details"/>
<text macro="locator"/>
</group>
<choose>
<if variable="container-title" match="any">
<text macro="edition"/>
</if>
</choose>
<group delimiter=", ">
<group delimiter=" ">
<text variable="collection-title"/>
<text variable="collection-number"/>
<text variable="number"/>
</group>
<text macro="genre"/>
<text macro="published-date"/>
</group>
<text macro="publisher"/>
</group>
</group>
<text macro="access" prefix=". "/>
</layout>
</bibliography>
</style>
3 changes: 1 addition & 2 deletions latex_extras/preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
\usepackage[inline]{enumitem}
\usepackage{float}
\usepackage{graphicx}
%\usepackage[round]{natbib}
\usepackage{geometry}
\usepackage{tikz}
\usepackage[english]{babel}
Expand Down Expand Up @@ -97,4 +96,4 @@

\usepackage{framed}
\setlength{\fboxsep}{.8em}
\usepackage{tcolorbox}
\usepackage{tcolorbox}
Loading

0 comments on commit b82ef9b

Please sign in to comment.