Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert boilerplate template to use Quarto #11

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/publish-proposal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
push:
branches: [main, master]

name: publish-proposal

jobs:
render-proposal:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
Aariq marked this conversation as resolved.
Show resolved Hide resolved
- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true

- name: Render and publish to GitHub Pages
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
path: "isc-proposal.Qmd"
20 changes: 0 additions & 20 deletions .push_gh_pages.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# isc-proposal
[![Build Status](https://travis-ci.org/stephlocke/isc-proposal.svg?branch=master)](https://travis-ci.org/stephlocke/isc-proposal)
[![build-status](https://github.com/your-user-name/your-repo-name/actions/workflows/publish-proposal.yaml/badge.svg)](https://github.com/your-user-name/your-repo-name/actions/workflows/publish-proposal.yaml)

This repository is a boilerplate repository that helps you prepare your proposal for the [R Consortium](https://www.r-consortium.org).

Expand Down Expand Up @@ -35,25 +35,23 @@ Here we detail useful guidance notes on making proposals to the ISC but you shou
- Proposals should be submitted through this Google form: https://forms.gle/Cuk7pKHabXg9viXWA

## Making your proposal

This is a boilerplate repository that you will need to fork, title appropriately and start filling in.

- Use the github [fork command](https://github.com/stephlocke/isc-proposal#fork-destination-box)
- Go to the repository settings and change the name to reflect your proposal
- Create a new Rstudio project from version control and use the git URL for the repo
- Write an overview of the proposal instead of this boilerplate for the README
- Start completing the relevant Rmd pages of the proposal
- Use `ghgenerate.R` to build the document
- Regularly commit and push the changes to github
- Solicit feedback and contributions from others
- Use the "Use this template" button on GitHub
- Create a new repository with a name to reflect your proposal
- Create a new Rstudio project from version control and use the git URL for the repo
- Write an overview of the proposal instead of this boilerplate for the README
- Start completing the relevant Rmd pages of the proposal
- Render `isc-proposal.Qmd` to build the document locally
- Regularly commit and push the changes to github
- Solicit feedback and contributions from others

### Automatically generate your proposal
You can configure this to produce the needed documents and publish them to the github.io for browsing and posterity. This assumes a reasonable amount of comfort with using Travis-CI but if you're not, please check out my [post on auto-deploying documents](http://itsalocke.com/automated-documentation-hosting-on-github-via-travis-ci/) for background.

- Turn on [Travis-CI](https://travis-ci.org) for the repository
- Add an environment variable called GH_TOKEN to the travis environment, set the value to an OAuth key generated by github to allow "public repo" privileges only
- Amend the `.push_gh_pages.sh` and `ghgenerate.R` with the details of your repository and preferred commit details
- Use the gh-pages branch to host your proposal online and to retrieve the HTML or PDF variants for emailing
This repository comes with a GitHub actions setup to automatically render your proposal to HTML and PDF formats. To take advantage of it, you must publish the proposal to GitHub pages interactively the first time.

From the command line, run `quarto publish gh-pages isc-proposal.Qmd`. After this, the GitHub action should run every time you push a commit to the main branch. Your rendered proposal can then be viewed at https://your-user-name.github.io/your-repo-name/

## License
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">ISC Boilerplate</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/stephlocke" property="cc:attributionName" rel="cc:attributionURL">Stephanie Locke</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.<br />Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="https://github.com/RConsortium/isc-proposal" rel="dct:source">https://github.com/RConsortium/isc-proposal</a>.
69 changes: 69 additions & 0 deletions _extensions/andrewheiss/hikmah-manuscript/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
title: Hikma Manuscript
author: Andrew Heiss
version: 0.0.1
contributes:
formats:
common:
date-format: full
docx:
reference-doc: "styles/reference.docx"
knitr:
opts_chunk:
dev: "png"
dev-args:
- "cairo-png"
dpi: 300
out.width: "80%"
odt:
template: "templates/odt-manuscript.odt"
reference-doc: "styles/reference.odt"
knitr:
opts_chunk:
dev: "png"
dev-args:
- "cairo-png"
dpi: 300
out.width: "80%"
pdf:
documentclass: article
papersize: letter
fontsize: 12pt
linestretch: 2

# Template pieces
template-partials:
- "partials/title.tex"
- "partials/before-body.tex"
include-in-header:
- "include-in-header.tex"

# Document styling
geometry:
- top=1in
- bottom=1in
- left=1in
- right=1in

# Citations and links
colorlinks: true
linkcolor: DarkSlateBlue
urlcolor: DarkSlateBlue
citecolor: DarkSlateBlue
link-citations: true

biblio-title: "References"
biblio-config: false # Don't use the default template's biblatex commands
cite-method: biblatex
biblatex-chicago: false # Custom flag for enabling biblatex-chicago
biblio-style: apa
biblatexoptions:
- backend=biber

# The titlesec package provides its own mechanism for dealing with
# inline/block headings, so we need to disable pandoc's support for it
# (see https://stackoverflow.com/q/42916124/120898)
block-headings: false
# Indent paragraphs instead of adding space between them
indent: true
html:
theme: styles/pretty.scss
101 changes: 101 additions & 0 deletions _extensions/andrewheiss/hikmah-manuscript/include-in-header.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
% -----------------------
% CUSTOM PREAMBLE STUFF
% -----------------------

% -----------------
% Typography tweaks
% -----------------
% Indent size
\setlength{\parindent}{0.5in}
\setlength{\leftmargin}{0.5in}

% Fix widows and orphans
\usepackage[all,defaultlines=2]{nowidow}

% List things
\usepackage{enumitem}
% Same document-level indentation for ordered and ordered lists
\setlist[1]{labelindent=\parindent}
\setlist[itemize]{leftmargin=*}
\setlist[enumerate]{leftmargin=*}

% Wrap definition list terms
% https://tex.stackexchange.com/a/9763/11851
\setlist[description]{style=unboxed}


% For better TOCs
\usepackage{tocloft}

% Remove left margin in lists inside longtables
% https://tex.stackexchange.com/a/378190/11851
\AtBeginEnvironment{longtable}{\setlist[itemize]{nosep, wide=0pt, leftmargin=*, before=\vspace*{-\baselineskip}, after=\vspace*{-\baselineskip}}}

% For fancy ORCID links
\usepackage{orcidlink}

% Indent all first paragraphs because APA wants that
\usepackage{indentfirst}


% -----------------
% Title block stuff
% -----------------

% Abstract
\usepackage{abstract}
\renewcommand{\abstractnamefont}{\normalfont\normalsize\bfseries}
\renewcommand{\abstracttextfont}{\normalsize}
\setlength{\absleftindent}{\parindent}
\setlength{\absrightindent}{\parindent}


% Keywords
\providecommand{\keywords}[1]{\textbf{\textit{Keywords---}}#1}

% Title
\usepackage{titling}
\setlength{\droptitle}{2\baselineskip}
\pretitle{\begin{center}\normalfont\normalsize\bfseries}
\posttitle{\par\end{center}\vspace{2\baselineskip}}


% ------------------
% Section headings
% ------------------
\usepackage{titlesec}
\titleformat*{\section}{\center\normalsize\bfseries}
\titleformat*{\subsection}{\normalsize\bfseries}
\titleformat*{\subsubsection}{\normalsize\bfseries\itshape}
\titleformat{\paragraph}[runin]{\bfseries}{\theparagraph.}{3pt}{\space}[.]
\titleformat{\subparagraph}[runin]{\bfseries\itshape}{\thesubparagraph.}{3pt}{\space}[.]

% \titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}
% Starred version removes indentation in following paragraph
\titlespacing*{\section}{0em}{2em}{0em}
\titlespacing*{\subsection}{0em}{1em}{0em}
\titlespacing*{\subsubsection}{0em}{0em}{0em}
\titlespacing*{\paragraph}{\parindent}{1ex}{1em}
\titlespacing*{\subparagraph}{\parindent}{1ex}{1em}


% -----------
% Footnotes
% -----------
% NB: footmisc has to come after biblatex because of conflicts
\usepackage[bottom]{footmisc}
\renewcommand*{\footnotelayout}{\footnotesize}

\addtolength{\skip\footins}{12pt} % vertical space between rule and main text
\setlength{\footnotesep}{16pt} % vertical space between footnotes


% ----------
% Captions
% ----------
\usepackage[font=normalsize]{caption}


% ---------------------------
% END CUSTOM PREAMBLE STUFF
% ---------------------------
106 changes: 106 additions & 0 deletions _extensions/andrewheiss/hikmah-manuscript/partials/before-body.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
% ---------------
% TITLE SECTION
% ---------------

\begin{titlepage}
\center

% Don't include a newpage before \maketitle
{\let\newpage\relax\maketitle}

% Needs to come after \maketitle
\thispagestyle{title}

\vspace{0.25in}

$if(word-count)$
{\center Word count: $word-count$}
$endif$

\vspace{0.5in}

\begin{center}

\textbf{Author note}

$for(by-author)$
\raggedright\setlength{\parindent}{0.5in}$it.name.literal$$if(it.orcid)$,~\orcidlink{$it.orcid$}~\url{https://orcid.org/$it.orcid$}$endif$$if(it.metadata.title)$, $it.metadata.title$$if(it.affiliations)$, $for(it.affiliations)$$if(it.department)$$it.department$, $endif$$it.name$$sep$; $endfor$ $endif$$endif$

$endfor$

\end{center}

$if(correspondence-prefix)$
\begin{center}

\textbf{Correspondence}

$for(by-author)$
$if(it.attributes.corresponding)$
\par\raggedright\setlength{\parindent}{0.5in}$correspondence-prefix$~$it.name.literal$$if(it.email)$ (\href{mailto:$it.email$}{$it.email$})$endif$$if(it.affiliations)$, $for(it.affiliations)$$if(it.department)$$it.department$, $endif$$it.name$, $if(it.address)$$it.address$, $endif$$if(it.city)$$it.city$, $endif$$if(it.region)$$it.region$ $endif$$if(it.postal-code)$$it.postal-code$$endif$$if(it.country)$, $it.country$$endif$$sep$; $endfor$ $endif$
$endif$
$endfor$

\end{center}
$endif$

$if(additional-info)$
\begin{center}

\textbf{Additional information}

\par\raggedright\setlength{\parindent}{0.5in}$additional-info$

\end{center}
$endif$

$if(thanks)$
\begin{center}

\textbf{Acknowledgments}

\par\raggedright\setlength{\parindent}{0.5in}$thanks$

\end{center}
$endif$

\vfill % Fill the rest of the page with whitespace

\end{titlepage}

\doublespacing

$if(abstract)$
\begin{abstract}
\noindent $abstract$
\end{abstract}

\vspace{\baselineskip}

$if(keywords)$\indent \keywords{%
$for(keywords)$$keywords$$sep$, $endfor$%
}$endif$

\newpage
$endif$

\begin{center}
\singlespacing
\textbf{$title$$if(subtitle)$:\\$subtitle$$endif$}
\end{center}

$if(epigraph)$
$for(epigraph)$
$if(epigraph.source)$
\epigraph{$epigraph.text$}{---$epigraph.source$}
$else$
\epigraph{$epigraph.text$}
$endif$
$endfor$
$endif$

% -------------------
% END TITLE SECTION
% -------------------


Loading