{"id":2961,"date":"2013-09-03T07:17:41","date_gmt":"2013-09-03T13:17:41","guid":{"rendered":"http:\/\/bililite.com\/blog\/?p=2961"},"modified":"2013-09-03T20:15:17","modified_gmt":"2013-09-04T02:15:17","slug":"using-blockquote","status":"publish","type":"post","link":"https:\/\/bililite.com\/blog\/2013\/09\/03\/using-blockquote\/","title":{"rendered":"Using <code>&lt;blockquote&gt;<\/code>"},"content":{"rendered":"<h3>Typography<\/h3>\r\n<p><a href=\"http:\/\/practicaltypography.com\/block-quotations.html\">Butterick<\/a> has a few rules for block quotations: Reduce the point size and line spacing slightly, and indent the text block be\u00adtween half an inch and a full inch on the left side, and op\u00adtion\u00adal\u00adly the same on the right.<\/p>\r\n<p>Since I'm using both Hebrew and English quotes, I'll indent on both sides. Rather indenting with <code class=\"language-css\" >margin<\/code>, I set the <code class=\"language-css\" >width<\/code> and use <code class=\"language-css\" >margin: auto<\/code> to center it. That way, if the quote ends up wider than the fixed width (see the issues with comparing texts, below), it will remain centered.<p>\r\n<pre><code class=\"language-css\" >blockquote {\r\n  font-size: 92%;\r\n  line-height: $linespacing;\r\n  width: $linewidth - 1in;\r\n  margin: 0 auto;\r\n}<\/code><\/pre>\r\n<p>Note that I'm using <a href=\"http:\/\/sass-lang.com\/\">SCSS<\/a>, so I can use variables and math. I have to repeat the <code class=\"language-css\" >line-height<\/code> since what is inherited is the actual amount of the line height, not the relative amount (I set <code class=\"language-css\" >line-height: 1.35<\/code> on the <code class=\"language-html\" >&lt;body&gt;<\/code> which is 21px, but I want the <code class=\"language-html\" >&lt;blockquote&gt;<\/code> <code class=\"language-css\" >line-height<\/code> to be 1.35 times its own font-size).<\/p>\r\n<!--more-->\r\n\r\n<h3>Attribution<\/h3>\r\n<p>There's been <a href=\"http:\/\/html5doctor.com\/blockquote-q-cite\/\">a lot of argument<\/a> about how mark up the attribution (the souce) of a quote. The original HTML5 documentation said \"Attribution for the quotation, if any, must be placed outside the blockquote element\", which meant ugly markup like:<\/p>\r\n<pre><code class=\"language-html\" >&lt;figure&gt;\r\n    &lt;blockquote&gt;\r\n        &lt;p&gt;Attribution for the quotation, if any, must be placed outside the blockquote element&lt;\/p&gt;  \r\n    &lt;\/blockquote&gt;\r\n    &lt;figcaption&gt;W3C HTML Working Group&lt;\/figcaption&gt;\r\n&lt;\/figure&gt;<\/code><\/pre>\r\n\r\n<p>But the most recent <a href=\"http:\/\/www.w3.org\/html\/wg\/drafts\/html\/master\/grouping-content.html#the-blockquote-element\">HTML5 draft<\/a> (dated 9\/1\/2013) allows \"Attribution for the quotation, may be be placed inside the <code class=\"language-html\" >&lt;blockquote&gt;<\/code> element, but must be inside a <code class=\"language-html\" >&lt;footer&gt;<\/code> element\", or the much more logical (and really, even the <code class=\"language-html\" >&lt;p&gt;<\/code> is optional):<\/p>\r\n<pre><code class=\"language-html\" >&lt;blockquote&gt;\r\n    &lt;p&gt;Attribution for the quotation, if any, must be placed outside the blockquote element&lt;\/p&gt;  \r\n    &lt;footer&gt;W3C HTML Working Group&lt;\/footer&gt;\r\n&lt;\/blockquote&gt;<\/code><\/pre>\r\n\r\n<p>And, since that's the way I've been doing it for the past few months, that will be the way I will continue.<\/p>\r\n\r\n<p>Marking up the attribution uses the ever-useful <code class=\"language-css\" >::before<\/code> pseudoelement to add the <code>&mdash;<\/code>:<\/p>\r\n<pre><code class=\"language-css\" >blockquote footer::before {\r\n  content: '\u2014';\r\n}<\/code><\/pre>\r\n<p>Rather than having it non-semantically in the text itself.<p>\r\n\r\n<h3>Biblical Verses<\/h3>\r\n<p>Marking up poetry seems to have generated <a href=\"http:\/\/www.w3.org\/html\/wg\/wiki\/PoeticSemantics\">a lot of discussion<\/a> back in 2007, but it seems the easiest way was described by <a href=\"http:\/\/www.w3.org\/html\/wg\/wiki\/PoeticSemantics#Ian_Hickson_.285_October_2007.29\">Ian Hickson<\/a>, with <code class=\"language-html\" >&lt;p&gt;<\/code> for the stanzas and <code class=\"language-html\" >&lt;br\/&gt;<\/code> separating the lines. This does not allow for dealing with \"lines\" as elements but will work for my purposes. Thus:<\/p>\r\n<pre><code class=\"language-html demo\" >&lt;blockquote&gt;\r\n  &lt;p&gt;\r\n    &lt;b&gt;1&lt;\/b&gt; Happy are they that are upright in the way  who walk in the law of the LORD.&lt;br\/&gt;\r\n    &lt;b&gt;2&lt;\/b&gt; Happy are they that keep His testimonies  that seek Him with the whole heart.&lt;br\/&gt;\r\n    &lt;b&gt;3&lt;\/b&gt; Yea  they do no unrighteousness; they walk in His ways.&lt;br\/&gt;\r\n    &lt;b&gt;4&lt;\/b&gt; Thou hast ordained Thy precepts  that we should observe them diligently.&lt;br\/&gt;\r\n    &lt;b&gt;5&lt;\/b&gt; Oh that my ways were directed to observe Thy statutes!&lt;br\/&gt;\r\n    &lt;b&gt;6&lt;\/b&gt; Then should I not be ashamed  when I have regard unto all Thy commandments.&lt;br\/&gt;\r\n    &lt;b&gt;7&lt;\/b&gt; I will give thanks unto Thee with uprightness of heart  when I learn Thy righteous ordinances.&lt;br\/&gt;\r\n    &lt;b&gt;8&lt;\/b&gt; I will observe Thy statutes; O forsake me not utterly.\r\n  &lt;\/p&gt;\r\n  &lt;p&gt;\r\n    &lt;b&gt;9&lt;\/b&gt; Wherewithal shall a young man keep his way pure? By taking heed thereto according to Thy word.&lt;br\/&gt;\r\n    &lt;b&gt;10&lt;\/b&gt; With my whole heart have I sought Thee; O let me not err from Thy commandments.&lt;br\/&gt;\r\n    &lt;b&gt;11&lt;\/b&gt; Thy word have I laid up in my heart  that I might not sin against Thee.&lt;br\/&gt;\r\n    &lt;b&gt;12&lt;\/b&gt; Blessed art Thou  O LORD; teach me Thy statutes.&lt;br\/&gt;\r\n    &lt;b&gt;13&lt;\/b&gt; With my lips have I told all the ordinances of Thy mouth.&lt;br\/&gt;\r\n    &lt;b&gt;14&lt;\/b&gt; I have rejoiced in the way of Thy testimonies  as much as in all riches.&lt;br\/&gt;\r\n    &lt;b&gt;15&lt;\/b&gt; I will meditate in Thy precepts  and have respect unto Thy ways.&lt;br\/&gt;\r\n    &lt;b&gt;16&lt;\/b&gt; I will delight myself in Thy statutes; I will not forget Thy word.\r\n  &lt;\/p&gt;\r\n  &lt;footer&gt;Psalms 145&lt;\/footer&gt;\r\n&lt;\/blockquote&gt;<\/code><\/pre>\r\n\r\n<p>This brings up the question of how to mark up the verse numbers. They're not really part of the text, so something like<\/p>\r\n<pre><code class=\"language-html demo\" >&lt;ol&gt;\r\n  &lt;li value=9 &gt;Wherewithal shall a young man keep his way pure? By taking heed thereto according to Thy word.&lt;\/li&gt;\r\n  &lt;li value=10 &gt; With my whole heart have I sought Thee; O let me not err from Thy commandments.&lt;\/li&gt;\r\n&lt;\/ol&gt;<\/code><\/pre>\r\n<p>would work (and would make each line a semantic element), but I can't style list numbers (at least until the <a href=\"http:\/\/www.w3.org\/TR\/css3-lists\/#marker-pseudoelement\">li::marker<\/a> pseudoelement is implemented). Using CSS counters would work, but I don't necessarily want to start with verse 1 and the only way to set the initial count would be a <code class=\"language-html\" >style=\"counter-reset: verse 10\"<\/code> or whatever on each <code class=\"language-html\" >&lt;p&gt;<\/code> and having <code class=\"language-html\" >style<\/code> attributes is just ugly and non-semantic. If browsers implemented the full <a href=\"http:\/\/www.w3.org\/TR\/css3-lists\/\">CSS3 list proposal<\/a>  and allowed <code class=\"language-css\" >counter-reset: verse attr(value)<\/code> or allowed access to the actual <code class=\"language-html\" >&lt;ol&gt;<\/code>\/<code class=\"language-html\" >&lt;li&gt;<\/code> counter with <code class=\"language-css\" >list-item<\/code> then I could use that.<\/p>\r\n<p>But they don't. So I'm including the verse numbers as part of the text, and marking them up as <code class=\"language-html\" >&lt;b&gt;<\/code>, which seems like an appropriate use <a href=\"http:\/\/www.w3.org\/html\/wg\/drafts\/html\/master\/text-level-semantics.html#the-b-element\">according to the standard<\/a>. And it's what <a href=\"http:\/\/mechon-mamre.org\">Mechon Mamre<\/a> uses, which makes it easy to cut and paste.<\/p>\r\n\r\n<h3>Comparing texts<\/h3>\r\n<p>There are lots of times when I'd like to compare two texts side-by-side, aligned with comparable lines. It's the sort of thing a <code class=\"language-html\" >&lt;table&gt;<\/code> would be useful for, but it's not semantically a table. So I use CSS <code class=\"language-css\" >display: table<\/code>:<p>\r\n\r\n<pre><code class=\"language-html demo\" >&lt;div style=\"display: table\"&gt;\r\n  &lt;blockquote style=\"display: table-cell; white-space: nowrap\"&gt;\r\n    &lt;p&gt;\r\n      &lt;b&gt;1&lt;\/b&gt; For the Leader;&lt;br\/&gt;\r\n      [a psalm] of David the servant of the LORD&lt;br\/&gt;\r\n      who spoke unto the LORD the words of this song&lt;br\/&gt;\r\n      in the day that the LORD delivered him&lt;br\/&gt;\r\n      from the hand of all his enemies&lt;br\/&gt;\r\n      and from the hand of Saul.&lt;br\/&gt;\r\n      &lt;b&gt;2&lt;\/b&gt; And he said:&lt;br\/&gt;\r\n      I love thee  O LORD  my strength.&lt;br\/&gt;\r\n      &lt;b&gt;3&lt;\/b&gt; The LORD is my rock  and my fortress  and my deliverer&lt;br\/&gt;\r\n      my God  my rock&lt;br\/&gt;\r\n      in Him I take refuge;&lt;br\/&gt;\r\n      my shield  and my horn of salvation  my high tower.&lt;br\/&gt;\r\n      &lt;br\/&gt;\r\n    &lt;\/p&gt;\r\n    &lt;footer&gt;Psalms 18&lt;\/footer&gt;\r\n  &lt;\/blockquote&gt;\r\n  &lt;blockquote style=\"display: table-cell; white-space: nowrap\"&gt;\r\n    &lt;p&gt;\r\n      &lt;b&gt;1&lt;\/b&gt;&lt;br\/&gt;\r\n      And David&lt;br\/&gt;\r\n      spoke unto the LORD the words of this song&lt;br\/&gt;\r\n      in the day that the LORD delivered him&lt;br\/&gt;\r\n      out of the hand of all his enemies&lt;br\/&gt;\r\n      and out of the hand of Saul.&lt;br\/&gt;\r\n      &lt;b&gt;2&lt;\/b&gt; and he said:&lt;br\/&gt;\r\n      &lt;br\/&gt;\r\n      The LORD is my rock  and my fortress  and my deliverer.&lt;\/br&gt;\r\n      &lt;b&gt;3&lt;\/b&gt; The God who is my rock&lt;br\/&gt;\r\n      in Him I take refuge;&lt;br\/&gt;\r\n      my shield  and my horn of salvation  my high tower&lt;br\/&gt;\r\n      and my refuge; my saviour  Thou savest me from violence.\r\n    &lt;\/p&gt;\r\n    &lt;footer&gt;II Samuel 22&lt;\/footer&gt;\r\n  &lt;\/blockquote&gt;\r\n&lt;\/div&gt;<\/code><\/pre>\r\n\r\n<p>The <code class=\"language-css\" >white-space: nowrap<\/code> makes sure that the lines break where I want them to. This lets me compare and contrast lines, and extends to three columns easily (more than that gets too squashed). Using <code class=\"language-css\" >display: table<\/code> with <code class=\"language-css\" >margin: auto<\/code> as above means that if the blockquotes are too long to fit in the indented space I usually use, the table formatting rules mean that it expands to fit the content and remains centered.","protected":false},"excerpt":{"rendered":"Typography Butterick has a few rules for block quotations: Reduce the point size and line spacing slightly, and indent the text block be\u00adtween half an inch and a full inch on the left side, and op\u00adtion\u00adal\u00adly the same on the right. Since I'm using both Hebrew and English quotes, I'll indent on both sides. Rather [&hellip;]","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/2961"}],"collection":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/comments?post=2961"}],"version-history":[{"count":19,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/2961\/revisions"}],"predecessor-version":[{"id":2989,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/2961\/revisions\/2989"}],"wp:attachment":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/media?parent=2961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/categories?post=2961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/tags?post=2961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}