4.8 Formatting Commands ↑
4.8.1 Format a Quote Citation
HTML has a handy blockquote element, and Markdown has a convenient syntax for generating these. And of course you can tailor the appearance of blockquotes in any one of hundreds of ways with a little application of CSS.
But it is very common to want to supply a citation following such a blockquote, to identify the original source from which the quotation was taken. Unfortunately, though, there are no dedicated tags for formatting citations like these, and seemingly no wide agreement on what sort of HTML tags should ideally be used to format such a citation.
To address this problem, Notenik is introducing a custom Markdown command that will produce a nice citation line that can be easily styled.
Here is an example illustrating how this command can be used
> As Nietzsche put it, if you have a why to live, you can bear almost any how.
{:quote-from:Yuval Noah Harari|2015|book|Sapiens: A Brief History of Humankind|https://www.ynharari.com|https://www.ynharari.com/book/sapiens-2/}
And here is how this will appear once formatted by Notenik, using Notenik’s default CSS.
As Nietzsche put it, if you have a why to live, you can bear almost any how.
Yuval Noah Harari, 2015, from the book Sapiens: A Brief History of Humankind
And here is the HTML that is generated for the quote-from line:
<p class="quote-from"><a href="https://www.ynharari.com" class="ext-link" target="_blank" rel="noopener">Yuval Noah Harari</a>, 2015, from the book <a href="https://www.ynharari.com/book/sapiens-2/" class="ext-link" target="_blank" rel="noopener"><cite>Sapiens: A Brief History of Humankind</cite></a></p>
As the example illustrates, the quote-from command has six positional parameters that can follow the colon, with pipe characters separating them from each other. The parameters should be specified in the following order.
- Author
- Date of Publication (often just a year, as in the example)
- Work Type, using values from the Work Type field type
- Work Title, excluding any surrounding punctuation or tags
- Author Link, if you wish to specify an absolute or relative URL for the author
- Work Link, if you wish to specify an absolute or relative URL for the work
Any of these parameters may be left blank, if unavailable.
As you can see, Notenik applies the quote-from class to the <p> tag, so that the appearance of the citation line can be easily modified by supplying your own display.css file when you Tailor the Display.
Next: 4.8.2 Format a Byline