-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format convention #96
Comments
Need to add to this document a reference on how Headings works. When the page metadata is built it checks level 2 headers to to use a section title, and then level 3 as a subsection. Unless the level 2 header is determined to be a script API tile, then the level 3 header is appended as a member. So:
Would give you index entries for Object and Object.ID
Would give you index entries for Getting Started and Installing |
For purposes of spell checking, I think that the only way it can manageable is to strip out code and author/copyright notices and run the spell check against the remainder of the page. For this to work anything that is script needs to be in an
For credits and copyright notices, probably the best thing to use is:
Currently it reports about 1600 words that are incorrect, but the vast majority of these are script examples that have no markup. |
This would be great to add here: https://github.com/adventuregamestudio/ags-manual/blob/master/CONTRIBUTING.md Unfortunately I don't have much idea of the format "rules" other than observing how things are currently and trying to match... |
@morganwillcock is there any details on particular behaviors / relationship with the index that is necessary to note here? |
Started to write it here: https://gist.github.com/ericoporto/895cbe102fac2d896fdd4bc03ba6374c#file-format-md Found some resources, but if someone knows one more concise and useful from other project, please tell below
|
The main thing to set which determines the index content is whether an item relates to the script API or not. In headings it takes the first inline code item as the name of whatever should be indexed. printf '## `Character` functions and properties\n### `Character.AddInventory`' \
| pandoc -t lua/write_metablock.lua
Marking something as code records that the index type is "script" and uses the inline code text for the index entry, for both the CHM file and the web index these are displayed at the top level of the index.
...for the CHM file it cannot be anywhere else because the editor tries to find script documentation at the top level of the index. Not marking something as code stores the index type as "editorial" (I couldn't think of a better name at the time, it is meant to be other content in the manual) and the normal heading name is used for the index entry. printf '## Character functions and properties\n### Character.AddInventory' \
| pandoc -t lua/write_metablock.lua
The CHM file and web index differ here, but the goal is to avoid name collisions between top level index items. For the CHM file the page title is at the top level of the index and the other index entries are added as sub-entries:
The web index appends the page title to the other index entries and is just a flat list:
So in both cases there are only two levels. The page title is taken from the first level 2 heading on the page if it isn't explicitly set. In summary:
|
Since there's now multiple contributors there has to be a thorough format convention.
As time passes the format is becoming more random, with some words highlighted with bold, other with italics, some with capital letters, and I recently noticed some of the script api names are being printed
as code
within common text, which was never done before afaik (speaking of script names, some of these were also done in "double quotes" in older articles, while some are not).I think there should be separate guidelines for writing script API entries, which mention what kind of information you put first, what later, how do you determine "See also" note, and so forth.
The text was updated successfully, but these errors were encountered: