A place to cache linked articles (think custom and personal wayback machine)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 anni fa
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. title: Mechanical Ragger: Print typesetting for the web
  2. url: https://oak.is/thinking/mechanical-ragger/
  3. hash_url: c0e7ed5590b520f176aacfd76ae03188
  4. <p>The web has never been a place for perfectionism. Typesetting in particular has been a long-neglected facet of web design because we’ve lacked the tools to give long texts the editorial care they need.</p>
  5. <p>In print media, text ragging is an <a href="https://oakstudios.github.io/mechanical-ragger/examples">established practice</a> to help this, but up to now there have been no tools on the web to do this.</p>
  6. <p>We built <a href="https://oakstudios.github.io/mechanical-ragger/">Mechanical Ragger</a> to give designers some peace of mind; it tidies line endings so that long paragraphs will feel natural to read, and users won’t have to strain to read them.</p>
  7. <p>Historically, text ragging is a practice to adjust the uneven line ends of paragraphs. (In a left-aligned paragraph, this is the right side.) We can illustrate how this would enhance readability in a long flow of text:</p>
  8. <p class="wide"><img src="/uploads/Ragging%20Animation.svg" alt="Comparison showing text ragging"></p>
  9. <p class="caption">Text without ragging (left) compared to with ragging (right)</p>
  10. <p>Without ragging, lines are left to break naturally with the content, where long words at the end of a line can cause irregularities in the shape of paragraphs. This often has the effect of drawing a reader’s attention away from the content. A well-ragged paragraph removes these and brings a sense of rhythm and harmony to the often irregular shapes of latin text, ensuring readers can get through the copy without distraction.</p>
  11. <p>Mechanical Ragger brings this print concept to the web, improving the appearance of text blocks by removing these significant gaps and alternating line lengths to enhance the rhythm of the paragraph. To do this, it adds shapes to every other line in a paragraph, causing text to wrap around it:</p>
  12. <p><img src="/uploads/Exclusion%20Example.svg" alt="Visual showing how Mechanical Ragger works"></p>
  13. <p class="caption">How Mechanical Ragger works behind the scenes</p>
  14. <h2 id="demo">Demo</h2>
  15. <p><a href="https://oakstudios.github.io/mechanical-ragger"><img src="/uploads/mechanical-ragger-demo.png" alt="Mechanical Ragger demo website"></a></p>
  16. <p class="caption">View a live demo at: <a href="https://oakstudios.github.io/mechanical-ragger">oakstudios.github.io/mechanical-ragger</a></p>
  17. <h2 id="usage">Usage</h2>
  18. <p>We built this tool as an extensible JavaScript library; it’s ready-to-use on the web, in React, and easily portable to any framework. Using the web component, the setup can be as simple as:</p>
  19. <div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">&lt;</span><span class="nx">mechanical</span><span class="o">-</span><span class="nx">ragger</span><span class="o">&gt;</span>
  20. <span class="nx">Lorem</span> <span class="nx">ipsum</span> <span class="nx">dolor</span> <span class="nx">sit</span> <span class="nx">amet</span> <span class="nx">consectetur</span> <span class="nx">adipisicing</span> <span class="nx">elit</span><span class="p">.</span>
  21. <span class="o">&lt;</span><span class="sr">/mechanical-ragger</span><span class="err">&gt;
  22. </span>
  23. <span class="o">&lt;</span><span class="nx">script</span> <span class="nx">src</span><span class="o">=</span><span class="dl">"</span><span class="s2">https://unpkg.com/@oakstudios/mechanical-ragger@latest/web-component-auto-register.js</span><span class="dl">"</span><span class="o">&gt;&lt;</span><span class="sr">/script</span><span class="err">&gt;
  24. </span></code></pre></div></div>
  25. <h2 id="considerations">Considerations</h2>
  26. <p>Typesetting is about more than just the shape of the text, though. There are a few related considerations to keep in mind when ragging:</p>
  27. <ul>
  28. <li>Avoid repeating words or shapes at the end of each line in a paragraph.</li>
  29. <li>Avoid breaking too many words, which can make readability worse.</li>
  30. </ul>
  31. <p>Advanced typesetting is complex and contextual, requiring a human touch. While the mechanical ragger is a useful aid, we call it mechanical for a reason, and content must be written accordingly.</p>
  32. <p>Mechanical Ragger is open-source, on <a href="https://github.com/oakstudios/mechanical-ragger">GitHub</a> and as an <a href="https://www.npmjs.com/@oakstudios/mechanical-ragger">NPM module</a>. Contributions to add new features and more platform support for the Mechanical Ragger are always welcome.</p>