SemanticNovel
is markup format for TypeNovel to write novel with plenty of semantic context informations.
- Every semantic value that is
'?'
is not validated by TypeNovel compiler and treated asundefined
value in reader app.
@scene({
time: '?' // time is ambigous and secret to reader app.
}){
// time is not annotated in body field, but it's not an error.
}
- Every semantic value starts with
'?'
is validated by TypeNovel compiler but treated asundefined
value in reader app.
@scene({
time: '?23:30' // time is 23:30, but keep it secret to reader app.
}){
// Time constraint must be annotated in body field, otherwise it's an error.
$time("The night") has come.
}
This is usefull when you want to annotate some constraint, but keep the value ambigous to readers or ui of reader app.
Note that constraint value '?'
in TypeNovel is not validation target of annotation, but constraint value that starts with '?'(like ?23:00
) is validation target of annotation.
You can see all markup definition in DefaultTnConfig
in settings.ts.
@scens(<constraints>){ <scene-body> }
Markup to write some scene with some constraints.
@scene({
place: "Japan",
season: "summer"
}){
@scene({
date: "8/1"
}){
@scene({
time: "9:00"
}){
$time("good morning!")
}
@scene({
time: "12:00"
}){
$time("lunch time!")
}
@scene({
time: "22:00"
}){
$time("good night!")
}
} // date:"8/1"
} // place:"Japan", season:"summer"
value: '00:00'
- 23:00
@scene({time:"09:00"}){ $time() }
value: spring
| summer
| autumn
| winter
@scene({season:"summer"}){ $time() }
value: 01/01
- 12/31
@speak(<character-key>){ <speech-text-body> }
Markup for writing speech text.
character-key
must be defined in data.json
(See External Data Scheme section).
@speak('Michael Jackson'){ This is it! }
In TypeNovelReader, this is displayed like this.
@sb-start(<character-key>, <image-key>){ <speech-text-body> }
Markup for writing speech text with speech-bubble and avatar image.
character-key
and image-key
must be defined in data.json
(See External Data Scheme section).
@sb-start
is displayed by [avatar, speech-bubble] order.
@sb-end
is displayed by [speech-bubble, avatar] order.
@sb-start('Michael', 'excited'){ FOOooOOOoo!! }
@sb-end('Jackson', 'crazy'){ Poooooooo!! }
In TypeNovelReader, this is displayed like this.
Markup to write some tip
content.
@tip("IMO"){ Abbreviation of 'In My Opinion' }, it's correct.
Markup to write some notes
(footnote) content.
This game is inspired by "街" @notes(){ 1998 Chunsoft.inc }
Inline markup to write ruby
in CJK text.
$ruby("漢字", "かんじ")
Inline markup to write tate-chu-yoko
in vertical
writing-mode.
あのソフトは$tcy("UI")が素晴らしい。
External data is stored as data.json
.
Usually, this data is used by reader app of TypeNovel.
{
"title": "Sample Novel",
"author": "foo bar",
"email": "[email protected]",
"homepage": "https://foo.bar.com",
"writingMode": "vertical-rl",
"displayTypeNovelError": true,
"enableSemanticUI": true,
"speechAvatarSize": 50,
"characters": {
"john": {
"names": ["John", "Adams"],
"images": {
"normal": "images/avatar2.svg"
},
"description": "Desription of John Adams"
},
"taro": {
"names": ["山田", "太郎"],
"images": {
"normal": "images/avatar1.svg"
},
"description": "山田太郎の詳細をここに書く"
}
}
}
Title of the novel.
Author of the novel.
Email address of author.
Homepage address of author(or novel).
Writing mode of novel. vertical-rl
or horizontal-tb
is supported.
Whether reader app displays the error of TypeNovel.
Whether reader app enables semantic info on reader UI.
Avatar size of @sb-start
or @sb-end
tag.
Characters of novel.
"characters": {
"john": {
"names": ["John", "Adams"],
"images": {
"normal": "images/avatar2.svg"
},
"description": "Desription of John Adams"
},
"taro": {
"names": ["山田", "太郎"],
"images": {
"normal": "images/avatar1.svg"
},
"description": "山田太郎の詳細をここに書く"
}
}
first name
, family name
array.
Order is not specified (both [family name
, first name
] and [first name
, family name
] are OK).
Description of character.
Images of character. Each images is referenced by imageKey
.
For example, image path(images/avatar1.svg
) is referenced by imageKey(normal
) in taro.images
.