rtfm(1) - manual pages #41

Open
opened 2024-02-02 23:22:50 -07:00 by emma · 5 comments
Owner
https://commonmark.org/
emma added the
enhancement
label 2024-02-02 23:22:50 -07:00
emma self-assigned this 2024-02-02 23:22:50 -07:00
Author
Owner

I’ve decided on a strict subset of commonmark to implement for this:

  • Italics: *Italics*
  • Bold: __Bold__
  • Heading: # Heading 1 (will be used for section number), ## Heading 2 (for all other headings)
  • Link: [Text][Ref] and at the bottom of the doc [Ref] http://example.com
  • List: - List item
  • Numbered List: 1. Numbered item
  • Code: three backticks to open/close blocks and one backtick to open and close inline code
  • Quote Block: > Quote Block

plus a couple of extensions:
Underline: _Underline_
Strikethrough: ~Strikethrough~
Comments: ; Comment

I’ve decided on a strict subset of commonmark to implement for this: - Italics: `*Italics*` - Bold: `__Bold__` - Heading: `# Heading 1` (will be used for section number),` ## Heading 2` (for all other headings) - Link: `[Text][Ref]` and at the bottom of the doc `[Ref] http://example.com` - List: `- List item` - Numbered List: `1. Numbered item` - Code: three backticks to open/close blocks and one backtick to open and close inline code - Quote Block: `> Quote Block` plus a couple of extensions: Underline: `_Underline_` Strikethrough: `~Strikethrough~` Comments: `; Comment`
Owner

Could # headers be specifically for title/section metadata?

For example, roff:

.TH  PAGE 1

and my proposed equivalent usage in doc:

# PAGE(1)

Or PAGE 1 or whatever would be best. Just an idea. It would also be nice to have ### - just in general it may be handy but also in particular with # being title specification.

I think the following would be more consistent: **bold**, __underline__, ~~strikethrough~~, //italic//. All of these are flanked by two of the same rune on either side, which helps writers remember them easier.

And then potentially if they're useful (or even theoretically so) \\diminished\\ (e.g. <small /> in obsolete HTML, or like whispers in comic books) (edit: backslashes as markup is a bad idea), ^^superscript^^, ,,subscript,,, but I'm not in love with any of these, they're just ideas I thought up.

It would be nice to have in-line references, maybe similarly to MediaWiki. I don't wanna scroll down to find the hyperlink for a reference and then have to find my previous position.

; is a fine comment character. I'm a little wary of common punctuation but starting a line with a semicolon is unusual and nonsensical so it's probably fine. If it initiates a comment at any point in a line though and not at the start that could be a big problem.

Could `#` headers be specifically for title/section metadata? For example, roff: ``` .TH PAGE 1 ``` and my proposed equivalent usage in doc: ``` # PAGE(1) ``` Or `PAGE 1` or whatever would be best. Just an idea. It would also be nice to have `###` - just in general it may be handy but also in particular with `#` being title specification. I think the following would be more consistent: `**bold**`, `__underline__`, `~~strikethrough~~`, `//italic//`. All of these are flanked by two of the same rune on either side, which helps writers remember them easier. And then potentially if they're useful (or even theoretically so) ~~`\\diminished\\` (e.g. `<small />` in obsolete HTML, or like whispers in comic books)~~ (**edit: backslashes as markup is a bad idea**), `^^superscript^^`, `,,subscript,,`, but I'm not in love with any of these, they're just ideas I thought up. It would be nice to have in-line references, maybe similarly to MediaWiki. I don't wanna scroll down to find the hyperlink for a reference and then have to find my previous position. `;` is a fine comment character. I'm a little wary of common punctuation but starting a line with a semicolon is unusual and nonsensical so it's probably fine. If it initiates a comment at any point in a line though and not at the start that could be a big problem.
Author
Owner

I think comments should probably be ;;

I think comments should probably be `;;`
emma reopened this issue 2024-02-06 22:59:26 -07:00
emma added the
help wanted
label 2024-02-07 20:25:55 -07:00
Owner

Another point against roff is that it can run arbitrary commands.

Another point against roff is that it can [run arbitrary commands](https://news.ycombinator.com/item?id=39554085).
Author
Owner

@trinity mentioned renaming this to the more interesting rtfm(1).

@trinity mentioned renaming this to the more interesting `rtfm(1)`.
emma changed title from `doc(1)` - manual pages in commonmark to `rtfm(1)` - manual pages in commonmark 2024-07-15 14:16:08 -06:00
emma changed title from `rtfm(1)` - manual pages in commonmark to `rtfm(1)` - manual pages 2024-07-15 14:16:15 -06:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bonsai/harakit#41
No description provided.