Editing 1676: Full-Width Justification

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
  
 
==Explanation==
 
==Explanation==
The comic refers to an irritating problem in laying out text to fit from margin to margin, the problem of {{w|justification (typesetting)|justification}}, where you want multiple-line text to line up on the left side (common), the right side (less common), or both sides, which is commonly called full justification. This strip is dealing with how to make text fit such that it lines up on both sides while still looking good. Sometimes, as with a shorter word between two long words like "relationship between [[:wikt:deindustrialization|deindustrialization]]," there's no universal good way to make the typography work. It is a difficult problem to make text look good and be easily legible especially in a narrow space, with the biggest issue being how to handle words that are too long to fit nicely.
+
{{incomplete|hasty & impatient placeholder}}
 +
The comic refers to an irritating problem in laying out text in narrow spaces, as in newspaper columns or some web pages: the problem of [[:w:justification|justification]]. Sometimes, as before a long word like "[[:wikt:deindustrialization|deindustrialization]]," there's no good way to make the typography work. The comic shows several solutions to this problem, some realistic and others less so, but each unsatisfying. "Giving up" is ugly; hyphenating is visually confusing ("deindus-" looks like an independent, unfamiliar word, pronounced "deign-duss"); stretching is unnatural, probably hard to code or render, and unfamiliar; adding "filler" words, a radical solution, makes the writing worse; and adding a meaningless snake image, just long enough to fill the extra space, is a novel (and bizarre) solution advocated in the title-text.
  
