https://github.com/CommonDoc/vertex.git
git clone 'https://github.com/CommonDoc/vertex.git'
(ql:quickload :vertex)
A markup language with TeX syntax.
VerTeX syntax, as the name implies, is basically TeX syntax. Blocks look like this:
\some-tag\b{bold text}\link[uri='https://www.google.com/']{Google}The syntax, as a sort of regular expression, is like this:
\<tag name>([(<attribute>=<value>)*])?({<body>})?
Paragraphs are delimited by double newlines.
A paragraph.
Another paragraph with \b{bold text}.
A third paragraph.
bBold text.
This is \b{bold text}.
iItalicized text.
This text is in \i{italics}.
uUnderlined text.
This text is \u{underlined}.
strikeStruck-through text.
This text is \strike{struck through}.
sup and subSuperscript and subscript.
The value of the vacuum permittivity, ε\sub{0}, is 8.8x10\sup{-12}.
cInline code.
The function \c{find} takes as arguments...
codeA block of code.
\code[lang='lisp']{
(let ((x 1))
(incf x))
}
qAn inline quote.
quoteA block quote.
refA reference to a section of the document, or to another document.
See section \ref[sec=search]{Search}.
For a more thorough discussion, see \ref[doc=aima, sec=search]{the AIMA chapter}
on search algorithms.
linkA link to a URI.
Visit \link[uri='https://www.google.com/']{Google}.
listAn unordered list.
Ingredients:
\list{
\item{One egg}
\item{One tablespoon of olive oil}
\item{Grated cheese}
}
Produces:
enumAn ordered list.
Recipe for eudoxia's patent-pending microwave eggs:
\enum{
\item{Pour the olive oil into the bowl}
\item{Crack the egg into it}
\item{Put the cheese on top}
\item{Microwave for 45 seconds}
}
Produces:
deflistA definition list.
\deflist{
\term{Sum Rule}
\def{If two tasks can be performed in m and n ways, respectively, then
there are m+n ways of doing \b{either}.}
\term{Product Rule}
\def{If two sequential tasks can be performed in m and n ways,
respectively, there are m*n ways of performing the sequence.}
}
table, row, cellExactly what you would expect.
\table{
\row{
\cell{} \cell{\b{Peach}} \cell{\b{Egg}}
}
\row{
\cell{\i{Fat}} \cell{0.25g} \cell{10.6g}
}
\row{
\cell{\i{Protein}} \cell{0.91g} \cell{12.6g}
}
}
Produces:
| | Peach | Egg | | ———– | ——— | ——- | | Fat | 0.25g | 10.6g | | Protein | 0.91g | 12.6g |
sectionDefines a section.
\section[title=The Reader]{
... For other stuff see the chapter on \ref[sec=compiler]{Compilation}.
}
\section[title=The Compiler, ref=compiler]{
... A compiler is basically ...
}
Copyright (c) 2014-2015 Fernando Borretti
Licensed under the MIT License.