Update 20221208.3 ️ Our favorite markup languages for documentation.md

This commit is contained in:
六开箱 2022-12-09 01:15:16 +08:00 committed by GitHub
parent fa8922aa48
commit 050d8dcc59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,7 +88,7 @@ Markdown has never caught on with me, and I've never tried AsciiDoc.
I'm writing a lot of documentation in HTML right now, so I'll put in a plug for HTML. You can use HTML to create websites, or to create documentation. Note that the two are not really the same — when you're creating websites, most designers are concerned about presentation. But when you're writing documentation, tech writers should focus on content.
When I write documentation in HTML, I stick to the tags and elements defined by HTML, and I don't worry about how it will look. In other words, I write documentation in "unstyled" HTML. I can always add a stylesheet later. So if I need to make some part of the text stronger (such as a warning) or add emphasis to a word or phrase, I might use the <strong> and <em> tags, like this:
When I write documentation in HTML, I stick to the tags and elements defined by HTML, and I don't worry about how it will look. In other words, I write documentation in "unstyled" HTML. I can always add a stylesheet later. So if I need to make some part of the text stronger (such as a warning) or add emphasis to a word or phrase, I might use the `<strong>` and `<em>` tags, like this:
```
<p><strong>Warning: Lasers!</strong> Do <em>not</em> look into laser with remaining eye.</p>
@ -100,7 +100,7 @@ Or to provide a short code sample within the body of a paragraph, I might write:
<p>The <code>puts</code> function prints some text to the user.</p>
```
To format a block of code in a document, I use <pre><code>..</code></pre>like this:
To format a block of code in a document, I use `<pre><code>..</code></pre>` like this:
```
void
@ -117,7 +117,7 @@ The great thing about HTML is you can immediately view the results with any web
### Unexpected: LibreOffice
Back in the 80s and 90s when I worked in System V Unix, SunOS, and eventually Solaris, I used the mm macros with `nroff,``troff`and finally `groff`. Read about MM using groff_mm (provided you have them installed.)
Back in the 80s and 90s when I worked in System V Unix, SunOS, and eventually Solaris, I used the mm macros with `nroff,``troff` and finally `groff`. Read about MM using groff_mm (provided you have them installed.)
MM isn't really a markup language, but it feels like one. It is a very semantic set of troff and groff macros. It has most things markup language users would expect—headings, numbered lists, and so on.