m15o.net/site/doc/xtw

NAME

xtw - xtx, wrapped

DESCRIPTION

xtw is the hard-wrapped version of xtx.

The xtx format is line-oriented. Each line has a type: text, heading, list, quote or pre.

When viewed on a terminal, an xtx document doesn't wrap. The line goes on past the right edge of the screen, which makes it difficult to read.

On the other hand, if we manually insert newlines to make the text fit on the terminal, we'd be creating new paragraphs for each line.

To solve this, xtw uses the following sequence to indicate a hard-wrap:

<NOSPACE><SPACE><NEWLINE>

Conveniently, this is the way the fold command wraps text when using the -s option.

EXAMPLES

To wrap an xtx document:

fold -sw 72 about.xtx > about.xtw

To unwrap an xtw document:

echo nex/in/m15o/about.xtw | nc nightfall.city 1900 | awk '/[^ ] $/ { printf("%s", $0); next } { print }'

SEE ALSO

xtx(doc)

https://nightfall.city/nex/in/m15o/projects/text.xtw

REF

xtx(doc)