Mawe head info explained #105
mkoskim
started this conversation in
Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
File structure
Currently, mawe file format is following:
It is intended, that one story has (1) one
<body>
, the draft of your story you are currently working on, and (2) one<notes>
, notes covering this particular story, shared by all other possible drafts (versions) you may have for your story. Versioning is a thing that is currently not supported and needs some considerations, how to really do it. On the other hand it would be great to have instant access to older versions, on the other hand it is safer to keep them as separate files.Body structure
Body has one
<head>
element, and many<part>
elements:Head content
The (current) story head (story.body.head) contains meta information about the (current) draft.
Story title
There is three elements assigned to story title - story name, head title and subtitle:
In the file, name located in the
<story>
element. When loading file, it is moved to head element, and when writing, the story gets its name attribute from head element.The name of the story is its workname. In very early phase, you call your story by some quite obscure names. For example, one of my colleagues name her stories like "blue", "pink", "red", "black". My story worknames are like "Arthur in space", "Bertta 2020" and so on.
Once the story is more complete, you start to think its title, the name which it will be called when published. We still want to retain its early workname. That's why title elements (title and subtitle) are separated.
The rule is that if the story has explicit title, export uses that. If it don't have explicit title, export uses the workname.
Story author
Head has two elements assigned to author: author and pseudonym.
In the file structure:
Author is the real author of the story. The main use of pseudonym are writing competitions which require anonymity. So, for the visible author, pseudonym has precendence over author.
Export settings
Internally, storys are formed from parts and scenes. Published stories are divided to chapters. When exporting a story, we want to know:
What element translates to a chapter? Is it part or is it scene? This depends hugely on writer and the story. Some writers write long, long scenes which easily translate to a chapter. Some writers write short scenes and combine them to chapters (in this editor, parts). One of my colleagues writes chapters over 10,000 words (Finnish) and 100,000 characters, which translates to around 40-50 pages.
How do you want to separate chapters? The options here are: separted, numbered or named. Separated chapters get a mark (* * *) between them. Numbered chapters get number as their heading. Named chapters get both number and name in the heading.
Is this long or short story? Short stories (novellas, novellettes) are exported without page breaks. This is common if you are participating a writing competition for novellettes. Long stories get separate title page, and chapters (if they are numbered or named) start at new page.
Reasoning: The reasoning behind this choice is that parts and scenes should divide your story to somewhat logical pieces, and that chapters also divide stories to somewhat logical pieces. At some point I was thinking adding special chapter break elements, but I didn't like the idea.
This information is located to head.export element:
In the file structure:
Related code
Head element creation while loading:
https://github.com/mkoskim/mawejs/blob/master/src/document/xmljs/load.js#L62
File writing and head element:
Story name: https://github.com/mkoskim/mawejs/blob/master/src/document/xmljs/save.js#L45
Head element: https://github.com/mkoskim/mawejs/blob/master/src/document/xmljs/save.js#L115
Visible info is determined here:
https://github.com/mkoskim/mawejs/blob/master/src/document/head.js
Beta Was this translation helpful? Give feedback.
All reactions