User:Phil wink/sandbox3

Do special scansion characters "monospace" properly?
If scansion is to be implemented as monospaced lines, the ideal characters would be 1) easily typed (or failing that, at least easily copied), 2) visible in both editing and browsing as characters, not code (e.g. not as "&#814"), 3) correctly monospaced, relative to other characters. This test is concerned primarily with #3, but addresses each concern.

Below are rows of characters, 10 each, to check for proper monospacing; and preliminary notes.

CHARACTERS WITH A WIDTH OF 1 1234567890 ////////// ("slash")        U+002F Slash (punctuation) ′′′′′′′′′′ ("prime")        U+2032 Prime (symbol) ″″″″″″″″″″ ("double prime") U+2033 Prime (symbol) ‴‴‴‴‴‴‴‴‴‴ ("triple prime") U+2034 Prime (symbol) \\\\\\\\\\ ("backslash")    U+005C Backslash xxxxxxxxxx ("L.C. x")       U+0078 X ×××××××××× ("mult. sign")   U+00D7 Multiplication sign –––––––––– ("EN dash")      U+2013 Dash |||||||||| ("pipe")         U+007C Vertical bar ¦¦¦¦¦¦¦¦¦¦ ("broken bar")   U+00A6 Vertical bar •••••••••• ("bullet")       U+2022 Bullet (typography) (several similar characters; "bullet" preferred) ˘˘˘˘˘˘˘˘˘˘ ("breve")        U+02D8 Breve ^^^^^^^^^^ ("caret")        U+005E Caret ôôôôôôôôôô ǒǒǒǒǒǒǒǒǒǒ ĀĀĀĀĀĀĀĀĀĀ ŌŌŌŌŌŌŌŌŌŌ ¹¹¹¹¹¹¹¹¹¹ ("superscr. 1")  U+00B9 (Latin-1 Supplement contains only 1, 2, 3.) ²²²²²²²²²² ("superscr. 2")  U+00B2 ³³³³³³³³³³ ("superscr. 3")  U+00B3 CHARACTERS WITH A WIDTH OF 1.2 1234567890 ⋀⋀⋀⋀⋀⋀⋀⋀⋀⋀ ⌣⌣⌣⌣⌣⌣⌣⌣⌣⌣       (but correct in Firefox/Ubuntu) ⊥⊥⊥⊥⊥⊥⊥⊥⊥⊥       (but correct in Firefox/Ubuntu) ⊤⊤⊤⊤⊤⊤⊤⊤⊤⊤       (but correct in Firefox/Ubuntu) ∈∈∈∈∈∈∈∈∈∈       (but correct in Firefox/Ubuntu) ∋∋∋∋∋∋∋∋∋∋       (but correct in Firefox/Ubuntu) ∪∪∪∪∪∪∪∪∪∪ U+222A (but correct in Firefox/Ubuntu) CHARACTERS WITH WIDTHS THAT VARY BY BROWSER 1234567890 ⁴⁴⁴⁴⁴⁴⁴⁴⁴⁴ ("Uni-super-4") Unicode subscripts and superscripts ̆̆̆̆̆̆̆̆̆̆ ("combining breve")       Breve ̮̮̮̮̮̮̮̮̮̮ ("combining breve below") Breve 4444444444 ("wiki-superscripted 4" -- all wiki-superscripted numerals will have this width) ‖‖‖‖‖‖‖‖‖‖ ("double vertical line")  Vertical bar

Background
WikiProject Poetry is reviewing standards for graphically displaying scansion. Our current best practice uses monospaced characters signaled by line-initial spaces, thus:

×  /   × /      × /   [/] ×  /    ×  /   ×     /  [/] There is beyonde the Alps, | a towne of auncient fame

But there is some frustration that these lines cannot be better integrated into regular text (e.g. eliminate the box and shading, and allow indentation), while retaining WYSIWYG editing. Line-initial spaces,, , and all provide some, but not all of the necessary functionality. Of all these markups, seems to come closest to our requirements, so we take that as the "foundation" of the following discussion.

There seem to be 2 paths which can provide the features we would like to see:

Path 1: tweak functionality
will do exactly what is needed IF: multiple line-internal spaces can be made to render literally, just as multiple line-initial spaces currently do. Our full opening code would then be:

Pros: It could be argued that should in principle render line-internal spaces, irrespective of its convenience for scansion: some modernist poems like the first published version of Pound's "In a Station of the Metro" implicitly require wide line-internal spaces, and multiple space characters may be easier to handle editorially than e.g.

 The apparition of these faces  in the crowd : Petals on a wet, black  bough.

Cons: Altering the standard could mess up any number of existing implementations which rely on its current formulation. Also since scansion is its own thing, it is probably appropriate for it to have its own markup.

Path 2: new markup
A new markup can be developed... presumably tagged with or  if these are available. We assume it will be based on, but that of course is up to the developer. The requirements would be:
 * 1) Render as monospaced characters (e.g. Courier) : currently supports as an optional "style" element. In the new scansion markup, this should be the default
 * 2) Render multiple line-initial spaces literally : currently supports
 * 3) Render multiple line-internal spaces literally : currently does not support
 * 4) Render single line-breaks literally : currently supports
 * 5) Render some possibly-reserved characters literally (these include "|", "/", "\", "[]", "") : currently supports
 * 6) Render markup (e.g. ) as markup, not literally : currently supports
 * 7) Allow the application of a left margin : currently supports as an optional "style" element. In the new scansion markup, there might be a default left margin (of, say, 2 em), but it should also be adjustable using "style".


 * (Text citations)

