ledger_web 1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. data/.gitignore +10 -0
  2. data/LICENSE +7 -0
  3. data/README.md +140 -0
  4. data/Rakefile +11 -0
  5. data/bin/ledger_web +14 -0
  6. data/ledger_web.gemspec +26 -0
  7. data/lib/ledger_web/app.rb +69 -0
  8. data/lib/ledger_web/config.rb +87 -0
  9. data/lib/ledger_web/db/migrate/20111226180900_initial_schema.rb +38 -0
  10. data/lib/ledger_web/db/migrate/20111231132900_add_views.rb +37 -0
  11. data/lib/ledger_web/db.rb +54 -0
  12. data/lib/ledger_web/helpers.rb +62 -0
  13. data/lib/ledger_web/public/bootstrap-dropdown.js +55 -0
  14. data/lib/ledger_web/public/bootstrap.min.css +356 -0
  15. data/lib/ledger_web/public/codemirror/keymap/emacs.js +29 -0
  16. data/lib/ledger_web/public/codemirror/keymap/vim.js +76 -0
  17. data/lib/ledger_web/public/codemirror/lib/codemirror.css +104 -0
  18. data/lib/ledger_web/public/codemirror/lib/codemirror.js +2761 -0
  19. data/lib/ledger_web/public/codemirror/lib/util/dialog.css +23 -0
  20. data/lib/ledger_web/public/codemirror/lib/util/dialog.js +63 -0
  21. data/lib/ledger_web/public/codemirror/lib/util/foldcode.js +66 -0
  22. data/lib/ledger_web/public/codemirror/lib/util/formatting.js +291 -0
  23. data/lib/ledger_web/public/codemirror/lib/util/javascript-hint.js +83 -0
  24. data/lib/ledger_web/public/codemirror/lib/util/overlay.js +51 -0
  25. data/lib/ledger_web/public/codemirror/lib/util/runmode.js +27 -0
  26. data/lib/ledger_web/public/codemirror/lib/util/search.js +114 -0
  27. data/lib/ledger_web/public/codemirror/lib/util/searchcursor.js +117 -0
  28. data/lib/ledger_web/public/codemirror/lib/util/simple-hint.css +16 -0
  29. data/lib/ledger_web/public/codemirror/lib/util/simple-hint.js +66 -0
  30. data/lib/ledger_web/public/codemirror/mode/clike/clike.js +249 -0
  31. data/lib/ledger_web/public/codemirror/mode/clike/index.html +101 -0
  32. data/lib/ledger_web/public/codemirror/mode/clojure/clojure.js +207 -0
  33. data/lib/ledger_web/public/codemirror/mode/clojure/index.html +66 -0
  34. data/lib/ledger_web/public/codemirror/mode/coffeescript/LICENSE +22 -0
  35. data/lib/ledger_web/public/codemirror/mode/coffeescript/coffeescript.js +325 -0
  36. data/lib/ledger_web/public/codemirror/mode/coffeescript/index.html +721 -0
  37. data/lib/ledger_web/public/codemirror/mode/css/css.js +124 -0
  38. data/lib/ledger_web/public/codemirror/mode/css/index.html +55 -0
  39. data/lib/ledger_web/public/codemirror/mode/diff/diff.css +3 -0
  40. data/lib/ledger_web/public/codemirror/mode/diff/diff.js +13 -0
  41. data/lib/ledger_web/public/codemirror/mode/diff/index.html +99 -0
  42. data/lib/ledger_web/public/codemirror/mode/gfm/gfm.js +108 -0
  43. data/lib/ledger_web/public/codemirror/mode/gfm/index.html +47 -0
  44. data/lib/ledger_web/public/codemirror/mode/groovy/groovy.js +210 -0
  45. data/lib/ledger_web/public/codemirror/mode/groovy/index.html +71 -0
  46. data/lib/ledger_web/public/codemirror/mode/haskell/haskell.js +242 -0
  47. data/lib/ledger_web/public/codemirror/mode/haskell/index.html +60 -0
  48. data/lib/ledger_web/public/codemirror/mode/htmlembedded/htmlembedded.js +68 -0
  49. data/lib/ledger_web/public/codemirror/mode/htmlembedded/index.html +49 -0
  50. data/lib/ledger_web/public/codemirror/mode/htmlmixed/htmlmixed.js +83 -0
  51. data/lib/ledger_web/public/codemirror/mode/htmlmixed/index.html +51 -0
  52. data/lib/ledger_web/public/codemirror/mode/javascript/index.html +77 -0
  53. data/lib/ledger_web/public/codemirror/mode/javascript/javascript.js +360 -0
  54. data/lib/ledger_web/public/codemirror/mode/jinja2/index.html +37 -0
  55. data/lib/ledger_web/public/codemirror/mode/jinja2/jinja2.js +42 -0
  56. data/lib/ledger_web/public/codemirror/mode/lua/index.html +72 -0
  57. data/lib/ledger_web/public/codemirror/mode/lua/lua.js +140 -0
  58. data/lib/ledger_web/public/codemirror/mode/markdown/index.html +339 -0
  59. data/lib/ledger_web/public/codemirror/mode/markdown/markdown.js +242 -0
  60. data/lib/ledger_web/public/codemirror/mode/ntriples/index.html +32 -0
  61. data/lib/ledger_web/public/codemirror/mode/ntriples/ntriples.js +172 -0
  62. data/lib/ledger_web/public/codemirror/mode/pascal/LICENSE +7 -0
  63. data/lib/ledger_web/public/codemirror/mode/pascal/index.html +48 -0
  64. data/lib/ledger_web/public/codemirror/mode/pascal/pascal.js +138 -0
  65. data/lib/ledger_web/public/codemirror/mode/perl/LICENSE +19 -0
  66. data/lib/ledger_web/public/codemirror/mode/perl/index.html +62 -0
  67. data/lib/ledger_web/public/codemirror/mode/perl/perl.js +816 -0
  68. data/lib/ledger_web/public/codemirror/mode/php/index.html +48 -0
  69. data/lib/ledger_web/public/codemirror/mode/php/php.js +120 -0
  70. data/lib/ledger_web/public/codemirror/mode/plsql/index.html +62 -0
  71. data/lib/ledger_web/public/codemirror/mode/plsql/plsql.js +217 -0
  72. data/lib/ledger_web/public/codemirror/mode/python/LICENSE.txt +21 -0
  73. data/lib/ledger_web/public/codemirror/mode/python/index.html +122 -0
  74. data/lib/ledger_web/public/codemirror/mode/python/python.js +333 -0
  75. data/lib/ledger_web/public/codemirror/mode/r/LICENSE +24 -0
  76. data/lib/ledger_web/public/codemirror/mode/r/index.html +73 -0
  77. data/lib/ledger_web/public/codemirror/mode/r/r.js +141 -0
  78. data/lib/ledger_web/public/codemirror/mode/rpm/changes/changes.js +19 -0
  79. data/lib/ledger_web/public/codemirror/mode/rpm/changes/index.html +53 -0
  80. data/lib/ledger_web/public/codemirror/mode/rpm/spec/index.html +99 -0
  81. data/lib/ledger_web/public/codemirror/mode/rpm/spec/spec.css +5 -0
  82. data/lib/ledger_web/public/codemirror/mode/rpm/spec/spec.js +66 -0
  83. data/lib/ledger_web/public/codemirror/mode/rst/index.html +525 -0
  84. data/lib/ledger_web/public/codemirror/mode/rst/rst.js +326 -0
  85. data/lib/ledger_web/public/codemirror/mode/ruby/LICENSE +24 -0
  86. data/lib/ledger_web/public/codemirror/mode/ruby/index.html +171 -0
  87. data/lib/ledger_web/public/codemirror/mode/ruby/ruby.js +195 -0
  88. data/lib/ledger_web/public/codemirror/mode/rust/index.html +48 -0
  89. data/lib/ledger_web/public/codemirror/mode/rust/rust.js +411 -0
  90. data/lib/ledger_web/public/codemirror/mode/scheme/index.html +64 -0
  91. data/lib/ledger_web/public/codemirror/mode/scheme/scheme.js +202 -0
  92. data/lib/ledger_web/public/codemirror/mode/smalltalk/index.html +55 -0
  93. data/lib/ledger_web/public/codemirror/mode/smalltalk/smalltalk.js +139 -0
  94. data/lib/ledger_web/public/codemirror/mode/sparql/index.html +40 -0
  95. data/lib/ledger_web/public/codemirror/mode/sparql/sparql.js +143 -0
  96. data/lib/ledger_web/public/codemirror/mode/stex/index.html +95 -0
  97. data/lib/ledger_web/public/codemirror/mode/stex/stex.js +167 -0
  98. data/lib/ledger_web/public/codemirror/mode/tiddlywiki/index.html +183 -0
  99. data/lib/ledger_web/public/codemirror/mode/tiddlywiki/tiddlywiki.css +21 -0
  100. data/lib/ledger_web/public/codemirror/mode/tiddlywiki/tiddlywiki.js +374 -0
  101. data/lib/ledger_web/public/codemirror/mode/velocity/index.html +103 -0
  102. data/lib/ledger_web/public/codemirror/mode/velocity/velocity.js +146 -0
  103. data/lib/ledger_web/public/codemirror/mode/xml/index.html +44 -0
  104. data/lib/ledger_web/public/codemirror/mode/xml/xml.js +252 -0
  105. data/lib/ledger_web/public/codemirror/mode/xmlpure/index.html +59 -0
  106. data/lib/ledger_web/public/codemirror/mode/xmlpure/xmlpure.js +485 -0
  107. data/lib/ledger_web/public/codemirror/mode/yaml/index.html +67 -0
  108. data/lib/ledger_web/public/codemirror/mode/yaml/yaml.js +95 -0
  109. data/lib/ledger_web/public/codemirror/theme/cobalt.css +18 -0
  110. data/lib/ledger_web/public/codemirror/theme/eclipse.css +25 -0
  111. data/lib/ledger_web/public/codemirror/theme/elegant.css +10 -0
  112. data/lib/ledger_web/public/codemirror/theme/monokai.css +28 -0
  113. data/lib/ledger_web/public/codemirror/theme/neat.css +9 -0
  114. data/lib/ledger_web/public/codemirror/theme/night.css +21 -0
  115. data/lib/ledger_web/public/codemirror/theme/rubyblue.css +21 -0
  116. data/lib/ledger_web/public/jquery-1.7.1.min.js +4 -0
  117. data/lib/ledger_web/public/jquery.tablesorter.min.js +4 -0
  118. data/lib/ledger_web/public/ledger.css +14 -0
  119. data/lib/ledger_web/report.rb +187 -0
  120. data/lib/ledger_web/reports/savings_rate.erb +49 -0
  121. data/lib/ledger_web/version.rb +3 -0
  122. data/lib/ledger_web/views/error.erb +5 -0
  123. data/lib/ledger_web/views/help.erb +6 -0
  124. data/lib/ledger_web/views/layout.erb +44 -0
  125. data/lib/ledger_web/views/table.erb +31 -0
  126. data/lib/ledger_web/watcher.rb +37 -0
  127. data/lib/ledger_web.rb +20 -0
  128. metadata +229 -0
