zk/diary/2020-04-22.md

187 lines
5.6 KiB
Markdown
Raw Normal View History

2020-04-22 23:55:03 +00:00
%title Writing process update
[TOC]
2020-04-22 23:50:03 +00:00
Hello and welcome! It is with no small sense of irony that I start of a writing SubscribeStar with a bit of writing tech rather than writing itself, but hey, it's the first thing I had on hand. I'll be posting more writing to welcome folks in the coming days, though.
2020-04-22 18:30:03 +00:00
2020-04-22 23:50:03 +00:00
# Markdown and writing tech
2020-04-22 18:30:03 +00:00
2020-04-22 23:50:03 +00:00
My entire writing setup has long since shifted over to Markdown. A lot of this started for two big reasons:
2020-04-22 18:30:03 +00:00
2020-04-22 23:50:03 +00:00
1. I needed to be able to write in a text-only setting such as on a remote machine.
2. I started using static site generators (Jekyll at first, then Hugo) to host my content.
The latter is particularly relevant lately as I've started to move toward using a personal wiki for storing my writing. The reasoning for this is that it allows me to move between projects and files without leaving my editor. Sounds easy, until you remember point number 1! I've got a whole setup working now, and have gone into that in-depth elsewhere. I'll hold off on the nuts and bolts for now, but here's how it looks:
2020-04-22 23:55:03 +00:00
<video src="/assets/zk.webm" autoplay loop></video>
2020-04-22 23:50:03 +00:00
2020-04-22 18:30:03 +00:00
Instead, I'd like to post about some recent writing tech projects in the form of three Markdown extensions.
# Verse extension
First, we have the Verse extension. It's dead simple: it looks for a block of text fenced in with triple single-quotes and wraps it in a `<div class="verse">`. For example,
'''
Arctic fox's den
adorned with flowers and snow
garden in winter
'''
turns into
```html
<div class="verse">Arctic fox's den
adorned with flowers and snow
garden in winter</div>
```
2020-04-22 23:55:03 +00:00
which, with the following style
2020-04-22 18:30:03 +00:00
```css
.verse {
white-space: pre-wrap;
}
```
2020-04-22 23:55:03 +00:00
looks like:
'''
Arctic fox's den
adorned with flowers and snow
garden in winter
'''
2020-04-22 18:30:03 +00:00
I can write verse in an editor with newlines and indentation however I please, and it shows up just like that within the browser without using a `<pre>` tag, which defaults to monospace font. I can also overload what tag it uses, so I can even use my own `<verse></verse>` tag for something more semantically acurate.
# Vimwiki extensions
Vimwiki, the personal wiki I use, has its own markup format which...is fine? Like, it's okay. the problem is that it's just dissimilar enough from Markdown that I have a hard time remembering the differences. Even if I were to remember them, when I transfer my files to hosting on a static site, they'd be in the wrong format.
Notably, I want the six-level to-do lists - representing rejected, not started, three levels of incomplete, and complete tasks - and for the tags vimwiki uses - in the format :tag1:tag2:etc: - to be displayed properly. Thus:
```
2020-04-22 23:50:03 +00:00
* [-] Rejected
2020-04-22 18:30:03 +00:00
* [ ] Idea
2020-04-22 23:50:03 +00:00
* [.] Stub
* [o] Alpha
* [O] Beta
* [X] Released
2020-04-22 18:30:03 +00:00
```
Turns into:
2020-04-22 23:50:03 +00:00
* [-] Rejected
* [ ] Idea
* [.] Stub
* [o] Alpha
* [O] Beta
* [X] Released
2020-04-22 18:30:03 +00:00
when rendered into HTML.
# Editing extension
Probably the largest of the extensions, though, is the editing extension which allows me to put editing marks within Markdown similar to how "Track Changes" and comments in LibreOffice/Word work. I can insert, delete, and substitute text, as well as comment on a selected passage or add a single comment per line.
With this Markdown:
```
This is a +{new} addition
This -{this} word is removed
2020-04-22 23:15:03 +00:00
I say, ~{out with the old}{*in* with the new}
2020-04-22 18:30:03 +00:00
Here !{just a comment} is a line with a comment
2020-04-22 23:15:03 +00:00
You can also ?{add comments to some text}(Like *this*!{And comment within comments}!{You can thread them that way} (2020-04-21))
2020-04-22 18:30:03 +00:00
2020-04-22 23:15:03 +00:00
All -{new}(Redundant (Makyo)) edit marks can have comments with attributions and dates +{like this}(See? (Makyo 2020-04-22)) (for single comments, just put the attribution in there !{like this}(Makyo))
2020-04-22 18:30:03 +00:00
2020-04-22 21:20:03 +00:00
Bottom text
```
I get
> This is a +{new} addition
>
> This -{this} word is removed
>
> I say, ~{out with the old}{*in* with the new}
>
> Here !{just a comment} is a line with a comment
>
2020-04-22 23:10:03 +00:00
> You can also ?{add comments to some text}(Like *this*!{And comment within comments}!{You can thread them that way} (2020-04-21))
2020-04-22 21:20:03 +00:00
>
2020-04-22 23:10:03 +00:00
> All -{new}(Redundant (Makyo)) edit marks can have comments with attributions and dates +{like this}(See? (Makyo 2020-04-22)) (for single comments, just put the attribution in there !{like this}(Makyo))
2020-04-22 21:20:03 +00:00
>
> Bottom text
2020-04-22 18:30:03 +00:00
2020-04-22 23:15:03 +00:00
Using this stylehseet:
```css
/* Editing extension */
del.deletion, .substitution del {
text-decoration: line-through;
background-color: #fbb;
color: #555;
}
ins.addition, .substitution ins {
text-decoration: none;
background-color: #d4fcbc;
}
q.comment {
display: block;
float: right;
width: 33%;
border: 1px solid #ccc;
margin-left: 0.5rem;
padding: 0.5rem;
clear: both;
}
q.comment q.comment {
float: none;
width: auto;
}
q.comment .attribution, q.comment .date {
font-size: 10pt;
display: inline-block;
float: right;
clear: both;
}
q.comment::before, q.comment::after {
content: "";
2020-04-23 01:50:03 +00:00
display: block;
2020-04-22 23:15:03 +00:00
clear: both;
}
2020-04-23 01:50:03 +00:00
q.comment::before {
width: 0;
height: -0.5rem;
float: left;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-right: 20px solid #ccc;
margin-left: calc(-1rem - 12px);
margin-top: calc(-0.5rem - 1.195px);
}
q.comment q.comment::before {
border: none;
}
p + p {
2020-04-22 23:15:03 +00:00
clear: both;
}
```
2020-04-22 18:30:03 +00:00
Which will let me mark potential changes I'm not sure about and leave notes to myself in the things I write, something I used to do with HTML comments.
So I hope that gives an idea of the types of things that I've been working on that, while not exactly writing in and of themselves, are things that can be used within the context of writing.
Thanks for peeking in!