Resource suggestions

 * (post copied from Village pump discussion.)

Phil wink, please check the Wikimedia developers' mailing list, the mailing list for discussion of wikitext markup, and the tech request tracker -- you might get more discussion and interest regarding this proposal if you use one of those media to discuss this proposal with developers. You can also get developer access to suggest changes directly via the Git source control system. Best wishes. Sumana Harihareswara, Wikimedia Foundation Engineering Community Manager 08:00, 14 May 2012 (UTC)

Monospace
 This is a test for font-family:courier,monospace ... breve ⏑ ... brevis in longo ⏒ ... biceps ⏔  This is a test for font-family:monospace,courier ... breve ⏑ ... brevis in longo ⏒ ... biceps ⏔

Monospace for WP:CGR
 FONT-FAMILY:MONOSPACE (depending upon user settings, this is very likely to be identical to one of the the families below) 1234567890 uuuuuuuuuu ∪∪∪∪∪∪∪∪∪∪ ⏑⏑⏑⏑⏑⏑⏑⏑⏑⏑  ⏔⏔⏔⏔⏔ (5× ) uu  uu  uu  uu  uu (5× markup biceps)  FONT-FAMILY:CONSOLAS 1234567890 uuuuuuuuuu ∪∪∪∪∪∪∪∪∪∪ ⏑⏑⏑⏑⏑⏑⏑⏑⏑⏑  ⏔⏔⏔⏔⏔ (5× ) uu  uu  uu  uu  uu (5× markup biceps)  FONT-FAMILY:COURIER 1234567890 uuuuuuuuuu ∪∪∪∪∪∪∪∪∪∪ ⏑⏑⏑⏑⏑⏑⏑⏑⏑⏑  ⏔⏔⏔⏔⏔ (5× ) uu  uu  uu  uu  uu (5× markup biceps)

Styles
Left-margin text.  TEST:  : ×   ×   /   ×   ×    /    /×  ×   /  If the scansion lines up, POEM is fixed. Left-margin text.  TEST:  : ×   ×   /   ×   ×    /    /×  ×   / If the scansion lines up, POEM is fixed. Left-margin text.  TEST:  : ×   ×   /   ×   ×    /    /×  ×   / If the scansion lines up, POEM is fixed. Left-margin text.  TEST:  : ×   ×   /   ×   ×    /     /    ×   ×   / If the scansion lines up, BLOCKQUOTE is fixed. Left-margin text.  TEST:  : ×   ×   /   ×   ×    /     /    ×   ×   / If the scansion lines up, BLOCKQUOTE is fixed. Left-margin text. <span style="font-family:monospace,courier;white-space:pre;margin-left:2em;"> TEST: <span style="font-family:monospace,courier;white-space:pre;margin-left:2em;"> : ×   ×   /   ×   ×    /     /  ×   / If the scansion lines up, SPAN is fixed. Left-margin text. <div style="font-family:monospace,courier;white-space:pre;margin-left:2em;"> TEST: <div style="font-family:monospace,courier;white-space:pre;margin-left:2em;"> : ×   ×   /   ×   ×    /    /  ×   / If the scansion lines up, DIV is fixed. Left-margin text. <samp style="white-space:pre;margin-left:2em;"> TEST: <samp style="white-space:pre;margin-left:2em;"> : ×   ×   /   ×   ×    /    /   ×   / If the scansion lines up, SAMP is fixed. Left-margin text.

Scansion line tests

 * Line-initial space

2 4 1     4      3    4      3    4      1    4   ×  / ×     /      ×    /      ×    /      ×    / When Ajax strives, some rock's vast weight to throw,


 * Using <tt>

<poem style="margin-left:2em;"><tt> 2 4 1     4      3    4      3    4      1    4   ×  / ×     /      ×    /      ×    /      ×    / When Ajax strives, some rock's vast weight to throw, </tt>


 * Using

<poem style="margin-left:2em;"> 2 4 1     4      3    4      3    4      1    4  ×  / ×     /      ×    /      ×    /      ×    / When Ajax strives, some rock's vast weight to throw,


 * Anomie's fix

Line of regular text...

<pre style="border:none;background-color:transparent;margin-left:2em"> 2 4 1     4      3    4      3    4      1    4  ×  / ×     /      ×    /      ×    /      ×    / When Ajax strives, some rock's vast weight to throw,

Line of regular text...


 * Attempted "poem" fix

Line of text... <poem style="font-family:Courier;margin-left:2em"> 2 4 1     4      3    4      3    4      1    4  ×  / ×     /      ×    /      ×    /      ×    / When Ajax strives, some rock's vast weight to throw, Line of text.


 * "poem" with "white-space" doesn't work because HTML Tidy undoes the spaces

Line of text... <poem style="font-family:Courier;white-space:pre;margin-left:2em"> 2 4 1     4      3    4      3    4      1    4  ×  / ×     /      ×    /      ×    /      ×    / When Ajax strives, some rock's vast weight to throw, Line of text.


 * "white-space" doesn't affect "pre" functionality

Line of regular text... <pre style="border:none;background-color:transparent;white-space:pre;margin-left:2em"> 2 4 1     4      3    4      3    4      1    4  ×  / ×     /      ×    /      ×    /      ×    / When Ajax strives, some rock's vast weight to throw, Line of regular text...


 * (Text citations)