<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>The Mandelbear&apos;s Musings</title>
  <link>https://mdlbear.dreamwidth.org/</link>
  <description>The Mandelbear&apos;s Musings - Dreamwidth Studios</description>
  <lastBuildDate>Sat, 02 Mar 2019 00:50:01 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>mdlbear</lj:journal>
  <lj:journaltype>personal</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/15740388/505737</url>
    <title>The Mandelbear&apos;s Musings</title>
    <link>https://mdlbear.dreamwidth.org/</link>
    <width>96</width>
    <height>96</height>
  </image>

<item>
  <guid isPermaLink='true'>https://mdlbear.dreamwidth.org/1663349.html</guid>
  <pubDate>Sat, 02 Mar 2019 00:50:01 GMT</pubDate>
  <title>Writing Without Distractions</title>
  <link>https://mdlbear.dreamwidth.org/1663349.html</link>
  <description>&lt;p&gt; A few years ago I read an article about how to set up a Mac for
    distraction-free writing.  I can&apos;t seem to find it anymore (okay, some
    rather large value of &quot;a few&quot;), but &quot;there&apos;s an app for that&quot; now.  Many
    writers on my reading list are talking about &lt;a href=&quot;https://lifehacker.com/five-best-distraction-free-writing-tools-5689579&quot;&gt;distraction-free writing tools&lt;/a&gt; like &lt;a href=&quot;https://ia.net/writer&quot;&gt;iA Writer&lt;/a&gt; (seems to be the one people are most impressed by at the
    moment) and &lt;a href=&quot;https://gottcode.org/focuswriter/&quot;&gt;FocusWriter&lt;/a&gt;
    (free and cross-platform).  There&apos;s even &lt;a href=&quot;https://github.com/joostkremers/writeroom-mode&quot;&gt;an Emacs mode&lt;/a&gt;.

&lt;p&gt; These all work roughly the same way:  run a text editor in full-screen
    mode, and write plain text with simplified markup in a fixed-width font.
    Worry about formatting later, if at all.  Grey out everything but the
    sentence or paragraph you&apos;re working on.  The article I can&apos;t find --
    written before specialized writing programs and even before the web --
    suggested getting the same effect by taking all of the icons off your
    screen and setting your default font to Courier.

&lt;p&gt; If you&apos;re happily using one of these tools, you may want to skip ahead to
    the section on &lt;a href=&quot;#formatting&quot;&gt;formatting&lt;/a&gt;, and maybe fill in
    the gaps later.  If you&apos;re still using a word processor, or typing into a
    text field in a browser (even in &quot;rich text&quot; mode), you should probably
    stick with me.

&lt;h3&gt;&lt;a name=&quot;all-you-can-get&quot;&gt;What You See is All You Can Get&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt; WYSIWYG (What You See Is What You Get) word processors are arguably the
    worst thing to have happened to writing in the last half-century.  They
    have three huge problems:

&lt;p&gt; &lt;strong&gt;The first&lt;/strong&gt; is that they make a promise they can&apos;t deliver
    on.  In fact, they should be called WYSIAYCG -- What You See Is All You
    Can Get.  If your word processor doesn&apos;t support kerning, multiple fonts,
    paragraphs with hanging indents large initial capitals, mathematical
    notation, or internal cross-linking, you can&apos;t use them.  If they make it
    &lt;em&gt;difficult&lt;/em&gt; to use these features, you &lt;em&gt;still&lt;/em&gt; won&apos;t use
    them unless you absolutely have to, and then you find yourself wasting
    time doing clumsy work-arounds.  Think about how you&apos;d go about formatting
    song lyrics with chords over them.  Shudder.  How about making the space
    between sentences equal to one-and-a-half times the space between words?

&lt;p&gt; &lt;strong&gt;The second&lt;/strong&gt; is related to the first:  word processors
    target a specific page layout.  If you want to make a printed book, a web
    page, and an eBook, you&apos;re going to have to do extra work to accommodate
    the differences, or settle for something that has about the same level of
    mediocrity in all of those environments.

