Some Simple TapirMD Demos
This page presents a few simple demos using TapirMD. For detailed explanations, please refer to the specification.
- Demo 1 (span styles)
- Demo 2 (line leading marks)
- Demo 3 (link definitions)
- Demo 4 (built-in containers)
- Demo 5 (table)
- Demo 6 (atom blocks)
- Demo 7 (line end spacing)
- Demo 8 (character escaping)
Demo 1 (span styles)
**bold text** and ^**dimmed text**. //italic text// and ^//revert italic text//. ::smaller font size:: and ^::larger font size::. ~~deleted text~~ and invisible text: ^~~invisible text~~ (non-selectable, still occupy space). ||marked text|| and ^||marked text with mistake smell||. $$subscript$$ and ^$$superscript$$. This is __a self-defined link``https://go101.org__, this is __a broken link__, and this is ^__an underlined text__. This is a code span: ` var z = foo::x || bar::y `. And this is a mono font text span: ^` var z = x$$ 2 $$ + y^$$ n $$`.
bold text and dimmed text.
italic text and revert italic text.
smaller font size and larger font size.
deleted text and invisible text: invisible text (non-selectable, still occupy space).
marked text and marked text with mistake smell.
subscript and superscript.
This is a code span:
var z = foo::x || bar::y. And this is a mono font text span: var z = x2 + yn.
Demo 2 (line leading marks)
A comment line is between the following two words: foo %% comment text bar. This block \\ is \\ line-broken \\ several times. \\ The following is an image. The answer is: ?? 997 (visible when selected). && ./static/image/tmd.png Line-height image: `` && ./static/image/tmd.png
A comment line is between the following two words: foo bar.
This block
is
line-broken
several times.
The following is an image.
is
line-broken
several times.
The following is an image.
The answer is: 997 (visible when selected).
Line-height image:
Demo 3 (link definitions)
=== Go 101 website :: https://go101.org
Visit __Go 101 website__ (the link is defined above).
Go 1.22 broke backwards compatibility. More information
is on __`for` Loop Semantic Changes in Go 1.22:
Be Aware of the Impact__ (the link is defined below).
=== for Loop...
https://go101.org/blog/2024-03-01-for-loop-semantic-changes-in-go-1.22.html
__No Safe Efficient Ways to Do Three-way String Comparisons in Go__
(the link is defined below).
=== ...in Go
https://go101.org/blog/2022-10-01-three-way-string-comparison.html
Visit Go 101 website (the link is defined above).
Go 1.22 broke backwards compatibility. More information is on
for Loop Semantic Changes in Go 1.22: Be Aware of the Impact (the link is defined below).
No Safe Efficient Ways to Do Three-way String Comparisons in Go (the link is defined below).
Demo 4 (built-in containers)
*. This is a 1st-level list item (ordered)..
{
- This is a 2nd-level list item
- This is another 2nd-level list item.
}
This is still in the 1st-level list item.
*. This is another 1st-level list item (ordered).
The following is a definition list:
: ### Term 1
;;; Explanations of term 1.
: ### Term 2
;;; Explanations of term 2.
. // force ending of a container
* ### Tab 1
;;; Content of tab 1.
{
Another definition list:
:. ### Zig
;;; A programming language optimized for performance
and featuring a robust metaprogramming system.
:. ### Go
;;; A statically-typed programming language with
dynamic language flexibility and moderate performance.
}
* ### Tab 2
;;; Content of tab 2.
;;;
&& ./static/image/tmd.png
> This is a quotation text.
;;; a footer
@@@
> ### This is a quotation block which font looks larger.
{
footer line 1
\\ footer line 2
}
@@@
! This is a callout box without header.
! ### WARNING!
{
This is a callout box with header.
}
? This is a reveal box without summary.
? ### Why TapirMD?
{
Because traditional markdown formats
have many ambiguities and not powerful enough.
}
-
This is a 1st-level list item (ordered)..
-
This is a 2nd-level list item
-
This is another 2nd-level list item.
This is still in the 1st-level list item. -
-
This is another 1st-level list item (ordered). The following is a definition list:
- Term 1
-
Explanations of term 1.
- Term 2
-
Explanations of term 2.
force ending of a container
Content of tab 1.
Another definition list:
- Zig
-
A programming language optimized for performance and featuring a robust metaprogramming system.
- Go
-
A statically-typed programming language with dynamic language flexibility and moderate performance.
Content of tab 2.
This is a quotation text.
This is a quotation block which font looks larger.
This is a callout box without header.
WARNING!
This is a callout box with header.
This is a reveal box without summary.
Why TapirMD?
Because traditional markdown formats have many ambiguities and not powerful enough.
Demo 5 (table)
A table (row-major):
# ;;; 11
{ ..2:2
22
}
{ ..2:1
21
}
-----
;;; 11
{ :3
13
}
;;; 11
---------
{ ..4
31
}
{ ..1:2
12
}
---------
;;; 11
;;; 11
;;; 11
Another table (column-major):
#
;;; 11
{ ..2:2
22
}
{ ..2:1
21
}
-----
;;; 11
{ :3
13
}
;;; 11
---------
{ ..4
31
}
{ ..1:2
12
}
---------
;;; 11
;;; 11
;;; 11
A table (row-major):
|
11
|
22
|
21
|
||
|
11
|
13
|
11
|
||
|
31
|
12
|
|||
|
11
|
11
|
11
|
||
Another table (column-major):
|
11
|
11
|
31
|
11
|
|
22
|
11
|
||
|
11
|
|||
|
21
|
13
|
||
|
11
|
12
|
||
Demo 6 (atom blocks)
####### Header 1 //::(for titles generally)
###====== Header 2
###++++++ Header 3
###------ Header 4
This is a usual block. Nothing special.
;;; This is also a usual block.
The below is a horizontal line.
---
@@@ This is an attributes block.
@@@ The texts here must be of
@@@ certain formats to be meaningful.
@@@ We can specify ID and classes
@@@ for the next sibling block here.
. ### code-snippet-1.zig
@@@ #code-snippet-1
''' zig
const std = @import("std");
pub fn main() void {
std.log.info("TMD, yes!", .{});
}
'''
Header 1 (for titles generally)
Header 2
Header 3
Header 4
This is a usual block. Nothing special.
This is also a usual block. The below is a horizontal line.
code-snippet-1.zig
const std = @import("std");
pub fn main() void {
std.log.info("TMD, yes!", .{});
}
Demo 7 (line end spacing)
hello world hello`` world hello ``world 你好 世界 你好 `` 世界 hello 世界 hello `` 世界 hello `` 世界
hello world
helloworld
helloworld
你好世界
你好 世界
hello世界
hello 世界
hello 世界
Demo 8 (character escaping)
*``* all marks /``/ are escaped *``* ^````. !! ** all marks // are escaped ** ``. Backticks in code span: `^``code^``` Backticks in code span: ` !! `code` ` `` ! This is not a **callout box**. `` %% This is not a //comment line//.
** all marks // are escaped ** ``.
** all marks // are escaped ** ``.
Backticks in code span:
`code`
Backticks in code span:
`code`
! This is not a callout box.
%% This is not a comment line.