ReTxt2tags: about, details, sampler, Original txt2tags sample, issues

ReTxt2tags — Display HTML as Txt2tags text

ReTxt2tags is a CSS experiment and reusable stylesheet for displaying simple HTML text as its Txt2tags equivalent. To get a feel of what it does, look at the HTML source of this very page.

It is entirely based on the excellent ReMarkdown CSS style, which was made for the lesser excellent Markdown markup language.

What’s the point?
Well, if you love Txt2tags, or want your simple HTML pages to look deceptively like good old plain text, the retxt2tags.css stylesheet is for you!

Another feature is you can "convert" an html document to txt2tags using it.
Unfortunately, the CSS doesn't allow to select the txt2tagsisation made to the html, but you can still print the HTML to PDF, then convert the PDF to plain txt.

If you need a maybe more reliable tool, you can see this one, based on html2wiki.

I don’t really expect this stylesheet to be widely used, and don’t even know if I’ll use it myself. But it was a nice CSS challenge to work on: no background images, no borders, only plain text characters.

Browser support:
All modern, CSS 2.1-compliant browsers should handle these styles with ease. There might be minor issues on IE8. IE7 is not supported.

Basic usage

An example HTML page using ReTxt2tags would look like this:

<!doctype html>
<html lang="en">
<head>
  <title>Using ReTxt2tags</title>
  <link rel="stylesheet" href="retxt2tags.css">
</head>
<body class="rt2t-on">
  <h1>Hello World</h1>
  <p>Goodnight, and good luck.</p>
</body>
</html>

You will need to download a copy of retxt2tags.css, and put it in the same directory as your HTML page. Note that we need to declare the rt2t-on class somewhere in the document: on the body element, on a container article or div element, your call.

See the details page for available options.

Copyright and stuff

Both retxt2tags.css and the optional script rmd-print.js are free software under the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE.