Jump to content

User:Phil wink/sandbox3

From Wikipedia, the free encyclopedia

Do special scansion characters "monospace" properly?

[edit]

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#En_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

Scansion markup request notes

[edit]

Background

[edit]

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 [1]

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, <tt>, <pre>, and <poem> all provide some, but not all of the necessary functionality. Of all these markups, <poem> 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 <poem> functionality

[edit]

<poem> 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:

<poem style="font-family:Courier;margin-left:2em">

Pros: It could be argued that <poem> 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. {{pad|1em}}

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

Cons: Altering the <poem> 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

[edit]

A new markup can be developed... presumably tagged with <scan> or <scansion> if these are available. We assume it will be based on <poem>, but that of course is up to the developer. The requirements would be:

  1. Render as monospaced characters (e.g. Courier) : <poem> currently supports as an optional "style" element. In the new scansion markup, this should be the default
  2. Render multiple line-initial spaces literally : <poem> currently supports
  3. Render multiple line-internal spaces literally : <poem> currently does not support
  4. Render single line-breaks literally : <poem> currently supports
  5. Render some possibly-reserved characters literally (these include "|", "/", "\", "[]", "()") : <poem> currently supports
  6. Render markup (e.g. <ref>) as markup, not literally : <poem> currently supports
  7. Allow the application of a left margin : <poem> 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)
  1. ^ Brooke: Romeus and Iuliet, 1
  2. ^ Pound: "In a Station of the Metro"

Resource suggestions

[edit]
(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)

NEW tests

[edit]

Monospace

[edit]

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

[edit]

FONT-FAMILY:MONOSPACE (depending upon user settings, this is very likely to be identical to one of the the families below)
1234567890
uuuuuuuuuu (U+0075 u LATIN SMALL LETTER U)
∪∪∪∪∪∪∪∪∪∪ (U+222A UNION)
⏑⏑⏑⏑⏑⏑⏑⏑⏑⏑ (U+23D1 METRICAL BREVE)
⏔⏔⏔⏔⏔ ( U+23D4 METRICAL LONG OVER TWO SHORTS)
uuuuuuuuuu ( markup biceps)

FONT-FAMILY:CONSOLAS
1234567890
uuuuuuuuuu (U+0075 u LATIN SMALL LETTER U)
∪∪∪∪∪∪∪∪∪∪ (U+222A UNION)
⏑⏑⏑⏑⏑⏑⏑⏑⏑⏑ (U+23D1 METRICAL BREVE)
⏔⏔⏔⏔⏔ ( U+23D4 METRICAL LONG OVER TWO SHORTS)
uuuuuuuuuu ( markup biceps)

FONT-FAMILY:COURIER
1234567890
uuuuuuuuuu (U+0075 u LATIN SMALL LETTER U)
∪∪∪∪∪∪∪∪∪∪ (U+222A UNION)
⏑⏑⏑⏑⏑⏑⏑⏑⏑⏑ (U+23D1 METRICAL BREVE)
⏔⏔⏔⏔⏔ ( U+23D4 METRICAL LONG OVER TWO SHORTS)
uuuuuuuuuu ( markup biceps)

Template test

[edit]

× × / × × / × / × /

If the scansion lines up, the TEMPLATE works.[1]

Styles

[edit]

Left-margin text.

TEST: <poem style="margin-left:2em;font-family:monospace,courier;">:
  × × / × × / /× × /
  If the scansion lines up, POEM is fixed.[2]

Left-margin text.

TEST: <poem style="font-family:monospace,courier;white-space:pre;margin-left:2em;">:
× × / × × / /× × /
If the scansion lines up, POEM is fixed.[3]

Left-margin text.

TEST: <poem style="font-family:monospace,courier;white-space:pre;margin-left:2em;line-height:60%;">:
× × / × × / /× × /
If the scansion lines up, POEM is fixed.[4]

Left-margin text.

TEST: <blockquote style="font-family:monospace,courier;white-space:pre;">: × × / × × / / × × / If the scansion lines up, BLOCKQUOTE is fixed.[5]

Left-margin text.

TEST: <blockquote style="font-family:monospace,courier;white-space:pre-wrap;">: × × / × × / / × × / If the scansion lines up, BLOCKQUOTE is fixed.[6]

Left-margin text. TEST: <span style="font-family:monospace,courier;white-space:pre;margin-left:2em;">: × × / × × / / × / If the scansion lines up, SPAN is fixed.[7] Left-margin text.

TEST: <div style="font-family:monospace,courier;white-space:pre;margin-left:2em;">: × × / × × / / × / If the scansion lines up, DIV is fixed.[8]

Left-margin text. TEST: <samp style="white-space:pre;margin-left:2em;">: × × / × × / / × / If the scansion lines up, SAMP is fixed.[9] Left-margin text.

Scansion line tests

[edit]
Line-initial space
  2  4 1     4      3    4      3    4      1    4
  ×  / ×     /      ×    /      ×    /      ×    /
When Ajax strives, some rock's vast weight to throw,
Using <poem><tt>


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

Using <poem><pre>

  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...

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

[10]

Line of regular text...

Attempted "poem" fix

Line of text...

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

Line of text.

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

Line of text...

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

Line of text.

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

Line of regular text...

  2  4 1     4      3    4      3    4      1    4
  ×  / ×     /      ×    /      ×    /      ×    /
When Ajax strives, some rock's vast weight to throw, <ref>Milton: ''On His Blindness'' 1</ref>

Line of regular text...

(Text citations)
  1. ^ Yeah!
  2. ^ Yeah!
  3. ^ Yeah!
  4. ^ Yeah!
  5. ^ Yeah!
  6. ^ Yeah!
  7. ^ Yeah!
  8. ^ Yeah!
  9. ^ Yeah!
  10. ^ Milton: On His Blindness 1
  11. ^ Milton: On His Blindness 1
  12. ^ Milton: On His Blindness 1