WIX
|
28-Jan-2009
WIX has moved to git; the repository is here |
What is it?
WIX (pronounced “wick”) is a text markup format. Its syntax is a blend of Donald Knuth's TEX and various wiki markup. Here's what the WIX for this page looks like.
-
Unlike TEX, WIX is intended to be presentation-neutral; WIX documents can be rendered into several output formats: html, plain text, pdf (via TEX or lout), RTF, unix man page, IETF RFC, and others.
-
Unlike SGML and XML formats (such as HTML and DocBook), WIX is convenient for humans to read and write without special editors.
-
Unlike every known wiki format, WIX has a formal grammar rather than an ad-hoc parser. This means that its parsing behavior is fully specified, unambiguous, and predictable. In addition, WIX's grammar is concise, context-free boolean, and lexerless. The WIX implementation uses the Berkeley Scannerless Boolean Parser.
Why Should I use WIX?
Because:
-
Its syntax is easy to produce and edit with an ordinary text editor and very readable, even by people who don't know WIX. It also works very well with source control.
-
It generates beautiful HTML versions of your documents including: automatic “smart quotes” and ellipses, entity escapification, bulleting, <pre> emulation, icon-tagging of pdf and mailto links, easy style switching, and automatic cross-browser compatability. Coming soon: automatic table of contents, section links, footnotes, indexing, syntax highlighting, and macro expansion. Current visual design thanks to the skills of David Crawshaw.
-
You get zero-effort, nicely formatted plain text versions of your documents. It's a much more pleasant way to write RFC's and man pages, and you get a nicely typeset pdf version with no additional effort!
-
It is easy to add your own extensions using Java or Haskell (thanks to Brian Alliet's LambdaVM). Unlike HTML, the “document object model” for WIX is clean, simple and easy to understand.
-
It includes nifty bonus features like:
-
Automatic formatting of fractions (1/2 becomes 1/2) and ordinals, (3rd becomes 3rd).
-
Colorized diffs against the previous version of a document each time you re-render it (example). Diffs are done on the rendered text so you can see any changes to your documents that happen as a result of upgrading to a newer version of WIX.
-
Keystroke symbols like ⌘ ⇧ ⌥ ⌃ ⇪ (and, in some fonts, the apple symbol: )
-
Inline TeX-syntax mathematics (html rendering courtesy of jsMath) – you type this:
$$\quad \sqrt{x^2+\sqrt{\alpha}}$$
and you get this: \quad \sqrt{x^2+\sqrt{\alpha}}.
-
All of the icon images that WIX uses are inlined into the html it generates as <img src='data:image/XXX;base64,
'> tags, so the resulting files are completely self-contained.
How do I write WIX documents?
There's a draft tutorial here, though it's nowhere close to ready yet.
What inspired WIX?
Many of the features in WIX were inspired by other systems, including:
How can I extend WIX? How does its grammar work?
There's a draft grammar guide that explains the finer points of the grammar. The contents of the grammar guide used to be a bunch of comments in the grammar file, but they took up more space than the grammar itself.
To-Do items (mostly for Adam)
-
subtitles (in light gray)
-
Accents, etc as in TeX
-
Let blockquote text start on the same line as the doublequote
-
COMMENTS
-
eliminate .html on local links
-
Copy non-WIX files to output directory?
Visual styling
Multi-Document Stuff
Plugins
-
TexMath (convert to png/pdf/svg)
-
Graphviz
<!-- filter="some filter" -- can be dot, neato, twopi, circo, fdp -->
<dot>
digraph G {Hello->World}
</dot>
-
Gnuplot
<plot>
set title "Sample function"
set samples 400, 400
plot [-10:10] real(sin(x)**besj0(x))
</plot>
-
Metapost
-
rrdtool graphs
-
External command?
<exec command="perl">
foreach $f (1...5) {
print $f," ";
}
</exec>
macros
Output formats
Misc
-
javascripted slideshow macro?
-
line-numbered listings
-
consider using (*) for lists instead of *
-
Add TEX-to-PNG and embed the PNG inline
-
reintroduce autolinkification
-
must be done as a post-processing step because we have no leftward-maximal matching
-
find links within verbatim blocks, make them clickable
-
javascript cloaking of email addresses
-
expand/collapse javascript outlines (for faqs)
-
today's date (\today)
-
footnotes
-
icons for movies (avi, wmv, quicktime)
-
Precompile grammar
-
imagization of header text (nice big antialiased fonts?)
-
check out trac; it does great stuff.
-
\cite
-
\nobr (non-breaking)
-
sans-serif text?
-
comprehensive latex symbol list
-
images (with alt-text)
-
hCard
-
link types
-
stop base64-hardcoding images into the haskell file, put them in the source distro
-
inline link badges?
-
header = title, author, revision(s)/date
-
numbered vs non-numbered sections
-
book sections = preface, abstract, dedication, glossary, biblio, colophon, index, appendix
-
horizontal rule
-
title-with-subtitle?
-
admonition paragraphs: note, tip, important, warning, caution
-
sidebar blocks
-
source code formatting
-
footnotes in \pre text
-
#include
Document-Wide Stuff
-
two-column
-
“draft” mode (prints draft in background)
-
header/footer (last compiled on, author, etc)
-
document structure
-
header: title, subtitle, author, email, date
-
toc
-
abstract
-
sections/chapters (with header/footer)
-
textblocks:
-
attention, caution, danger, error, hint, important, note, tip
-
appendices
-
bibliography
-
index
-
something^^
-
subscript,,
-
[= term =]
-
<- (block)
-
pretty-printer / syntax-highlighter for wixtex
-
@@defined/indexed term@@ (index/glossary)
-
by prior line indentation, like headings in the original structured text
-
: term : definition
-
acronyms! include auto definition
-
destroydrop trees
-
built-in RSS-history (maintain the history in the document or perhaps in a revision control system containing it, rss-file is generated automatically)
internal relative links
|