&lt;p&gt; At a lower level, word processors use proportional-spaced fonts.  That
    means you have to peer over the tops of your glasses to see whether that
    character at the end of the sentence is a period or a comma, and if your
    hands are shaking from too much coffee you&apos;ll have trouble selecting it.
    Or putting the cursor in front of it &lt;em&gt;without&lt;/em&gt; selecting it, if you
    want to add a few words.

&lt;p&gt; &lt;strong&gt;The third&lt;/strong&gt; is that they distract you from actually
    &lt;em&gt;writing&lt;/em&gt;, tempting you to fiddle with fonts, reformat your
    footers, worry about word-wrapping and hyphenation, and place your page
    breaks to avoid widows and orphans, at a time when you should be
    concentrating on content.

&lt;p&gt; There&apos;s a fourth, mostly unrelated, problem which is so pervasive these
    days that most people accept it as The Way Things Are:  if you
    accidentally select something and then type, whatever you selected goes
    away.  In almost all cases, even if your word processing has an &quot;undo&quot;
    feature, this can&apos;t be undone.  So let&apos;s talk a little more about...

&lt;h3&gt;&lt;a name=&quot;editing&quot;&gt;Editing&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt; Anyone who&apos;s been hanging around me long enough is expecting me to mention
    &lt;a href=&quot;https://www.gnu.org/software/emacs/&quot;&gt;GNU Emacs&lt;/a&gt; at some
    point, and I will.  But there are plenty of other text editors, and most
    of them are perfectly usable.  They&apos;re often called &quot;programmers&apos;
    editors&quot;.  

&lt;blockquote&gt;
&lt;p&gt; I&apos;m not going to tell you how to use a text editor here; I&apos;m just going to
    tell you more about &lt;em&gt;why&lt;/em&gt;, and point you at some resources.
    Michael Hartl&apos;s &lt;a href=&quot;https://www.learnenough.com/text-editor-tutorial/vim&quot;&gt;&lt;cite&gt;Learn
    Enough Text Editor to Be Dangerous&lt;/cite&gt;&lt;/a&gt; is a pretty good
    introduction to most of them, though you may want to skip the chapter on
    Vim.  It gives short shrift to Emacs, but fortunately the first thing on
    your screen after starting Emacs is the tutorial.  Start there.
&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt; So, why would you, a writer, want to use a programmer&apos;s editor?

&lt;p&gt; One reason is that programmers have been writing on computers for a quite
    a bit longer than writers have, so text editors have a considerable head
    start.  More to the point, programmers &lt;em&gt;use their own programs.&lt;/em&gt;
    This gives them a strong incentive to make their programs fast, efficient,
    and powerful.  Not every programmer who has a problem with their text
    editor is going to fix it, but enough do to make them improve rapidly.

&lt;p&gt; Word processors, on the other hand, are written &lt;em&gt;by&lt;/em&gt; programmers,
    but they are usually written &lt;em&gt;for&lt;/em&gt; ordinary users, not experts, and
    they&apos;re written to be products, not programming tools.  As products, they
    have to appeal to their customers, which means that they have to be easy
    to learn and easy to use.  They don&apos;t have to work well for people who
    spend their entire work day writing -- those are a tiny fraction of the
    customer base.

&lt;p&gt; Another reason is that text editors use fixed-width fonts and encourage
    you to use comparatively short lines (typically 72 or 80 characters, for
    reasons that date back to the late 1880s).  Paragraphs are separated by
    blank lines.  Since line breaks inside of paragraphs are ignored by
    formatters, some authors like to start every sentence on a new line, which
    makes them particularly easy to move around, and makes it easier to spot
    differences between versions.

&lt;p&gt; A text editor also makes you more efficient by giving you a wide range of
    keyboard commands -- you can write an entire book without ever taking your
    fingers off the keyboard.  (This is, in part, due to their long history --
    text editors predate graphical user interfaces by several decades.)  And
    most modern text editors are &lt;em&gt;extensible&lt;/em&gt;, so that if you want new
    commands or want them to behave differently for different kinds of markup,
    they&apos;re easy to add.  (I have a set that I use for my band&apos;s lead sheets,
    for example, and another for my to-do files.)