@@ -0,0 +1,95 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>CodeMirror: sTeX mode</title>
5
+ <link rel="stylesheet" href="../../lib/codemirror.css">
6
+ <script src="../../lib/codemirror.js"></script>
7
+ <script src="stex.js"></script>
8
+ <style>.CodeMirror {background: #f8f8f8;}</style>
9
+ <link rel="stylesheet" href="../../doc/docs.css">
10
+ </head>
11
+ <body>
12
+ <h1>CodeMirror: sTeX mode</h1>
13
+ <form><textarea id="code" name="code">
14
+ \begin{module}[id=bbt-size]
15
+ \importmodule[balanced-binary-trees]{balanced-binary-trees}
16
+ \importmodule[\KWARCslides{dmath/en/cardinality}]{cardinality}
17
+
18
+ \begin{frame}
19
+ \frametitle{Size Lemma for Balanced Trees}
20
+ \begin{itemize}
21
+ \item
22
+ \begin{assertion}[id=size-lemma,type=lemma]
23
+ Let $G=\tup{V,E}$ be a \termref[cd=binary-trees]{balanced binary tree}
24
+ of \termref[cd=graph-depth,name=vertex-depth]{depth}$n>i$, then the set
25
+ $\defeq{\livar{V}i}{\setst{\inset{v}{V}}{\gdepth{v} = i}}$ of
26
+ \termref[cd=graphs-intro,name=node]{nodes} at
27
+ \termref[cd=graph-depth,name=vertex-depth]{depth} $i$ has
28
+ \termref[cd=cardinality,name=cardinality]{cardinality} $\power2i$.
29
+ \end{assertion}
30
+ \item
31
+ \begin{sproof}[id=size-lemma-pf,proofend=,for=size-lemma]{via induction over the depth $i$.}
32
+ \begin{spfcases}{We have to consider two cases}
33
+ \begin{spfcase}{$i=0$}
34
+ \begin{spfstep}[display=flow]
35
+ then $\livar{V}i=\set{\livar{v}r}$, where $\livar{v}r$ is the root, so
36
+ $\eq{\card{\livar{V}0},\card{\set{\livar{v}r}},1,\power20}$.
37
+ \end{spfstep}
38
+ \end{spfcase}
39
+ \begin{spfcase}{$i>0$}
40
+ \begin{spfstep}[display=flow]
41
+ then $\livar{V}{i-1}$ contains $\power2{i-1}$ vertexes
42
+ \begin{justification}[method=byIH](IH)\end{justification}
43
+ \end{spfstep}
44
+ \begin{spfstep}
45
+ By the \begin{justification}[method=byDef]definition of a binary
46
+ tree\end{justification}, each $\inset{v}{\livar{V}{i-1}}$ is a leaf or has
47
+ two children that are at depth $i$.
48
+ \end{spfstep}
49
+ \begin{spfstep}
50
+ As $G$ is \termref[cd=balanced-binary-trees,name=balanced-binary-tree]{balanced} and $\gdepth{G}=n>i$, $\livar{V}{i-1}$ cannot contain
51
+ leaves.
52
+ \end{spfstep}
53
+ \begin{spfstep}[type=conclusion]
54
+ Thus $\eq{\card{\livar{V}i},{\atimes[cdot]{2,\card{\livar{V}{i-1}}}},{\atimes[cdot]{2,\power2{i-1}}},\power2i}$.
55
+ \end{spfstep}
56
+ \end{spfcase}
57
+ \end{spfcases}
58
+ \end{sproof}
59
+ \item
60
+ \begin{assertion}[id=fbbt,type=corollary]
61
+ A fully balanced tree of depth $d$ has $\power2{d+1}-1$ nodes.
62
+ \end{assertion}
63
+ \item
64
+ \begin{sproof}[for=fbbt,id=fbbt-pf]{}
65
+ \begin{spfstep}
66
+ Let $\defeq{G}{\tup{V,E}}$ be a fully balanced tree
67
+ \end{spfstep}
68
+ \begin{spfstep}
69
+ Then $\card{V}=\Sumfromto{i}1d{\power2i}= \power2{d+1}-1$.
70
+ \end{spfstep}
71
+ \end{sproof}
72
+ \end{itemize}
73
+ \end{frame}
74
+ \begin{note}
75
+ \begin{omtext}[type=conclusion,for=binary-tree]
76
+ This shows that balanced binary trees grow in breadth very quickly, a consequence of
77
+ this is that they are very shallow (and this compute very fast), which is the essence of
78
+ the next result.
79
+ \end{omtext}
80
+ \end{note}
81
+ \end{module}
82
+
83
+ %%% Local Variables:
84
+ %%% mode: LaTeX
85
+ %%% TeX-master: "all"
86
+ %%% End: \end{document}
87
+ </textarea></form>
88
+ <script>
89
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
90
+ </script>
91
+
92
+ <p><strong>MIME types defined:</strong> <code>text/stex</code>.</p>
93
+
94
+ </body>
95
+ </html>
@@ -0,0 +1,167 @@
1
+ /*
2
+ * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de)
3
+ * Licence: MIT
4
+ */
5
+
6
+ CodeMirror.defineMode("stex", function(cmCfg, modeCfg)
7
+ {
8
+ function pushCommand(state, command) {
9
+ state.cmdState.push(command);
10
+ }
11
+
12
+ function peekCommand(state) {
13
+ if (state.cmdState.length>0)
14
+ return state.cmdState[state.cmdState.length-1];
15
+ else
16
+ return null;
17
+ }
18
+
19
+ function popCommand(state) {
20
+ if (state.cmdState.length>0) {
21
+ var plug = state.cmdState.pop();
22
+ plug.closeBracket();
23
+ }
24
+ }
25
+
26
+ function applyMostPowerful(state) {
27
+ var context = state.cmdState;
28
+ for (var i = context.length - 1; i >= 0; i--) {
29
+ var plug = context[i];
30
+ if (plug.name=="DEFAULT")
31
+ continue;
32
+ return plug.styleIdentifier();
33
+ }
34
+ return null;
35
+ }
36
+
37
+ function addPluginPattern(pluginName, cmdStyle, brackets, styles) {
38
+ return function () {
39
+ this.name=pluginName;
40
+ this.bracketNo = 0;
41
+ this.style=cmdStyle;
42
+ this.styles = styles;
43
+ this.brackets = brackets;
44
+
45
+ this.styleIdentifier = function(content) {
46
+ if (this.bracketNo<=this.styles.length)
47
+ return this.styles[this.bracketNo-1];
48
+ else
49
+ return null;
50
+ };
51
+ this.openBracket = function(content) {
52
+ this.bracketNo++;
53
+ return "bracket";
54
+ };
55
+ this.closeBracket = function(content) {
56
+ };
57
+ }
58
+ }
59
+
60
+ var plugins = new Array();
61
+
62
+ plugins["importmodule"] = addPluginPattern("importmodule", "tag", "{[", ["string", "builtin"]);
63
+ plugins["documentclass"] = addPluginPattern("documentclass", "tag", "{[", ["", "atom"]);
64
+ plugins["usepackage"] = addPluginPattern("documentclass", "tag", "[", ["atom"]);
65
+ plugins["begin"] = addPluginPattern("documentclass", "tag", "[", ["atom"]);
66
+ plugins["end"] = addPluginPattern("documentclass", "tag", "[", ["atom"]);
67
+
68
+ plugins["DEFAULT"] = function () {
69
+ this.name="DEFAULT";
70
+ this.style="tag";
71
+
72
+ this.styleIdentifier = function(content) {
73
+ };
74
+ this.openBracket = function(content) {
75
+ };
76
+ this.closeBracket = function(content) {
77
+ };
78
+ };
79
+
80
+ function setState(state, f) {
81
+ state.f = f;
82
+ }
83
+
84
+ function normal(source, state) {
85
+ if (source.match(/^\\[a-z]+/)) {
86
+ var cmdName = source.current();
87
+ cmdName = cmdName.substr(1, cmdName.length-1);
88
+ var plug = plugins[cmdName];
89
+ if (typeof(plug) == 'undefined') {
90
+ plug = plugins["DEFAULT"];
91
+ }
92
+ plug = new plug();
93
+ pushCommand(state, plug);
94
+ setState(state, beginParams);
95
+ return plug.style;
96
+ }
97
+
98
+ var ch = source.next();
99
+ if (ch == "%") {
100
+ setState(state, inCComment);
101
+ return "comment";
102
+ }
103
+ else if (ch=='}' || ch==']') {
104
+ plug = peekCommand(state);
105
+ if (plug) {
106
+ plug.closeBracket(ch);
107
+ setState(state, beginParams);
108
+ } else
109
+ return "error";
110
+ return "bracket";
111
+ } else if (ch=='{' || ch=='[') {
112
+ plug = plugins["DEFAULT"];
113
+ plug = new plug();
114
+ pushCommand(state, plug);
115
+ return "bracket";
116
+ }
117
+ else if (/\d/.test(ch)) {
118
+ source.eatWhile(/[\w.%]/);
119
+ return "atom";
120
+ }
121
+ else {
122
+ source.eatWhile(/[\w-_]/);
123
+ return applyMostPowerful(state);
124
+ }
125
+ }
126
+
127
+ function inCComment(source, state) {
128
+ source.skipToEnd();
129
+ setState(state, normal);
130
+ return "comment";
131
+ }
132
+
133
+ function beginParams(source, state) {
134
+ var ch = source.peek();
135
+ if (ch == '{' || ch == '[') {
136
+ var lastPlug = peekCommand(state);
137
+ var style = lastPlug.openBracket(ch);
138
+ source.eat(ch);
139
+ setState(state, normal);
140
+ return "bracket";
141
+ }
142
+ if (/[ \t\r]/.test(ch)) {
143
+ source.eat(ch);
144
+ return null;
145
+ }
146
+ setState(state, normal);
147
+ lastPlug = peekCommand(state);
148
+ if (lastPlug) {
149
+ popCommand(state);
150
+ }
151
+ return normal(source, state);
152
+ }
153
+
154
+ return {
155
+ startState: function() { return { f:normal, cmdState:[] }; },
156
+ copyState: function(s) { return { f: s.f, cmdState: s.cmdState.slice(0, s.cmdState.length) }; },
157
+
158
+ token: function(stream, state) {
159
+ var t = state.f(stream, state);
160
+ var w = stream.current();
161
+ return t;
162
+ }
163
+ };
164
+ });
165
+
166
+
167
+ CodeMirror.defineMIME("text/x-stex", "stex");
@@ -0,0 +1,183 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>CodeMirror: TiddlyWiki mode</title>
5
+ <link rel="stylesheet" href="../../lib/codemirror.css">
6
+ <script src="../../lib/codemirror.js"></script>
7
+ <script src="tiddlywiki.js"></script>
8
+ <link rel="stylesheet" href="tiddlywiki.css">
9
+ <link rel="stylesheet" href="../../doc/docs.css">
10
+ <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
11
+ </head>
12
+ <body>
13
+ <h1>CodeMirror: TiddlyWiki mode</h1>
14
+
15
+ <div><textarea id="code" name="code">
16
+ !TiddlyWiki Formatting
17
+ * Rendered versions can be found at: http://www.tiddlywiki.com/#Reference
18
+
19
+ |!Option|!Syntax|!Output|
20
+ |bold font|{{{''bold''}}}|''bold''|
21
+ |italic type|{{{//italic//}}}|//italic//|
22
+ |underlined text|{{{__underlined__}}}|__underlined__|
23
+ |strikethrough text|{{{--strikethrough--}}}|--strikethrough--|
24
+ |superscript text|{{{^^super^^script}}}|^^super^^script|
25
+ |subscript text|{{{~~sub~~script}}}|~~sub~~script|
26
+ |highlighted text|{{{@@highlighted@@}}}|@@highlighted@@|
27
+ |preformatted text|<html><code>{{{preformatted}}}</code></html>|{{{preformatted}}}|
28
+
29
+ !Block Elements
30
+ !!Headings
31
+ {{{
32
+ !Heading 1
33
+ !!Heading 2
34
+ !!!Heading 3
35
+ !!!!Heading 4
36
+ !!!!!Heading 5
37
+ }}}
38
+ <<<
39
+
40
+ !Heading 1
41
+
42
+ !!Heading 2
43
+
44
+ !!!Heading 3
45
+
46
+ !!!!Heading 4
47
+
48
+ !!!!!Heading 5
49
+ <<<
50
+
51
+ !!Lists
52
+ {{{
53
+ * unordered list, level 1
54
+ ** unordered list, level 2
55
+ *** unordered list, level 3
56
+
57
+ # ordered list, level 1
58
+ ## ordered list, level 2
59
+ ### unordered list, level 3
60
+
61
+ ; definition list, term
62
+ : definition list, description
63
+ }}}
64
+ <<<
65
+ * unordered list, level 1
66
+ ** unordered list, level 2
67
+ *** unordered list, level 3
68
+
69
+ # ordered list, level 1
70
+ ## ordered list, level 2
71
+ ### unordered list, level 3
72
+
73
+ ; definition list, term
74
+ : definition list, description
75
+ <<<
76
+
77
+ !!Blockquotes
78
+ {{{
79
+ > blockquote, level 1
80
+ >> blockquote, level 2
81
+ >>> blockquote, level 3
82
+
83
+ <<<
84
+ blockquote
85
+ <<<
86
+ }}}
87
+ <<<
88
+ > blockquote, level 1
89
+ >> blockquote, level 2
90
+ >>> blockquote, level 3
91
+
92
+ > blockquote
93
+ <<<
94
+
95
+ !!Preformatted Text
96
+ <html><pre>
97
+ {{{
98
+ preformatted (e.g. code)
99
+ }}}
100
+ </pre></html>
101
+ <<<
102
+ {{{
103
+ preformatted (e.g. code)
104
+ }}}
105
+ <<<
106
+
107
+ !!Code Sections
108
+ {{{
109
+ Text style code
110
+ }}}
111
+
112
+ //{{{
113
+ JS styled code. TiddlyWiki mixed mode should support highlighter switching in the future.
114
+ //}}}
115
+
116
+ <!--{{{-->
117
+ XML styled code. TiddlyWiki mixed mode should support highlighter switching in the future.
118
+ <!--}}}-->
119
+
120
+ !!Tables
121
+ {{{
122
+ |CssClass|k
123
+ |!heading column 1|!heading column 2|
124
+ |row 1, column 1|row 1, column 2|
125
+ |row 2, column 1|row 2, column 2|
126
+ |>|COLSPAN|
127
+ |ROWSPAN| ... |
128
+ |~| ... |
129
+ |CssProperty:value;...| ... |
130
+ |caption|c
131
+ }}}
132
+ ''Annotation:''
133
+ * The {{{>}}} marker creates a "colspan", causing the current cell to merge with the one to the right.
134
+ * The {{{~}}} marker creates a "rowspan", causing the current cell to merge with the one above.
135
+ <<<
136
+ |CssClass|k
137
+ |!heading column 1|!heading column 2|
138
+ |row 1, column 1|row 1, column 2|
139
+ |row 2, column 1|row 2, column 2|
140
+ |>|COLSPAN|
141
+ |ROWSPAN| ... |
142
+ |~| ... |
143
+ |CssProperty:value;...| ... |
144
+ |caption|c
145
+ <<<
146
+ !!Images /% TODO %/
147
+ cf. [[TiddlyWiki.com|http://www.tiddlywiki.com/#EmbeddedImages]]
148
+
149
+ !Hyperlinks
150
+ * [[WikiWords|WikiWord]] are automatically transformed to hyperlinks to the respective tiddler
151
+ ** the automatic transformation can be suppressed by preceding the respective WikiWord with a tilde ({{{~}}}): {{{~WikiWord}}}
152
+ * [[PrettyLinks]] are enclosed in square brackets and contain the desired tiddler name: {{{[[tiddler name]]}}}
153
+ ** optionally, a custom title or description can be added, separated by a pipe character ({{{|}}}): {{{[[title|target]]}}}<br>'''N.B.:''' In this case, the target can also be any website (i.e. URL).
154
+
155
+ !Custom Styling
156
+ * {{{@@CssProperty:value;CssProperty:value;...@@}}}<br>''N.B.:'' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.
157
+ * <html><code>{{customCssClass{...}}}</code></html>
158
+ * raw HTML can be inserted by enclosing the respective code in HTML tags: {{{<html> ... </html>}}}
159
+
160
+ !Special Markers
161
+ * {{{<br>}}} forces a manual line break
162
+ * {{{----}}} creates a horizontal ruler
163
+ * [[HTML entities|http://www.tiddlywiki.com/#HtmlEntities]]
164
+ * [[HTML entities local|HtmlEntities]]
165
+ * {{{<<macroName>>}}} calls the respective [[macro|Macros]]
166
+ * To hide text within a tiddler so that it is not displayed, it can be wrapped in {{{/%}}} and {{{%/}}}.<br/>This can be a useful trick for hiding drafts or annotating complex markup.
167
+ * To prevent wiki markup from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. {{{"""WikiWord"""}}}.
168
+ </textarea></div>
169
+
170
+ <script>
171
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
172
+ mode: 'tiddlywiki',
173
+ lineNumbers: true,
174
+ enterMode: 'keep',
175
+ matchBrackets: true
176
+ });
177
+ </script>
178
+
179
+ <p>TiddlyWiki mode supports a single configuration.</p>
180
+
181
+ <p><strong>MIME types defined:</strong> <code>text/x-tiddlywiki</code>.</p>
182
+ </body>
183
+ </html>
@@ -0,0 +1,21 @@
1
+ .cm-s-default span.cm-header {color: blue; font-weight:bold;}
2
+ .cm-s-default span.cm-code {color: #a50;}
3
+ .cm-s-default span.cm-code-inline {color: #660;}
4
+
5
+ .cm-s-default span.cm-quote {color: #555;}
6
+ .cm-s-default span.cm-list {color: #c60;}
7
+ .cm-s-default span.cm-hr {color: #999;}
8
+ .cm-s-default span.cm-em {font-style: italic;}
9
+ .cm-s-default span.cm-strong {font-weight: bold;}
10
+
11
+ .cm-s-default span.cm-link-external {color: blue;}
12
+ .cm-s-default span.cm-brace {color: #170; font-weight: bold;}
13
+ .cm-s-default span.cm-macro {color: #9E3825;}
14
+ .cm-s-default span.cm-table {color: blue;}
15
+ .cm-s-default span.cm-warning {color: red; font-weight: bold;}
16
+
17
+ .cm-s-default span.cm-underlined {text-decoration: underline;}
18
+ .cm-s-default span.cm-line-through {text-decoration: line-through;}
19
+
20
+ .cm-s-default span.cm-comment {color: #666;}
21
+