Chapter 8 Creating On The Line

TO COME

8.1 Publishing with Bookdown on GitHub Pages

by Jack Dougherty

TO DO: Include a longer introduction on why it matters, and then how we publish with Bookdown on GitHub Pages with custom domain Note: See also way to include hypothesis commenting and other open review tools at: https://benmarwick.github.io/bookdown-ort/

GitHub and Bookdown reminders

  • GitHub Pages set to publish from master/docs
  • Bookdown settings: build all book formats into the docs folder
  • GitHub Pages custom domain setting adds CNAME file to docs folder; do not delete
  • Manually move 404.html into ‘docs’ folder, since not auto-built; do not delete
  • CHECK if google-analytics-otl.html needs to be manually placed in docs folder
  • Manually add X.X-footer.Rmd to end of each chapter
  • For final PDF and eBook build, remove cover image and footers

Markdown/bookdown reminders

Hint: View syntax in the raw file on GitHub: https://github.com/ontheline/otl-book

Use brackets and parentheses for an embedded link

Use parentheses only for a non-embedded link (http://example.com)

Similarly, display URL with angle brackets: http://example.com

If necessary, use HTML to create link that opens in a new page

For cross-reference links, refer to default ID name of chapter or section header: ## Contributors = #contributors ## A Longer Header = #a-longer-header

To simplify longer chapter titles, add short hashtag in curly brackets as ID: # Defining City and Suburban Lines {#defining}

Embed a cross-reference link to chapter or section header, with brackets and parenthesis:

by Jack Dougherty

OR

see Chapter One: Defining City and Suburban Lines

Hide numbers from appearing in section headers with curly brackets around hyphen:

`## Outline of the Book {-}``

For an em-dash, use three hyphens—like this—rather than two hyphens.

Block quote:

“I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him.”

— Mark Twain

A text-only footnote.37

BibText footnote with semi-colons to separate cites:38

Markdown caret-footnote, which can accept multiple references with complex punctuation.39

Subheadings need four hashtags and no-number symbol

Using three hashtags makes the subheader appear in the TOC because I have not found way to control toc_depth in web output. Use the no-number symbol to prevent automatic number of subheaders.

Insert image using Markdown syntax:

Using markdown: auto-number does not appear in web, but appears in pdf, text with italics, no center-alignment on web, but centered in PDF, with source link, with caret-footnote.

Using markdown: auto-number does not appear in web, but appears in pdf, text with italics, no center-alignment on web, but centered in PDF, with source link, with caret-footnote.40

** Use 5 hashtags for digital image headers **, and imperative verbs to hint interactive use

Explore the Chart: embedded HTML iframe

Write caption immediately afterwards in body text.

Scroll the map: embedded HTML iframe

Scroll down the narrative (or click and use arrow keys) to see how Hartford County, Connecticut divided into 29 separate towns from the early 1600s to the late 1800s. Boundaries shown here are not exact, but approximated from the best available digital sources: UConn Libraries MAGIC historical maps, Atlas of Historical County Boundaries at Newberry Library, and the Connecticut State Register and Manual. See sources, known issues, and the code by Ilyana Ilyankou and Jack Dougherty, Trinity College at https://github.com/ontheline/otl-town-borders/. Insert short refs/links and footnotes in caption when possible.

Play YouTube video: embedded HTML iframe from secure https

Write caption immediately afterwards in body text.

Consider using more complex R codes for final PDF production

Image inserted with R code:

Using R code: auto-number appears in web and pdf, centered, resized at 90 percent, but not sure how to format footnotes or italics

Image 8.1: Using R code: auto-number appears in web and pdf, centered, resized at 90 percent, but not sure how to format footnotes or italics

Insert URL with R code:

Image 8.2: URL inserted using R code: centered, resized at 90 percent, not sure how to format footnotes or italics

To do: learn more about R codes https://bookdown.org/yihui/bookdown/web-pages-and-shiny-apps.html

8.2 Video Test

by Jack Dougherty

Play YouTube video: embedded HTML iframe from secure https

Write caption immediately afterwards in body text.

Play CTDA video: embedded HTML iframe from non-secure http

Write caption immediately afterwards in body text.

About this book

On The Line is an open-access, born-digital, book-in-progress by Jack Dougherty and contributors at Trinity College, Hartford CT, USA. This work is copyrighted by the authors and freely distributed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Interational License. Learn about our open-access policy and code repository and how to cite our work.

This book-in-progress was last updated on: 2018-07-17


  1. This is a footnote, with no reference

  2. Hirsch, Making the Second Ghetto; Jackson, Crabgrass Frontier; Tyack, The One Best System.

  3. On this theme, see Jack Dougherty, “Review of ’Connecticut’s Public Schools: A History, 1650-2000’ by Christopher Collier,” Connecticut History 50, no. 1 (2011): 120–22, http://digitalrepository.trincoll.edu/cssp_papers/41. On a different theme, see Jack Dougherty et al., “School Choice in Suburbia: Test Scores, Race, and Housing Markets,” American Journal of Education 115, no. 4 (August 2009): 523–48, http://digitalrepository.trincoll.edu/cssp_papers/1, pp. 33-35

  4. Dougherty et al.,