&lt;h3&gt;&lt;a name=&quot;markup&quot;&gt;Markup&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt; Up until somewhere around 1990, everyone who did any serious writing knew
    how to edit a manuscript using proofreaders&apos; marks.  Manuscripts were
    typed double-spaced to leave room for insertions, corrections, and cryptic
    little marks between the lines and in the margins.  This was, logically
    enough, called &quot;marking up&quot; the manuscript.  You&apos;ve probably heard of
    Markdown.  You&apos;ve &lt;em&gt;certainly&lt;/em&gt; heard of HTML, which stands for
    &quot;HyperText Markup Language&quot;.  HTML, in turn, is a variant on SGML,
    &quot;Standard General Markup Language&quot;.  You may have heard of LaTeX, which is
    the standard for academic -- especially scientific -- writing.

&lt;p&gt; Markup languages let you separate content writing from formatting.
    &lt;em&gt;Semantic&lt;/em&gt; markup lets you add additional information about what
    the things you are marking up &lt;em&gt;mean&lt;/em&gt;; it&apos;s up to a stylesheet to
    determine what they look like .  In HTML, you don&apos;t have to
    &amp;lt;i&amp;gt;&lt;i&gt;italicize&lt;/i&gt;&amp;lt;/i&amp;gt; something, you can
    &amp;lt;em&amp;gt;&lt;em&gt;emphasize&lt;/em&gt;&amp;lt;/em&amp;gt; a talking point, or
    &amp;lt;cite&amp;gt;&lt;cite&gt;cite&lt;/cite&gt;&amp;lt;/cite&amp;gt; a book title.  They usually
    look the same, so most people don&apos;t bother, until they decide to turn all
    the book titles in their two thousand blog posts into links.

&lt;p&gt; You can see how using semantic markup can free you from having to think
    about formatting while you&apos;re writing.  There&apos;s another, less obvious
    advantage:  you aren&apos;t stuck with just one format.  By applying different
    styles to your document you can make it a web page, a printed book, an
    eBook, a slide show, or an email.

&lt;p&gt; Another advantage of markup languages is that &lt;em&gt;all&lt;/em&gt; of the markup
    is visible.  This week&apos;s &lt;a href=&quot;https://xkcd.com/2109/&quot;&gt;xkcd: &quot;Invisible
    Formatting&quot;&lt;/a&gt;, shows how you can accidentally make a boldface space in
    the middle of normal text, where it can distract you by making an
    insertion unexpecedly boldface.  It may also make subtle changes in line
    and word spacing that are hard to track down down.

&lt;p&gt; There are two main kinds of markup languages:  ones like &lt;a href=&quot;https://daringfireball.net/projects/markdown&quot;&gt;Markdown&lt;/a&gt; and &lt;a href=&quot;https://github.com/textile&quot;&gt;Textile&lt;/a&gt;, that use simple
    conventions like &lt;code&gt;**&lt;strong&gt;double asterisks&lt;/strong&gt;**&lt;/code&gt; for
    strong emphasis, and the ones that use tags, like
    &amp;lt;cite&amp;gt;&lt;cite&gt;HTML&lt;/cite&gt;&amp;lt;/cite&amp;gt;.  &lt;a href=&quot;https://www.latex-project.org/&quot;&gt;LaTeX&lt;/a&gt; and &lt;a href=&quot;http://docutils.sourceforge.net/rst.html&quot;&gt;Restructured Text&lt;/a&gt; are
    somewhere in the middle, using both methods.  You can be a lot more
    specific with HTML, but Markdown is far easier to type.  Markdown and
    Textile let you mix in HTML for semantic tagging; Markdown, Textile, and
    Resturectured Text all use LaTeX for mathematical notation.  Some
    formatters let you embed code with colored syntax highlighting.

