Much more text.

This commit is contained in:
Niels Serup
2011-08-01 22:39:41 +02:00
parent aae339084f
commit d1b8234f78
41 changed files with 1131 additions and 48 deletions

View File

@@ -147,7 +147,7 @@ Quote without citing: =a^2+b^2=c^2&quote=.
Cite without quoting: =http://en.wikipedia.org/&cite=.
Quote and cite: ={metanohi exists}&cite=http://metanohi.org/=.
Quote and cite: ={metanohi exists}&cite=http://metanohi.name/=.
HTML equivalent:
#+BEGIN_SRC html

View File

@@ -1,10 +1,10 @@
#+title: mege
#&summary
mege the metanohi generator
mege is the generator used by metanohi
#&
#+license: bysa
* mege the metanohi generator
* mege
+ [[./tests/][Tests]]
+ [[./docs/][Documentation]]
@@ -12,3 +12,9 @@ mege the metanohi generator
Both are works in progress, like mege. Note that the author of mege does
believe in good documentation. And while believing is not the same as doing,
good mege documentation /will/ exist at some point in the near future.
* Download
No release is out yet. You can clone the current code with git:
: $ git clone git://metanohi.name/mege

View File

@@ -0,0 +1,9 @@
#+title: Test of mege audio
#+license: bysa
#+summary: How to show audio in mege
* Test of mege audio
#&audio;url=test2.ogg
([[http://commons.wikimedia.org/wiki/File:Polish_Tongue_twister_-_Korale.ogg]], CC BY-SA)

View File

@@ -18,7 +18,7 @@ This is a *paragraph* with the last word *strongly* /emphasized/. _This_ is
underlined. _/*The effects*/ can /be/ combined_. Press -C-n- to scroll down if
your web browser is Conkeror (-Ctrl+N- in non-emacs speak).
Type this: =$ echo echo=.
Type this: =$ echo echo=
** Extended inline formatting
@@ -26,11 +26,11 @@ mege uses postfix operators for less essential inline formatting.
More&strong strong text&samp. And even acronyms and abbreviations:
GNU&acro="GNU's not UNIX" and MF&abbr="Medlem af Folketinget". {Other
colors}&color=red and {other sizes}&small as well, {{and also}&color=green
combinations}&large.
colors}&color=red and {other sizes}&small as well, {and {also
(really)}&color=green combinations}&large.
Now subtract y&var from x&var - 2^{32}. And a definition: {An integer above 0
is above -1_{a number}}&dfn.
is above -1_{a number}}&dfn. {Typewriter *text*}&tt.
** Lists
@@ -158,6 +158,16 @@ introduction by the Master of Falsefulness
x_{tallyho} = 33^{12}, escaped: x_\{tallyho} = 33^\{12}
** Math
Inline: $2\neq3$, block:
#&math
\begin{align*}
\frac{dy}{dx} = 2x
\end{align*}
#&
** Code
: ver *ba* tim
@@ -195,3 +205,4 @@ Inline HTML: <@html <strong>strong text</strong>@>. Smiley: '_~
41. 2+2=4
#+END_SRC
And more.

View File

@@ -9,3 +9,106 @@ Code in mege
While the <@eval macros.titlelink('basics')@> does include code,
this test contains more. And all of it's different.
** Shown, but not highlighted
*** Without formatting
Inline: =while [ 1 ] ; do echo y ; done=, simple.
: echo Hello
: if hello:
: print('Hello')
: wget *url*
#+BEGIN_SRC
cond = source and not highlighted
#+END_SRC
*** With formatting
#++pre
: wget *url*
#&pre
*Preformatted* but still [[http://en.wikipedia.org/wiki/Monospace][monospace]]
<strong>{Escaped}&strong!</strong>
#&
#++pre
#+BEGIN_SRC
*Preformatted* but still [[http://en.wikipedia.org/wiki/Monospace][monospace]]
<em>{Escaped}&emph!</em>
#+END_SRC
Inline: =while [ 1 ] ; /do/ echo y ; done=&tt, messy.
** Shown and highlighted
#++sh
: x=32
: echo $x
#+BEGIN_SRC python
cond = source and highligted
print(cond)
#+END_SRC
Inline: =<p>abc</p>=&html.
** HTML
#+BEGIN_SRC html
<div style='margin-left: 20px' id='tempobj'>au</div>
#+END_SRC
The above code equals:
#++show
#+BEGIN_SRC html
<div style='margin-left: 20px' id='tempobj'>au</div>
#+END_SRC
Inline HTML: <@html <strong>strong text</strong>@>.
** JavaScript, CSS
#+BEGIN_SRC javascript
window.addEventListener('load', function(event){
tempobj = document.getElementById('tempobj');
tempobj.addEventListener(
'click', function(event){tempobj.innerHTML += 'A';}, false);
}, false);
#+END_SRC
# Make mege load it
#++show
#+BEGIN_SRC javascript
window.addEventListener('load', function(event){
tempobj = document.getElementById('tempobj');
tempobj.addEventListener(
'click', function(event){tempobj.innerHTML += 'A';}, false);
}, false);
#+END_SRC
** Eval'd Code
Inline code: =<@eval 2 + 3@>= = <@eval 2 + 3@>.
Inline code:
#&-eval
2 + 3
#&
Block code:
#&paragraph
#++eval
#+BEGIN_SRC python
2 + 3
#+END_SRC
#&paragraph
#++dexec
#+BEGIN_SRC python
print('<em>Date</em>:', datetime.datetime.utcnow())
#+END_SRC

View File

@@ -16,6 +16,7 @@ have been created:
+ [[math][Math]]
+ [[code][Code]]
+ [[video][Video]]
+ [[audio][Audio]]
Perhaps /mege/ will grow and come near to perfection one day.

View File

@@ -9,3 +9,31 @@ Math in mege
While the <@eval macros.titlelink('basics', page.pathdir)@> does include math,
this test contains more. And all of it's different.
** Inline
Blah: $2+2$
** Block, way #1
#&math
\begin{align*}
\sqrt{\sqrt{32x} + 14y} = 31
\end{align*}
#&
** Block, way #2
#+BEGIN_SRC latex
\begin{align*}
a^p \equiv a \mod p, a \in Z, p \text{ is prime}
\end{align*}
#+END_SRC
** Block, way #2, highlighted
#++high
#+BEGIN_SRC latex
\begin{align*}
a^p \equiv a \mod p, a \in Z, p \text{ is prime}
\end{align*}
#+END_SRC

View File

@@ -6,9 +6,66 @@ Tables in mege
* Test of mege tables
While the <@eval macros.titlelink('basics', page.pathdir)@> does include
While the <@eval macros.titlelink('basics')@> does include
tables, this test contains more. And they're all different.
* Basic table
** Basic table
| Name | Age |
| Xryurg | 300 |
| Bkrau | 2 |
** With header
| Name | Age |
|--------+-----|
| Xryurg | 300 |
| Bkrau | 2 |
** With header and footer
| Name | Age |
|--------+-----|
| Xryurg | 300 |
| Bkrau | 2 |
|--------+-----|
| Name | Age |
** Inline formatting in table
| URL | Exists |
|-----------------+--------|
| [[example.com]] | *Yes* |
| [[abc.example.com]] | /No/ |
** Complex table
| Number | Target | Measured | Deviation |
|--------+--------+----------+---------------|
| 0 | 697 | 694 | 0.43 `percent |
| 1 | 697 | 694 | 0.43 `percent |
| 2 | 697 | 692 | 0.72 `percent |
| 3 | 770 | 764 | 0.78 `percent |
| 4 | 770 | 762 | 1.04 `percent |
| 5 | 770 | 762 | 1.04 `percent |
| 6 | 852 | 844 | 0.94 `percent |
| 7 | 852 | 844 | 0.94 `percent |
| 8 | 852 | 844 | 0.94 `percent |
| 9 | 941 | 930 | 1.17 `percent |
| A | 941 | 929 | 1.28 `percent |
| B | 941 | 929 | 1.28 `percent |
| C | 697 | 704 | 1.00 `percent |
| D | 770 | 776 | 0.78 `percent |
| E | 852 | 844 | 0.94 `percent |
| F | 941 | 946 | 0.53 `percent |
#+TBLFM: $4=abs($3-$2)/$2 %;%.2f `percent
** Escaped table
\| A | B |
| B | C |
** Over-escaped tables
\\| O |
\\\| P |

Binary file not shown.

Binary file not shown.

View File

@@ -4,3 +4,6 @@
* Test of mege video
#&video;url=test1.ogv,width=640,height=480,autoplay
([[http://films.metanohi.name/compufight][Compufight]], CC BY-SA)