help_browser.trt 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <h1>Help Browser</h1>
  2. <img src="/usr/share/icons/48/help.png"></img>
  3. The <i>Help Browser</i> provides rich text documentation for ToaruOS. Documentation is written in a markup language similar to HTML, but with some notable differences due to nature of the rendering engine. This markup language supports three heading levels, bold, italic, and colored text, links to other help documents, and images. Whitespace is generally significant and line feeds in a source document will be rendered as such in the final document. Text is expected to be encoded in UTF-8, and the renderer will select between several fallback fonts to find characters if they are not in the base font. This same rendering engine is used to display labels and button text in most applications in ToaruOS, so these formatting hints can be applied if you are writing your own applications.
  4. <h2>Oddities and Differences from HTML</h2>
  5. The most important difference between the documentation markup language and HTML is the name of the link tag. Link tags are called <mono>&lt;link&gt;</mono>. They accept a <mono>target</mono> parameter with the target of the link.
  6. Another significant difference is that images appear on lines by themselves.
  7. All lines have the same line height. In this help browser, the default is <mono>18</mono>.
  8. <h2>Examples</h2>
  9. This document itself may serve as an example. It can be found in <mono>/usr/share/help/help_browser.trt</mono>.
  10. <h3>Headings</h3>
  11. There are three levels of heading tags available:
  12. <mono>
  13. &lt;h1&gt;H1&lt;/h1&gt;
  14. &lt;h2&gt;H2&lt;/h2&gt;
  15. &lt;h3&gt;H3&lt;/h3&gt;
  16. </mono>
  17. These headings will produce text as follows:
  18. <h1>H1</h1>
  19. <h2>H2</h2>
  20. <h3>H3</h3>
  21. <h3>Formatting</h3>
  22. You can also format <b>bold</b> and <i>italic</i> text as well combinations of <b><i>bold and italic</i></b> and <color 0x00FF00>different colors</color>
  23. <mono>
  24. You can also format &lt;b&gt;bold&lt;/b&gt; and &lt;i&gt;italic&lt;/i&gt; text as well combinations of &lt;b&gt;&lt;i&gt;bold and italic&lt;/i&gt;&lt;/b&gt; and &lt;color 0x00FF00&gt;different colors&lt;/color&gt;
  25. </mono>
  26. <h3>Images</h3>
  27. Images may be relative to the documentation root directory (<mono>/usr/share/help</mono>) or absolute paths.
  28. Images look like this:
  29. <mono>
  30. &lt;img src="/usr/share/logo_login.png"&gt;&lt/img&gt;
  31. </mono>
  32. <img src="/usr/share/logo_login.png"></img>
  33. You can also make links out of images, like this:
  34. <link target="special:contents"><img src="/usr/share/icons/48/help.png"></img></link>