Recent Changes - Search:

PITS main list

edit sidebar

Main sidebar



Summary: Markup for <cite>, <q>, and <blockquote> (including cite= attribute)
Created: 2016-09-22 00:29
Status: Open
Category: CoreCandidate
From: HaganFox
Priority: 3
Version: 2.2.91+
OS: n/a

Description: Wiki markup for quoting - support <cite>, <q>, and <blockquote> tags

Per a thread on the mailing list (thread starts here), PmWiki markup for quoting text using the HTML <q> tag could be provided that would ease adding “quotes” around text in a wiki page.

Importantly, quoting text with <q> and <blockquote> has semantic meaning in a web document. The <cite> tag also has a related meaning. In summary,

who or what source is being quoted
<q> and <blockquote>
the quoted text
cite attribute of <q> and <blockquote>
where the text came from (e.g. a URL)

All three tags seem to be widely supported by browsers.

Proposed Markup

'"cite reference"'
HTML <cite> tag - reference to a creative work
{"quoted text"}
HTML <q> tag - inline quotation
["quoted text"]
HTML <blockquote> tag - extended quotation
quote|source (vertical bar)
<q> and <blockquote>s' cite attribute - source document or message for the information quoted

<q> and <cite> Tags

Someone says {"quoted text"} would produce

Someone says <q>quoted text</q>
Someone says {"quoted text|source reference"]@}%% would produce
->%wbox%@@Someone says <q cite="source reference">quoted text</q>@@

%box%[@'"Someone"' says {"quoted text|source reference"}
would produce
<cite>Someone</cite> says <q cite="source reference">quoted text</q>

<blockquote> Tag

Same thing, except ["..."] instead of {"..."}. So

'"Someone"' says ["quoted text|source reference"] would produce

<cite>Someone</cite> says <blockquote cite="source reference">quoted text</blockquote>



Browser Support


HansB, Pm, Dfaure, and HaganFox

HaganFox September 22, 2016, at 12:47 AM


I think I'd prefer this as a recipe (or an addition to an existing recipe) rather than core for now.

I'm concerned a change to core might match code display segments where a single "" represents an empty string.

I also don't know how widely this feature would be used; I suspect most people will still end up writing "This is a quote" rather than ""This is a quote"".

I'm open to be convinced otherwise, however.


I frequently (as in practically on every page) use "" to represent an empty string, for example (:if !equal "{$Variable}" "":) means if $Variable has a value. Please don't change any existing recipes, let alone the core, in a way that would break this markup. -- RandyB September 22, 2016, at 06:00 AM

HansB: My proposed markup, (use of "" left and right of text to be quoted), does not interfere with "" in conditional directives or escaped code blocks. For the record here, I propose, in difference to Hagan's proposal:

{"cite reference"}
HTML <cite> tag - source or author cited (quoted).
""quoted text""
HTML <q> tag - inline quotation.
["block of quoted text"]
HTML <blockquote> tag - extended quotation, can go over several lines.

For adding a cite HTML attribute, I suggest to put the text for the cite source at the beginning, not the end, followed by a vertical pipe character (similar use as in link markup, where the URL target procedes the visible link text).

""source| quoted text""
HTML <q cite"source"> tag - inline quotation.
["source| block of quoted text"]
HTML <blockquote cite="source"> tag - extended quotation, can go over several lines.

I published possible markup definitions as a recipe at Cookbook.Blockquote-Cite-Quote.

Edit - History - Print - Recent Changes - Search
Page last modified on September 24, 2016, at 09:18 AM