代码拉取完成,页面将自动刷新
* TODO fix other writers to use new ropes
_ man
_ tex
_ context
_ latex
* TODO citations using independent citeproc program
- might need two passes for this, one to generate the list of
citations, which can then be passed to citeproc for processing
on the next pass. otherwise footnotes will be screwed up.
- there can be a special writer for the first pass, which skips
everything but citations and just stores them in a list.
* TODO math in $, $$
* TODO fenced code block extension
* TODO alternative indented code block with metadata?
This is text.
code {
in indented = block
}
--- haskell
code {
in indented = block
}
[haskell]
More text.
* TODO layout: indentation options?
* TODO latex reader - write peg
* TODO mathml - look at pandoc2?
* TODO make epub tool
* TODO make pdf tool
* TODO documentation, including extending writer + parser
Notes on a possible macro system: Simply add a function
to the writer:
W.name = function(last,first)
return first .. writer(space) .. writer.strong(last)
end
W.repeat = function(num,x)
return string.rep(x, tonumber(num))
end
When lunamark encounters %name{<inlines>}{<inlines>}
or %repeat[7]{Hi there%space}, it simply calls the writer.name function.
Note that writer.space is currently not a function; maybe that should
change for uniformity. We may want macros with no arguments that
need to be functions: e.g. %currenttime.
Probably we'd need several types of arguments:
* parsed inline lists
* parsed block lists
* raw text
Also we'd have to know whether to parse as a block or an inline.
So perhaps we'd need two different kinds of macros.
* inline macros:
%name{<inlines>} -- with inline argument
%name[raw text] -- with raw argument
* block macros
.admonition{<inlines>}{| -- multiline block
<blocks>
|}
.startsource[|
multiline raw text - first newline ignored
|]
These macros are all on the writer side. What about the reader side?
E.g. what if we want a macro
#include[myfile.txt]
that reads myfile.txt and parses the source as markdown?
This can't happen in the writer. But there could be a way to
register a reader macro. This would simply call a match-time
parser function that directly modifies the input string.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。