&lt;p&gt; These days, it looks as though Markdown is the most popular, in part
    thanks to &lt;a href=&quot;https://github.com/&quot;&gt;GitHub&lt;/a&gt;; you can find it in
    static site generators like &lt;a href=&quot;https://gohugo.io/&quot;&gt;Hugo&lt;/a&gt; and &lt;a href=&quot;https://github.com/jekyll/jekyll&quot;&gt;Jekyll&lt;/a&gt;, and it&apos;s accepted by
    many blogging platforms (including Dreamwidth).  Unfortunately they all
    accept different &lt;em&gt;dialects&lt;/em&gt; of Markdown; there is an enormous
    number of Markdown-to-whatever converters.  But the nice thing about
    markup languages is that you aren&apos;t stuck with just one.  That brings us
    to...

&lt;h3&gt;&lt;a name=&quot;formatting&quot;&gt;Formatting&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt; Once you have a file that says exactly what you want to say, the next
    thing you&apos;ll want to do is format it.  Formatting programs (a category
    that includes LaTeX, web browsers, website generators like Jekyll and
    Hugo) all use some kind of style sheet that describes what each kind of
    markup is supposed to look like.  You probably know about CSS, the
    &quot;Cascading Style Sheets&quot; that are used on the web.  LaTeX has a different
    set, written in the typesetting language TeX.

&lt;p&gt; If you wrote your file in HTML and you want to publish it on the web,
    you&apos;re done.  You may want to make your own stylesheet or customize one of
    the thousands that are already out there, but you don&apos;t have to.  Modern
    browsers do a perfectly reasonable job of formatting.  CSS lets you
    specify a separate style for print, so when a reader wants a printed copy
    it actually looks like something you&apos;d want to read on paper.

&lt;p&gt; If you wrote your file in LaTeX and you want to publish it on paper,
    you&apos;re done -- it&apos;s safe to assume that LaTeX knows more about formatting
    and typesetting than you do, so you can just tell LaTeX what size your
    pages, pick one of the hundreds of available stylesheets (or write your
    own), and let it make you a PDF.  You can change the page size or layout
    with just a few keystrokes.

&lt;p&gt; If you wrote your file in Markdown or some other markup language, there
    are dozens of formatting programs that produces HTML, LaTeX, PDF, or some
    combination of those.  (My favorite is Pandoc -- see below.)  Markdown is
    also used by static website generators like Hugo or Jekyll, and accepted
    by everything from blogging sites to GitHub.  If you&apos;re publishing on the
    web or in some other medium your formatter supports, you&apos;re done.

&lt;p&gt; The advantage of separating content from format is that you&apos;re not stuck
    with one format.  Web?  Print?  eBook?  You don&apos;t have to pick one, you
    have all of them at your fingertips.  There are hundreds of conversion
    programs around: &lt;code&gt;html2latex&lt;/code&gt;, &lt;code&gt;latex2html&lt;/code&gt;,
    &lt;code&gt;kramdown&lt;/code&gt; (which GitHub uses),...  For most purposes I
    recommend &lt;a href=&quot;https://pandoc.org/&quot;&gt;Pandoc&lt;/a&gt;.  The subtitle of
    Pandoc&apos;s home page calls it &quot;a universal document converter&quot;, and it is.
    It can convert between any of the the markup languages I&apos;ve mentioned
    here, and more, in either direction.  In addition it can output eBook,
    word processor, wiki, and documentation formats, not to mention PDF.  As
    an example of what it can do, I write these posts in either HTML or
    Markdown as the mood takes me, and use Pandoc to convert them to HTML for
    Dreamwidth and plain text, stripping out the tags, so that I can get
    accurate word counts.

&lt;h3&gt;&lt;a name=&quot;version_control&quot;&gt;Version Control, etc.&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt; Text files with short lines are ideal for other tools in the Linux (and
    Unix -- did you know that Unix was originally used by technical writers?)
    environment.  When you compare two files, a line-by-line comparison (which
    is what &lt;code&gt;diff&lt;/code&gt; gives you) is more useful than a
    paragraph-by-paragraph comparison (which is what &lt;code&gt;diff&lt;/code&gt; gives
    you if you don&apos;t hard-wrap your text).  Text editors can run formatters,
    spelling checkers, search tools, and others, and put the cursor on the
    exact line you&apos;re looking for.  Want to search nearly 6500 blog posts for
    your favorite quote from G. K. Chesterton?  Took me one line and a little
    over 4 seconds.

