summaryrefslogtreecommitdiff
path: root/drafts/html-for-docs-2020.html
blob: 8b5462e22e683d4ec963b993a0630f43cb649fc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<h1>Writing Documents: Markdown? LaTeX? WINWORD.EXE? Nope, just HTML</h1>

<p>
  <img src="https://nextcloud.53hor.net/index.php/s/XaZRfgK3G7ZzWbs/preview" />
</p>

<p class="description">
  I've been without MS Word for quite a few years since I switched away from
  Windows and honestly I haven't needed it. I took notes and wrote documents in
  Markdown for a while. That was alright because the syntax is easy and any text
  editor can read a Markdown file. Sometimes I need shareable formatting, so
  recently I started using HTML for all documents I intend to share, upload, or
  print.
</p>

<p>
  The year is 2021 and I write all my formatted documents in HTML. It sounds
  needless but if you think about it it makes a lot of sense. HTML after all was
  designed to be the streaming document of choice when the web was introduced to
  the world. So it's tailor-made for shareable, digital documents.
  <a href="https://www.w3.org/TR/html52/"
    >Over the years the specification has gotten larger</a
  >, and most of the syntax required by a typical user is present.
</p>

<p>
  But why bother? What are the "benefits"? Well, HTML is ubiquitous. And by that
  I mean literally <em>everyone</em> can read an HTML document because literally
  everyone has a web browser installed. Friends don't have Word? Use Google
  Docs? Use Apple Pages? Forget it. I bet you all of those folks have a web
  browser that was made after 1999. That means they can all read your document,
  either by visiting it on your site or receiving it in an email.
</p>

<p>
  What's easier than reading HTML is writing it. Anyone with a text editor can
  do it. Heck, even those folks with Word installed can save their documents as
  [reasonable] HTML. And the tags aren't that hard to learn. I don't think that
  Markdown is an easier syntax to learn and understand. HTML's tags are only
  slightly more verbose and the structure is a pro, not a con. It's certainly
  easier than writing a document in LaTeX. I would even argue in some ways it's
  easier than working with a WYSIWYG editor. At least the formatting you're
  looking for isn't getting shuffled from menu to sub-menu.
</p>

<p>
  Sometimes folks want a PDF instead. Okay, fine. For whatever reason PDFs are
  the reigning document of the land. That doesn't mean you need Adobe Acrobat or
  some custom setup involving
  <code>wkhtmltopdf</code>. Or even worse, some strange LaTeX middleware via
  <code>pandoc</code>. You don't need any of that! The best PDF reader in the
  world, MuPDF, also comes with <code>mutool</code>.
  <code>mutool convert [options] file [pages]</code> will convert a variety of
  formats to or from a PDF. And the results look terrific going from an HTML to
  a PDF. If you want, you can customize the results by writing CSS into
  <code>@media print</code> queries. Automate the creation with a script when
  you safe the underlying document. Sky's the limit!
</p>

<p>
  But what about presentations or slideshows? Surely, the "minimal" solution is
  to use something like Suckless' <code>sent</code> right? Well, you can also do
  slideshows in HTML! Just a little CSS and some <code>section</code> and
  <code>a</code> tags and you've got a click-able, full-browser slideshow with
  images, links, titles, icons, flowcharts, embedded videos, and a printable
  slide deck. And the best part is that you can instantly share online by
  dropping it into a public web root. You don't have to use Google Slides or
  some other third-party slide creator online that none of your friends use.
  Heck, Suckless <code>sent</code> is just that: yet another slideshow tool that
  does one thing and nobody but you has it installed. Your HTML slides are
  <em>just as plain text</em> as a <code>sent</code> deck.
</p>