fix blockquote indentation
This commit is contained in:
parent
aed83c9e3f
commit
e52d96c5e3
@ -32,9 +32,9 @@ styles =
|
|||||||
indent: 72/2
|
indent: 72/2
|
||||||
blockquote:
|
blockquote:
|
||||||
indent: 0
|
indent: 0
|
||||||
|
marginLeft: 72
|
||||||
color: 'red'
|
color: 'red'
|
||||||
font: 'Times-Italic'
|
font: 'Times-Italic'
|
||||||
marginLeft: 72
|
|
||||||
em:
|
em:
|
||||||
font: 'Times-Italic'
|
font: 'Times-Italic'
|
||||||
strong:
|
strong:
|
||||||
@ -81,15 +81,21 @@ class Node
|
|||||||
|
|
||||||
# console.dir tree
|
# console.dir tree
|
||||||
@type = tree.shift()
|
@type = tree.shift()
|
||||||
@attrs = {}
|
# @attrs = {}
|
||||||
|
@style = _.extend({}, styles.default, styles[@type])
|
||||||
|
|
||||||
if typeof tree[0] is 'object' and not Array.isArray tree[0]
|
if typeof tree[0] is 'object' and not Array.isArray tree[0]
|
||||||
@attrs = tree.shift()
|
@attrs = tree.shift()
|
||||||
|
|
||||||
# parse sub nodes
|
# parse sub nodes
|
||||||
@content = while tree.length
|
@content = while tree.length
|
||||||
new Node tree.shift()
|
child = new Node tree.shift()
|
||||||
|
# blockquotes have an embedded paragraph; make sure the inner paragraph doesn't re-define
|
||||||
|
# its indentation
|
||||||
|
child.style?.indent = @style.indent if @style.indent?
|
||||||
|
child
|
||||||
|
|
||||||
|
console.log "content =", @content
|
||||||
# console.log "type =", @type
|
# console.log "type =", @type
|
||||||
|
|
||||||
switch @type
|
switch @type
|
||||||
@ -120,10 +126,6 @@ class Node
|
|||||||
@code = coffee.compile code if code
|
@code = coffee.compile code if code
|
||||||
@height = +@attrs.title or 0
|
@height = +@attrs.title or 0
|
||||||
|
|
||||||
@style = _.extend({}, styles.default, styles[@type])
|
|
||||||
# @style.continued = @attrs.continued if @attrs.continued?
|
|
||||||
# console.log @style
|
|
||||||
|
|
||||||
# sets the styles on the document for this node
|
# sets the styles on the document for this node
|
||||||
setStyle: (doc) ->
|
setStyle: (doc) ->
|
||||||
if @style.font
|
if @style.font
|
||||||
@ -139,7 +141,10 @@ class Node
|
|||||||
|
|
||||||
# renders this node and its subnodes to the document
|
# renders this node and its subnodes to the document
|
||||||
render: (doc, continued = false) ->
|
render: (doc, continued = false) ->
|
||||||
console.log "rendering node: ", @
|
# console.log "rendering node: ", @
|
||||||
|
if @style.marginLeft
|
||||||
|
doc.x += @style.marginLeft
|
||||||
|
|
||||||
switch @type
|
switch @type
|
||||||
when 'hr'
|
when 'hr'
|
||||||
doc.addPage()
|
doc.addPage()
|
||||||
@ -161,10 +166,10 @@ class Node
|
|||||||
|
|
||||||
lastType = @type
|
lastType = @type
|
||||||
|
|
||||||
if @style.marginTop
|
if @style.marginBottom
|
||||||
doc.y += @style.marginTop
|
doc.y += @style.marginBottom
|
||||||
# if @style.marginLeft
|
if @style.marginLeft
|
||||||
# doc.x += @style.marginLeft
|
doc.x -= @style.marginLeft
|
||||||
|
|
||||||
# reads and renders a markdown/literate coffeescript file to the document
|
# reads and renders a markdown/literate coffeescript file to the document
|
||||||
render = (doc, filename) ->
|
render = (doc, filename) ->
|
||||||
|
@ -4,7 +4,15 @@ course: English 624
|
|||||||
date: 12 February 2012
|
date: 12 February 2012
|
||||||
title: Toward a Recovery of Nineteenth Century Farming Handbooks
|
title: Toward a Recovery of Nineteenth Century Farming Handbooks
|
||||||
|
|
||||||
While researching texts like *Harry Potter* and *Curious George* written about **nineteenth century farming**, I found a few authors who published books about the literature of nineteenth century farming, particularly agricultural journals, newspapers, pamphlets, and brochures. These authors often placed the farming literature they were studying into an historical context by discussing the important events in agriculture of the year in which the literature was published (see Demaree, for example). However, while these authors discuss journals, newspapers, pamphlets, and brochures, I could not find much discussion about another important source of farming knowledge: farming handbooks. My goal in this paper is to bring this source into the agricultural literature discussion by connecting three agricultural handbooks from the nineteenth century with nineteenth century agricultural history.
|
While researching texts like *Harry Potter* and *Curious George* written about **nineteenth century farming**, I found a few "reliable" authors who published books about the literature of nineteenth century farming, particularly agricultural journals, newspapers, pamphlets, and brochures. These authors often placed the farming literature they were studying into an historical context by discussing the important events in agriculture of the year in which the literature was published (see Demaree, for example). However, while these authors discuss journals, newspapers, pamphlets, and brochures, I could not find much discussion about another important source of farming knowledge: farming handbooks. My goal in this paper is to bring this source into the agricultural literature discussion by connecting three agricultural handbooks from the nineteenth century with nineteenth century agricultural history.
|
||||||
|
|
||||||
|
# Heading
|
||||||
|
|
||||||
|
## Subheading
|
||||||
|
|
||||||
|
### Sub-sub heading
|
||||||
|
|
||||||
|
#### Sub-sub-sub heading
|
||||||
|
|
||||||
To achieve this goal, I have organized my paper into four main sections, two of which have sub-sections. In the first section, I provide an account of three important events in nineteenth century agricultural history: population and technological changes, the distribution of scientific new knowledge, and farming's influence on education. In the second section, I discuss three nineteenth century farming handbooks in connection with the important events described in the first section. I end my paper with a third section that offers research questions that could be answered in future versions of this paper and conclude with a fourth section that discusses the importance of expanding this particular project. I also include an appendix after the Works Cited that contains images of the three handbooks I examined. Before I can begin the examination of the three handbooks, however, I need to provide an historical context in which the books were written, and it is to this that I now turn.
|
To achieve this goal, I have organized my paper into four main sections, two of which have sub-sections. In the first section, I provide an account of three important events in nineteenth century agricultural history: population and technological changes, the distribution of scientific new knowledge, and farming's influence on education. In the second section, I discuss three nineteenth century farming handbooks in connection with the important events described in the first section. I end my paper with a third section that offers research questions that could be answered in future versions of this paper and conclude with a fourth section that discusses the importance of expanding this particular project. I also include an appendix after the Works Cited that contains images of the three handbooks I examined. Before I can begin the examination of the three handbooks, however, I need to provide an historical context in which the books were written, and it is to this that I now turn.
|
||||||
|
|
||||||
|
5
todo.md
5
todo.md
@ -1,9 +1,8 @@
|
|||||||
# Todo
|
# Todo
|
||||||
|
|
||||||
* new paragraphs
|
|
||||||
* blockquotes
|
|
||||||
* pretty quotes
|
|
||||||
* headings
|
* headings
|
||||||
* works cited page
|
* works cited page
|
||||||
* document name; embed document author
|
* document name; embed document author
|
||||||
|
* pretty quotes?
|
||||||
* citations?
|
* citations?
|
||||||
|
* block quote with immediately following paragraph?
|
Loading…
Reference in New Issue
Block a user