&lt;pre&gt;
        time find . -type f -exec grep -nHi -e &apos;rules of architecture&apos; {} +
&lt;/pre&gt;

&lt;p&gt; Many formatting tools simply ignore single line breaks and use a blank
    line to separate paragraphs, examples include LaTeX and most (though not
    all) Markdown translators.  HTML ignores line breaks altogether and relies
    on tags.  I take advantage of that to make HTML more readable by indenting
    the text by four spaces, and using 80- or 90-character lines.  If you want
    an example and you&apos;re reading this page in a browser, just hit Ctrl-U to
    look at the page source.  Compare that to web pages made without
    hard-wrapped lines -- you may find yourself scrolling dozens, if not
    hundreds, of characters to the right because browsers don&apos;t do any
    wrapping when displaying source.  Nor would you want them to.

&lt;p&gt; The &lt;em&gt;biggest&lt;/em&gt; advantage (in my not-so-humble opinion) is &lt;a href=&quot;https://en.wikipedia.org/wiki/Version_control&quot;&gt;version control&lt;/a&gt;.
    (Those of you who&apos;ve been around me were just waiting for me to mention
    &lt;code&gt;git&lt;/code&gt;, weren&apos;t you?)  Being able to find all the changes you
    made this week -- and why you made them -- can be incredibly useful.
    Being able to retrieve a file from three years ago that you accidentally
    deleted is priceless.

&lt;p&gt; This post is already pretty long, so the &lt;em&gt;next&lt;/em&gt; post in this series
    is going to be about version control (and the other things you can do with
    &lt;code&gt;git&lt;/code&gt; and &lt;a href=&quot;https://github.com/&quot;&gt;GitHub&lt;/a&gt;; it&apos;s not
    just version control) for writers.  Stay tuned.

&lt;h3&gt;Resources&lt;/h3&gt;
&lt;ul class=&quot;resource-list&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.gnu.org/software/emacs/&quot;&gt;GNU Emacs&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/joostkremers/writeroom-mode&quot;&gt;writeroom-mode
    for Emacs&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;https://atom.io/&quot;&gt;Atom&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.learnenough.com/text-editor-tutorial/vim&quot;&gt;&lt;cite&gt;Learn Enough Text Editor to Be Dangerous&lt;/cite&gt;&lt;/a&gt;
  &lt;li&gt; &lt;a href=&quot;https://pandoc.org/&quot;&gt;Pandoc&lt;/a&gt;
  &lt;li&gt; &lt;a href=&quot;https://daringfireball.net/projects/markdown&quot;&gt;Markdown&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/textile&quot;&gt;Textile&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.latex-project.org/&quot;&gt;LaTeX - A document preparation system&lt;/a&gt;
&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p class=&quot;colophon&quot;&gt; &lt;em&gt;Another fine post from
    &lt;a href=&quot;https://mdlbear.dreamwidth.org/tag/curmudgeon&quot;&gt;The Computer Curmudgeon&lt;/a&gt; (also at
    &lt;a href=&quot;https://computer-curmudgeon.com/&quot;&gt;computer-curmudgeon.com&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=mdlbear&amp;ditemid=1663349&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://mdlbear.dreamwidth.org/1663349.html</comments>
  <category>curmudgeon</category>
  <category>markup</category>
  <category>version-control</category>
  <category>linux</category>
  <category>writing</category>
  <category>computers</category>
  <category>text-editors</category>
  <category>unix</category>
  <lj:music>The Ultimate Rain Noise Generator</lj:music>
  <lj:mood>didactic</lj:mood>
  <lj:security>public</lj:security>
  <lj:reply-count>10</lj:reply-count>
</item>
</channel>
</rss>