The comic shows several solutions to this problem, some realistic and others less so, but each partly or wholly unsatisfying.
+
Note that in Arabic, it is common to stretch the lines connecting letters as a relatively elegant and satisfying resolution to this problem. This trick is called "[[:w:kashida|kashida]]" (كشيدة) and is explained and illustrated [http://design.tutsplus.com/tutorials/creative-arabic-calligraphy-kashida-tajim-and-tashkil--cms-23240 here].
 
 
"'''Giving up'''" essentially means not attempting full justification for a particular line, which means it will not fit with the rest of the layout.
 
 
 
"'''Letter spacing'''" involves an conspicuously large amount of whitespace between letters, sometimes suggesting a reading where each letter is a word until the reader recognizes what is intended. This method is in somewhat common use in newspaper and magazine layout, where it is generally known by the name "tracking" (distance between all letters) and "kerning" (distance between particular pairs of letters that fit together easily). However, letter spacing is unavailable for justification purposes in some languages (such as German), in which it is used for emphasis, as italics are in English.
 
 
 
"'''Hyphenation'''" can be confusing because it requires suspended recognition of the full word, confusing the eye into seeing, in the given case, the non-words "deindus" and "trialization". This creates difficulty in both pronouncing and parsing the word. Moreover, the decision of when and where to hyphenate is non-trivial, particularly for automated text layout; for example, breaking a word and leaving only two "orphaned" letters on the following line is generally considered an illegal hyphenation. Nevertheless, hyphenation is a very common means of handling extreme cases. The hyphenation option is most compact, yielding the extra word "ecological".
 
 
 
"'''Stretching'''", in which individual letters are displayed as wider than usual so that a word will take up more space, appears visually unnatural and unfamiliar, and may present technical difficulties in rendering.
 
 
 
Adding "'''filler'''" words is generally undesirable: in the worst case, the meaning may be unintentionally altered, or the tone might be rendered too informal, as in the given example, and even in the best case, the text becomes less concise and potentially more difficult to read. Automation is also difficult. However, filler words added by a human, especially the original author of the text, are the least visually conspicuous, and may be the most practical solution in some scenarios.
 
 
 
Finally, adding a decorative image like "'''snakes'''" (but not necessarily snakes in particular) to fill the extra space is a justification practice of significant historical interest (it was particularly common for illuminated manuscripts in the medieval era and remained prominent until the invention of the printing press) but little modern relevance. There may be a particular absurdity to using a snake as it can be read as a word, such as "the relationship between snake deindustrialization" as would be done similar to a {{w|rebus}}.
 
 
 
In modern text layout programs, some combination of the above strategies may be used to achieve the most visually consistent effect. For example, in one case, hyphenation might be the best option to split a very long word, while another line might be too long by only one or two letters, in which case the program could apply a very slight degree of extra letter spacing, too small for the average reader to notice.
 
 
 
The title text suggests that in order to facilitate the "snakes" method of "solving" the problem, the {{w|Unicode Consortium}}, the organization in charge of the common text standard {{w|Unicode}}, should add "snake-building characters" (similar in concept to the existing {{w|Box Drawing}} block), to allow variable-length snake images to be used as filling. Currently, there are at least six snake characters in Unicode, not including at least ten more Egyptian hieroglyphs that represent specific snakes, some in specific combination with other hieroglyphs: [http://unicode-search.net/unicode-namesearch.pl?term=SNAKE]
 
*[https://codepoints.net/U+1DC2 U+1DC2] &nbsp; <big>&#x1DC2;</big> &nbsp; <big>[S&#x1DC2;]</big>
 
**A diacritical {{w|combining character}} used in Americanist phonetic notation to indicate lenis (weak) articulation.
 
*[https://codepoints.net/U+2E92 U+2E92] &nbsp; <big>&#x2E92;</big>
 
**A {{w|CJK character}} which might be interpreted as "snake".
 
*[https://codepoints.net/U+8675 U+8675] &nbsp; <big>&#x8675;</big>
 
**Another CJK character meaning "snake".
 
*[https://codepoints.net/U+86C7 U+86C7] &nbsp; <big>&#x86C7;</big>
 
**Another CJK character meaning "snake".
 
*[https://codepoints.net/U+1D9DC U+1D9DC] &nbsp; <big>&#x1D9DC;</big>
 
**One of the poorly-supported characters in the {{w|signWriting|signwriting block}}.
 
*[https://codepoints.net/U+1F40D U+1F40D] &nbsp; <big>&#x1F40D;</big>
 
**An {{w|emoji}} snake.
 
 
 
One of the hieroglyphs ([https://codepoints.net/U+13192 U+13192 EGYPTIAN HIEROGLYPH I009A]) is described in [https://mjn.host.cs.st-andrews.ac.uk/egyptian/unicode/tablemain.html source documents] as HORNED VIPER CRAWLING OUT OF ENCLOSURE, so it is literally a snake-building character. 𓆒 This is the character in question.
 
 
 
 
 
"Non-breaking" in the title text refers to a similar process as zero-width joiners and no-break HTML and CSS; the whole snake would shift down if it were too wide to fit on a given line. This suggestion would likely be rejected; the Unicode consortium is very specific about which characters are added,{{Citation needed}} and always require a good reason{{Citation needed}} before adding a character or set of characters to the standard. Strange decisions by the consortium have previously been referenced in [[1253: Exoplanet Names]], [[1513: Code Quality]], and [[1525: Emojic 8 Ball]].
 
 
 
Within an hour or two of this comic being published, a thread on the subject started on the Unicode Consortium’s official Unicode Mailing List. As of two days later, it’s still running.
 
  
 
==Transcript==
 
==Transcript==
Strategies for full-width justification
+
{{incomplete transcript}}
  
[Below the caption is a column with six boxes, each showing a different "strategy" for justification which is annotated beside it. Here the annotation is written at the top and the text below. The top and bottom of the text is cut of in the middle, but as it can be "read" this is written anyway. Only for hyphenation does an extra word appear at the end. In the last with snakes, a snake is drawn to cover the entire space from the end of between to the right border.]
+
==Trivia==
 
+
The full text (with alternate changes) reads:
<dl><!-- Note: the CSS is set important and directly on the <dd> to avoid being upset by any current or future stylesheet. If the text is rendered "plain" it still should look about right -->
 
<dt>Giving up</dt>
 
<dd style="text-align:justify!important;text-justify:inter-word!important;width:10.5em">their famous paper
 
<span style="white-space:nowrap">on the relationship</span>
 
between
 
deindustrialization
 
and the growth of</dd>
 
 
 
<dt>Letter spacing</dt>
 
<dd style="text-align:justify!important;text-justify:inter-word!important;width:10.5em">their famous paper
 
<span style="white-space:nowrap">on the relationship</span>
 
<span style="white-space:nowrap">b e t w e e n</span>
 
deindustrialization
 
and the growth of</dd>
 
 
 
<dt>Hyphenation</dt>
 
<dd style="text-align:justify!important;text-justify:inter-word!important;width:10.5em">their famous paper
 
<span style="white-space:nowrap">on the relationship</span>
 
<span style="white-space:nowrap">between deindus-</span>
 
trialization and the growth of ecological</dd>
 
 
 
<dt>Stretching</dt>
 
<dd style="text-align:justify!important;text-justify:inter-word!important;width:10.5em">their famous paper
 
<span style="white-space:nowrap">on the relationship</span>
 
<span style="transform:scaleX(2.4) translateX(28%);;display:inline-block">between</span>
 
deindustrialization
 
and the growth of</dd>
 
  
<dt>Filler</dt>
+
''...their [word unknown] paper on the relationship between [crap like]/[ 🐍  ] deindustrialization and the growth of ecological...''
<dd style="text-align:justify!important;text-justify:inter-word!important;width:10.5em">their famous paper
 
<span style="white-space:nowrap">on the relationship</span>
 
between crap like
 
deindustrialization
 
and the growth of</dd>
 
 
 
<dt>Snakes</dt>
 
<dd>their famous paper<br>
 
on the relationship<br>
 
between 🐍 [a snake filling the gap]<br>
 
deindustrialization<br>
 
and the growth of</dd>
 
 
 
</dl>
 
 
 
==Trivia==
 
*The full text (with alternate changes) reads:
 
::''...their famous paper on the relationship between [crap like]/[ 🐍  ] deindustrialization and the growth of [ecological]...''
 
*An approach not depicted is to treat justification as part of a spherical typesetting strategy which allows words to move between lines even where this is not locally optimal. Its net effect in a case like this is to pull words from the previous line for use as filler. This approach is used by {{w|TeX}}.
 
*In Arabic, it is common to stretch the lines connecting letters as a relatively elegant and satisfying resolution to this problem. This trick is called "{{w|kashida}}" (كشيدة). There does in fact exist a Unicode character, U+0640: (ـ), to help with this: using it to extend "كشيدة" would result in something like "كـــــشـــيـــدة" (which, incidentally, looks a lot like a snake).
 
*Jim Chapman, developer of Windows 10 e-reader app Freda, has implemented snake-justification in the app, now available on the [https://www.microsoft.com/store/apps/9wzdncrfj43b  Windows Store]. For best results, use the 'settings' screen to switch 'hyphenation' to 'no', 'use snakes' to 'yes', and choose a large font size (33 or so). Then pick a book with long words and justified text, and read it in a narrow window.
 
*The comic has been discussed on the [http://www.unicode.org/mail-arch/unicode-ml/y2016-m05/0004.html Unicode Mailing List].
 
*The typesetting system [http://www.sile-typesetter.org/ SILE] implemented snake justification on the same day the comic was published.
 
*"Line Fillers" depicting animals (including snakes) were widely used in [http://www.medievalcodes.ca/2016/04/line-fillers.html medieval book art].
 
  
 
{{comic discussion}}
 
{{comic discussion}}
[[Category:Animals]]
 
[[Category:Unicode]]
 

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)