<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>publishing &amp;mdash; Hunter Dansin</title>
    <link>https://blog.hdansin.com/tag:publishing</link>
    <description>Home for my words</description>
    <pubDate>Mon, 20 Apr 2026 05:48:52 +0000</pubDate>
    <image>
      <url>https://i.snap.as/tOjrfVcT.png</url>
      <title>publishing &amp;mdash; Hunter Dansin</title>
      <link>https://blog.hdansin.com/tag:publishing</link>
    </image>
    <item>
      <title>Bland</title>
      <link>https://blog.hdansin.com/bland?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[A self-indulgent rant about marketing&#xA;&#xA;It would be very easy for me to say that publishing is an industry, and that the reason I don&#39;t make enough money to even think about telling people I am an author when they ask the ubiquitously depressing get-to-know-you question is because I haven&#39;t invested in marketing or my platform, but I won&#39;t say that even though I just did. &#xA;&#xA;!--more--&#xA;&#xA;Truthfully, I have no idea why my book doesn&#39;t sell. I could make some guesses: Its my first published work, I have no preexisting platform, I didn&#39;t spend any money on a campaign, it&#39;s self published, maybe it&#39;s just not very good. I could tell myself that I never really set out to sell a bunch of copies, but if I&#39;m honest being a full time author is my dream job, and that is impossible without book sales.&#xA;&#xA;I want to be the exception, the unicorn, but I know the chances of that are worse than scratch-offs. &#34;You have to think about it like a business&#34;, &#34;You&#39;ve gotta compartmentalize&#34;, &#34;View it like work&#34; -- all things I tell myself about marketing. Sometimes it works, but it feels dishonest to me. To market effectively you have to act like your book is the next Lord of the Rings, but I know it&#39;s not. I think Dawn Must Follow Night is pretty unique and worth your time, but I wrote it, and I see more and more of its flaws as time passes. I have relinquished the false assumption that sales equals quality, but I don&#39;t want to sell my book because I persuade you into it. I want the weight of the words to carry it. If I can only become a better writer by spending time writing, then time spent marketing is a waste.&#xA;&#xA;Yet I know that marketing is not evil. As with most activities it can be carried to harmful extremes, but it is not intrinsically bad or good, but that doesn&#39;t change that it feels slimy to me. I have tried to read recently traditionally published novels that are best sellers and the next big deal and am consistently underwhelmed and sometimes revolted. Fifty Shades was not one of the ones I tried to read, but it proved that drivel can sell. Great novels are rare for a reason, but the industry rolls forward and publishes not terrible but not great writing as if it were.&#xA;&#xA;Maybe that&#39;s the problem. Great novels have a reputation for changing lives. Book blogs publish &#34;100 must read books&#34;, but the reality is that no book is a &#34;must read.&#34; Do I love reading? Of course. It teaches, convicts, encourages, and engages my mind daily -- but with the exception of a collection of documents passed down through thousands of years of history about a carpenter&#39;s son from Nazareth, I hesitate to call any book &#34;must read.&#34; They are all written by people, and like people they are imperfect and gloriously opinionated. Perhaps this industry is so streamlined now that we have forgotten that books are not products. They are a vehicle for thoughts and ideas and stories.&#xA;&#xA;Steinbeck writes about the sterilization of language in Travel&#39;s with Charley in Search of America: &#xA;&#xA;  &#34;Radio and television speech becomes standardized, perhaps better English than we have ever used. Just as our bread, mixed and baked, packaged and sold without benefit of accident or human frailty, is uniformly good and uniformly tasteless, so will our speech become one speech.&#34;&#xA;&#xA;Is that what is happening? Are we becoming such a product of television that uniform blandness has invaded not only our speech but our books as well? I could not tell you without reading more popular fiction, and I love classics too much to do that.&#xA;&#xA;Perhaps marketing bothers me so much not because it is evil, but because it is bland. It seeks to appeal to the largest audience possible, and because of that it must be appealing to all. We who enjoy strong flavors and acquire a taste for the unique and often strange treasures of thought are put off. In popular fantasy and science fiction especially, success seems to be measured by whether or not you get a screen adaption, but writing as a medium is capable of so much more than a vehicle for plot and character. What is stopping prose from being as much a part of the experience as world building and character? What is stopping a fantasy novel from taking full advantage of the medium? Well, it takes a lot of practice to write like Hemingway, but the industry does not encourage fantasy authors who want to make a decent living to practice writing like that. The most popular ones are lauded for their ability to craft a plot and magic system, but rarely for prose or narrative technique. &#34;Good&#34; prose in the mainstream of the genre is &#34;clear&#34;, &#34;descriptive&#34;, maybe even &#34;poetic&#34; if it has some flavor.&#xA;&#xA;Nobody looks for great masters of the written word in fantasy. They look for story tellers, dreamers, plot weavers. Perhaps I am crazy, and perhaps I should just go and try to write Literature, but I love my imagination too much to do that. If there is any genre where playing with perception and mixing the abstract with the concrete can be utilized to its full potential, it is in one called fantasy.&#xA;&#xA;I am not claiming to be better than popular fantasy authors, but perhaps my goals are different. Once you&#39;ve read an author like Hemingway or Woolf or Joyce or Steinbeck it is hard not to be disappointed by everything else. My pompous author pipe dream represented by an imaginary review for one of my books is this: &#34;If Hemingway wrote fantasy.&#34; &#xA;&#xA;Clearly, I have a long way to go.&#xA;&#xA;#nonfiction #essay #publishing #writing&#xA;&#xA;---&#xA;&#xA;First, thank you for reading! To echo a sentiment from Thomas Hardy, it is a great regret that I will never be able to meet many of you in person and shake your hand, but perhaps we can virtually shake hands. It is a poor substitute, but it will have to do in this strange world. I promise I will not gum up your inbox.&#xA;&#xA;!--emailsub--&#xA;&#xA;---&#xA;&#xA;Send me a kind word or a cup of coffee:&#xA;&#xA;Patreon | Ko-Fi | Podcast | Mastodon |  Twitter | Github]]&gt;</description>
      <content:encoded><![CDATA[<h2 id="a-self-indulgent-rant-about-marketing" id="a-self-indulgent-rant-about-marketing">A self-indulgent rant about marketing</h2>

<p>It would be very easy for me to say that publishing is an industry, and that the reason I don&#39;t make enough money to even think about telling people I am an author when they ask the ubiquitously depressing get-to-know-you question is because I haven&#39;t invested in marketing or my platform, but I won&#39;t say that even though I just did.</p>



<p>Truthfully, I have no idea why my book doesn&#39;t sell. I could make some guesses: Its my first published work, I have no preexisting platform, I didn&#39;t spend any money on a campaign, it&#39;s self published, maybe it&#39;s just not very good. I could tell myself that I never really set out to sell a bunch of copies, but if I&#39;m honest being a full time author is my dream job, and that is impossible without book sales.</p>

<p>I want to be the exception, the unicorn, but I know the chances of that are worse than scratch-offs. “You have to think about it like a business”, “You&#39;ve gotta compartmentalize”, “View it like work” — all things I tell myself about marketing. Sometimes it works, but it feels dishonest to me. To market effectively you have to act like your book is the next <em>Lord of the Rings</em>, but I know it&#39;s not. I think <a href="https://www.hunterdansin.com/">Dawn Must Follow Night</a> is pretty unique and worth your time, but I wrote it, and I see more and more of its flaws as time passes. I have relinquished the false assumption that sales equals quality, but I don&#39;t want to sell my book because I persuade you into it. I want the weight of the words to carry it. If I can only become a better writer by spending time writing, then time spent marketing is a waste.</p>

<p>Yet I know that marketing is not evil. As with most activities it can be carried to harmful extremes, but it is not intrinsically bad or good, but that doesn&#39;t change that it feels slimy to me. I have tried to read recently traditionally published novels that are best sellers and the next big deal and am consistently underwhelmed and sometimes revolted. <em>Fifty Shades</em> was not one of the ones I tried to read, but it proved that drivel can sell. Great novels are rare for a reason, but the industry rolls forward and publishes not terrible but not great writing as if it were.</p>

<p>Maybe that&#39;s the problem. Great novels have a reputation for changing lives. Book blogs publish “100 must read books”, but the reality is that no book is a “must read.” Do I love reading? Of course. It teaches, convicts, encourages, and engages my mind daily — but with the exception of a collection of documents passed down through thousands of years of history about a carpenter&#39;s son from Nazareth, I hesitate to call any book “must read.” They are all written by people, and like people they are imperfect and gloriously opinionated. Perhaps this industry is so streamlined now that we have forgotten that books are not products. They are a vehicle for thoughts and ideas and stories.</p>

<p>Steinbeck writes about the sterilization of language in <em>Travel&#39;s with Charley in Search of America:</em></p>

<blockquote><p>“Radio and television speech becomes standardized, perhaps better English than we have ever used. Just as our bread, mixed and baked, packaged and sold without benefit of accident or human frailty, is uniformly good and uniformly tasteless, so will our speech become one speech.”</p></blockquote>

<p>Is that what is happening? Are we becoming such a product of television that uniform blandness has invaded not only our speech but our books as well? I could not tell you without reading more popular fiction, and I love classics too much to do that.</p>

<p>Perhaps marketing bothers me so much not because it is evil, but because it is bland. It seeks to appeal to the largest audience possible, and because of that it must be appealing to all. We who enjoy strong flavors and acquire a taste for the unique and often strange treasures of thought are put off. In popular fantasy and science fiction especially, success seems to be measured by whether or not you get a screen adaption, but writing as a medium is capable of so much more than a vehicle for plot and character. What is stopping prose from being as much a part of the experience as world building and character? What is stopping a fantasy novel from taking full advantage of the medium? Well, it takes a lot of practice to write like Hemingway, but the industry does not encourage fantasy authors who want to make a decent living to practice writing like that. The most popular ones are lauded for their ability to craft a plot and magic system, but rarely for prose or narrative technique. “Good” prose in the mainstream of the genre is “clear”, “descriptive”, maybe even “poetic” if it has some flavor.</p>

<p>Nobody looks for great masters of the written word in fantasy. They look for story tellers, dreamers, plot weavers. Perhaps I am crazy, and perhaps I should just go and try to write Literature, but I love my imagination too much to do that. If there is any genre where playing with perception and mixing the abstract with the concrete can be utilized to its full potential, it is in one called <em>fantasy.</em></p>

<p>I am not claiming to be better than popular fantasy authors, but perhaps my goals are different. Once you&#39;ve read an author like Hemingway or Woolf or Joyce or Steinbeck it is hard not to be disappointed by everything else. My pompous author pipe dream represented by an imaginary review for one of my books is this: “If Hemingway wrote fantasy.”</p>

<p>Clearly, I have a long way to go.</p>

<p><a href="https://blog.hdansin.com/tag:nonfiction" class="hashtag"><span>#</span><span class="p-category">nonfiction</span></a> <a href="https://blog.hdansin.com/tag:essay" class="hashtag"><span>#</span><span class="p-category">essay</span></a> <a href="https://blog.hdansin.com/tag:publishing" class="hashtag"><span>#</span><span class="p-category">publishing</span></a> <a href="https://blog.hdansin.com/tag:writing" class="hashtag"><span>#</span><span class="p-category">writing</span></a></p>

<hr/>

<p>First, thank you for reading! To echo a sentiment from Thomas Hardy, it is a great regret that I will never be able to meet many of you in person and shake your hand, but perhaps we can virtually shake hands. It is a poor substitute, but it will have to do in this strange world. I promise I will not gum up your inbox.</p>



<hr/>

<p>Send me a kind word or a cup of coffee:</p>

<p><a href="https://www.patreon.com/hdansin">Patreon</a> | <a href="https://ko-fi.com/hdansin">Ko-Fi</a> | <a href="https://zencastr.com/Raise-a-Glass">Podcast</a> | <a href="https://mastodon.social/web/@hdansin">Mastodon</a> |  <a href="https://twitter.com/hdansin">Twitter</a> | <a href="https://github.com/hdansin">Github</a></p>
]]></content:encoded>
      <guid>https://blog.hdansin.com/bland</guid>
      <pubDate>Tue, 31 Mar 2020 14:19:56 +0000</pubDate>
    </item>
    <item>
      <title>Self-Publishing with Pandoc and Latex: A Basic Guide</title>
      <link>https://blog.hdansin.com/self-publishing-with-pandoc-and-latex-a-basic-guide?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[When I first started writing my novel it was in LibreOffice Writer, but I quickly realized that while it worked well for essays and even my thesis, it was not ideal for writing fiction. At least, not for me. I wanted something stable and flexible enough to handle tens of thousands of words of dark, realistic fantasy. In addition, I wanted to make sure that when those tens of thousands of words were ready for publishing, I could convert the manuscript fairly easily from a single master file. &#xA;&#xA;This guide is what I wish I had when I started, and I&#39;m putting it together in case anyone else is curious or wants to use free and open source software to write and publish their novel.&#xA;&#xA;Disclaimer: I am no expert, but this is what worked for me. Feel free to ask questions/reply with suggestions.&#xA;&#xA;!--more--&#xA;&#xA;Step 1. Markdown&#xA;&#xA;Markdown is a markup language with the goal of being natural to read and use. If you are familiar with HTML, it should be a quick start. &#xA;&#xA;You don&#39;t really need to install anything to start using it, however I would suggest a dedicated markdown editor such as my personal favorite, Ghostwriter, to make the experience more streamlined. It&#39;s fairly minimal, but that&#39;s kind of the point. Writing requires focus, and Markdown does a great job of being practical and flexible while getting out of the way of the words. &#xA;&#xA;Honestly, markdown is so streamlined you can use pretty much any program you want to write fiction in it. Here&#39;s a quick example:&#xA;&#xA;Markdown:&#xA;&#xA;Part I&#xA;&#xA;Chapter 1&#xA; &#xA;&#xA;Once upon a time, there was a writer who wanted to write in italics. He felt, however, that the sentence was not strong enough in italics, so he wrote it in bold. Satisfied, he moved on to the next part by making a horizontal line.&#xA;&#xA;---&#xA;&#xA;Then he wrote the most important sentence he had ever written. So he bolded and italicized it.&#xA;&#xA;  Then when it came time to write a memoir about it, he put it in a block quote.&#xA;&#xA;The End&#xA;&#xA;Result:&#xA;&#xA;  # Part I&#xA;&#xA;  ## Chapter 1&#xA; &#xA;&#xA;  Once upon a time, there was a writer who wanted to write in italics. He felt, however, that the sentence was not strong enough in italics, so he wrote it in bold. Satisfied, he moved on to the next part by making a horizontal line.&#xA;&#xA;  ---&#xA;&#xA;  Then he wrote the most important sentence he had ever written, so he bolded and italicized it.&#xA;&#xA;    Then when it came time to write a memoir about it, he put it in a block quote.&#xA;&#xA;  # The End&#xA;&#xA;You can refer to a guide for more detailed information, but as you can see, it&#39;s fairly easy to get the hang of - especially since fiction writing does not require complex formatting. In addition, Markdown let me use a cool digital typewriter to do most of my drafting. Sometimes you have to go to extreme measures to avoid distractions.&#xA;&#xA;Step 2. Pandoc&#xA;&#xA;Markdown would not be that useful for authors if Pandoc did not exist. Pandoc allows you to convert your glorious manuscript.md into pretty much any file format under the face of the sun. Follow the installation instructions for your OS/distro and let&#39;s roll. &#xA;&#xA;Keep in mind Pandoc is a command-line program, which might be intimidating if you have never used a command line before, but their documentation is top-notch and with a little patience you&#39;ll be generating .epubs and .pdfs like a real hacker. &#xA;&#xA;E-book&#xA;&#xA;The .epub file type is the standard for e-books. Amazon has .mobi, but since you can upload to KDP with .epub it&#39;s not really worth it to generate with Pandoc unless you have a kindle that you want to export your manuscript to.&#xA;&#xA;Generating .epubs is fairly simple with Pandoc, as the formatting requirements are not as strict as print-ready .pdfs, but it is not without its challenges. If you feel confident you can skip my guide and go right to Pandoc&#39;s guide for creating .epubs. Otherwise here&#39;s a basic step by step:&#xA; &#xA; &#xA;First, navigate to the directory where your manuscript is located, then open a terminal/shell. On the  command line type:&#xA; &#xA;pandoc yourmanuscript.md -o yourbookname.epub&#xA;&#xA;Then press enter. Boom! You now have an .epub. Well done! &#xA;&#xA;We&#39;re not done, however. Something useful to include is a table of contents, and fortunately, Pandoc can handle that. Simply add --toc after Pandoc.&#xA;&#xA;Another option I used is --top-level-division=part. This will tell Pandoc to define the highest level heading in your manuscript as a part rather than a chapter. If you don&#39;t use parts, you can skip this because it is set to chapter by default. Altogether it will look something like this:&#xA;&#xA;pandoc --toc --top-level-division=part yourmanuscript.md -o yourbookname.epub&#xA;&#xA;Before you upload and become a self-published millionaire, make you sure you take care of your metadata. This is pretty easy with Pandoc. Just add a yaml metadata block to the top of your manuscript. It&#39;ll look something like this:&#xA;&#xA;---&#xA;title:&#xA;type: main&#xA;  text: My Awesome Title&#xA;creator:&#xA;role: author&#xA;  text: My Awesome Name&#xA;publisher: My Awesome Publishing Company&#xA;identifier: &#xA;scheme: ISBN-13&#xA;  text: 978-0-57-855858-5&#xA;rights: © Year My Awesome Name&#xA;rights: All Rights Reserved&#xA;---&#xA;&#xA;Note: identifier: is only necessary if you actually have an ISBN. Even then, you don&#39;t need an ISBN to publish just an e-book. &#xA;&#xA;With the yaml block at the top of your document, Pandoc will be able to read it and attribute it to the .epub. For more documentation click here.&#xA;&#xA;Step 3. Latex&#xA;&#xA;Here&#39;s where it gets juicy. Pandoc does a pretty decent job of outputting .pdfs by default, but figuring out how to format them for print on demand took me a lot longer than I thought it would. &#xA;&#xA;Pandoc uses a default template to format the .pdfs, and while they look okay, they were not adequate for print on demand. I decided the easiest way to get the .pdfs I wanted was to modify the Pandoc Latex template and tell Pandoc to use that template. Fortunately, you don&#39;t have to sit through the long hours of tinkering it took me to get that working.&#xA;&#xA;First, make sure you have latex installed. Latex is a .pdf engine that is capable of making beautiful print-ready documents. On most linux distributions, there is a handy &#34;texlive-all&#34; package you can install to get all the dependencies and extensions. On Windows and Mac, Pandoc recommends installing latex via MiKTeX.&#xA;&#xA;Next, let&#39;s copy the default Pandoc template so we can modify it. The easiest way to do this is to tell Pandoc to output its default latex template into our custom template with:&#xA;&#xA;pandoc -D latex   custombook.latex&#xA;&#xA;Alternatively, you can go to the directory where Pandoc stores the templates, find &#34;default.latex&#34;, copy it, and rename it.&#xA;&#xA;Next, open your custom template file and add these modifications after line 7:&#xA;&#xA;% DEFINE DOCUMENT CLASS HD&#xA;\documentclass{book}&#xA;&#xA;% DEFINE PHYSICAL DOCUMENT SETTINGS HD&#xA;% media settings&#xA;\usepackage[paperwidth=5.5in, paperheight=8.5in]{geometry}&#xA;&#xA;% FORMAT CHAPS AND HEADER HD&#xA;\usepackage{titlesec} % make chapters start on a new page, and remove auto-generated chapter headings HD&#xA;\titleformat{\chapter}[display]&#xA;&#x9;{\normalfont\bfseries}{}{0pt}{\Large}&#xA;&#xA;\usepackage{tocstyle} %make the TOC pretty HD&#xA;\usetocstyle{noonewithdot}&#xA;&#xA;\usepackage{fancyhdr} % make the headers pretty HD&#xA;\pagestyle{fancy}&#xA;\fancypagestyle{plain}{%&#xA;&#x9;\fancyhead{}&#xA;&#x9;\renewcommand{\headrulewidth}{0pt}&#xA;&#x9;}&#xA;\fancyhead{}&#xA;\fancyhead[RO, LE]{\leftmark}&#xA;\renewcommand{\headrulewidth}{0pt}&#xA;&#xA;\makeatletter % remove header from chapter pages automatically HD&#xA;  \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else&#xA;  \hbox{}&#xA;  \vspace*{\fill}&#xA;  \vspace{\fill}&#xA;  \thispagestyle{empty}&#xA;  \newpage&#xA;  \if@twocolumn\hbox{}\newpage\fi\fi\fi}&#xA;\makeatother&#xA;&#xA;Some notes:&#xA;  I am not an expert, but this is what worked for me. If you run into problems, check the forums and documentation.&#xA;  Make sure to delete the other \documentclass{} definition before replacing it with \documentclass{book} .&#xA;  Under %media settings make sure to input the dimensions you desire.&#xA;  If you get errors, read them. They can be very useful in figuring out what went wrong. Sometimes it&#39;s as simple as a missing {.&#xA;  Latex is very powerful, and I am sure there is a lot more you can do with it. Feel free to experiment and improve upon these modifications. &#xA;  Documentation is your friend. Sometimes sitting down and reading it is a lot more efficient than searching the forums, plus you learn more.&#xA;&#xA;After you modify the custom template, you have to tell Pandoc to use it with --template=custombook.latex. Make sure your template is in the same directory as Pandoc&#39;s defaults. If you don&#39;t know where those are you can search for the file &#34;default.latex&#34;. &#xA;&#xA;Now we&#39;re ready to generate it. Here&#39;s what your final command should look like:&#xA;&#xA;pandoc --toc --template=custombook.latex yourmanuscript.md -o yourbook.pdf&#xA;&#xA;In order to format the table of contents satisfactorily I had to remove the numbers from my chapter headings in my manuscript because --toc numbers the sections and it looked odd. Your mileage may vary but if you figure out an easier way to do this, let me know.&#xA;&#xA;Step 4. Publish&#xA;&#xA;Congrats! Now you can upload your manuscript to Amazon, Barnes and Noble, Kobo, Ingram Spark, and just about anywhere you want. I won&#39;t bore you with a tutorial for those because if you got this far, you can figure out those web interfaces pretty easily. &#xA;&#xA;For a cover, I used Canva and a vector drawing of the moon I did with Inkscape. I was able to use the same .png for all e-book platforms, but for print, I downloaded the .pdf templates for each one and used LibreOffice Draw to modify them. There are myriad cover tutorials out there if you need help, or you can hire a designer at a marketplace like Reedsy.&#xA;&#xA;#nonfiction #howto #publishing&#xA;&#xA;---&#xA;&#xA;First, thank you for reading! I sincerely hope it helps. To echo a sentiment from Thomas Hardy, it is a great regret that I will never be able to meet many of you in person and shake your hand, but perhaps we can virtually shake hands. It is a poor substitute, but it will have to do in this strange world. I promise I will not gum up your inbox.&#xA;&#xA;!--emailsub--&#xA;&#xA;---&#xA;&#xA;Send me a kind word or a cup of coffee:&#xA;&#xA;Patreon | Ko-Fi | Podcast | Mastodon |  Twitter | Github]]&gt;</description>
      <content:encoded><![CDATA[<p>When I first started writing <a href="https://write.as/hdansin/dawn-must-follow-night">my novel</a> it was in LibreOffice Writer, but I quickly realized that while it worked well for essays and even my thesis, it was not ideal for writing fiction. At least, not for me. I wanted something stable and flexible enough to handle tens of thousands of words of dark, realistic fantasy. In addition, I wanted to make sure that when those tens of thousands of words were ready for publishing, I could convert the manuscript fairly easily from a single master file.</p>

<p>This guide is what I wish I had when I started, and I&#39;m putting it together in case anyone else is curious or wants to use free and open source software to write and publish their novel.</p>
<ul><li>Disclaimer: I am no expert, but this is what worked for me. Feel free to ask questions/reply with suggestions.</li></ul>



<h2 id="step-1-markdown" id="step-1-markdown">Step 1. Markdown</h2>

<p><a href="https://www.markdownguide.org" title="MD Guide">Markdown</a> is a markup language with the goal of being natural to read and use. If you are familiar with HTML, it should be a quick start.</p>

<p>You don&#39;t really need to install anything to start using it, however I would suggest a dedicated markdown editor such as my personal favorite, <a href="http://wereturtle.github.io/ghostwriter/" title="ghostwriter">Ghostwriter</a>, to make the experience more streamlined. It&#39;s fairly minimal, but that&#39;s kind of the point. Writing requires focus, and Markdown does a great job of being practical and flexible while getting out of the way of the words.</p>

<p>Honestly, markdown is so streamlined you can use pretty much any program you want to write fiction in it. Here&#39;s a quick example:</p>

<h3 id="markdown" id="markdown">Markdown:</h3>

<pre><code># Part I


## Chapter 1
 

Once upon a time, there was a writer who wanted to write *in italics.* He felt, however, that the sentence was not strong enough *in italics,* so he wrote it **in bold**. Satisfied, he moved on to the next part by making a horizontal line.


---


*__Then he wrote the most important sentence he had ever written. So he bolded and italicized it.__*

&gt;Then when it came time to write a memoir about it, he put it in a block quote.

# The End
</code></pre>

<h3 id="result" id="result">Result:</h3>

<blockquote><h1 id="part-i" id="part-i">Part I</h1>

<h2 id="chapter-1" id="chapter-1">Chapter 1</h2>

<p>Once upon a time, there was a writer who wanted to write <em>in italics.</em> He felt, however, that the sentence was not strong enough <em>in italics,</em> so he wrote it <strong>in bold</strong>. Satisfied, he moved on to the next part by making a horizontal line.</p>

<hr/>

<p><em><strong>Then he wrote the most important sentence he had ever written, so he bolded and italicized it.</strong></em></p>

<blockquote><p>Then when it came time to write a memoir about it, he put it in a block quote.</p></blockquote>

<h1 id="the-end" id="the-end">The End</h1>
</blockquote>

<p>You can refer to a <a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" title="Markdown Cheatsheet">guide</a> for more detailed information, but as you can see, it&#39;s fairly easy to get the hang of – especially since fiction writing does not require complex formatting. In addition, Markdown let me use a cool <a href="https://en.wikipedia.org/wiki/AlphaSmart" title="Alphasmart">digital typewriter</a> to do most of my drafting. Sometimes you have to go to extreme measures to avoid distractions.</p>

<h2 id="step-2-pandoc" id="step-2-pandoc">Step 2. Pandoc</h2>

<p>Markdown would not be that useful for authors if <a href="https://Pandoc.org/installing.html" title="Pandoc">Pandoc</a> did not exist. Pandoc allows you to convert your glorious manuscript.md into pretty much any file format under the face of the sun. Follow the <a href="https://Pandoc.org/installing.html">installation instructions</a> for your OS/distro and let&#39;s roll.</p>

<p>Keep in mind Pandoc is a command-line program, which might be intimidating if you have never used a command line before, but their <a href="https://Pandoc.org/MANUAL.html" title="Pandoc Documentation">documentation</a> is top-notch and with a little patience you&#39;ll be generating .epubs and .pdfs like a real hacker.</p>

<h3 id="e-book" id="e-book">E-book</h3>

<p>The .epub file type is the standard for e-books. Amazon has .mobi, but since you can upload to KDP with .epub it&#39;s not really worth it to generate with Pandoc unless you have a kindle that you want to export your manuscript to.</p>

<p>Generating .epubs is fairly simple with Pandoc, as the formatting requirements are not as strict as print-ready .pdfs, but it is not without its challenges. If you feel confident you can skip my guide and go right to <a href="https://Pandoc.org/epub.html">Pandoc&#39;s guide</a> for creating .epubs. Otherwise here&#39;s a basic step by step:</p>

<p>First, navigate to the directory where your manuscript is located, then open a terminal/shell. On the  command line type:</p>

<pre><code>pandoc yourmanuscript.md -o yourbookname.epub
</code></pre>

<p>Then press enter. Boom! You now have an .epub. Well done!</p>

<p>We&#39;re not done, however. Something useful to include is a table of contents, and fortunately, Pandoc can handle that. Simply add <code>--toc</code> after <code>Pandoc</code>.</p>

<p>Another option I used is <code>--top-level-division=part</code>. This will tell Pandoc to define the highest level heading in your manuscript as a part rather than a chapter. If you don&#39;t use parts, you can skip this because it is set to <code>chapter</code> by default. Altogether it will look something like this:</p>

<pre><code>pandoc --toc --top-level-division=part yourmanuscript.md -o yourbookname.epub
</code></pre>

<p>Before you upload and become a self-published millionaire, make you sure you take care of your metadata. This is pretty easy with Pandoc. Just add a yaml metadata block to the top of your manuscript. It&#39;ll look something like this:</p>

<pre><code>---
title:
- type: main
  text: My Awesome Title
creator:
- role: author
  text: My Awesome Name
publisher: My Awesome Publishing Company
identifier: 
- scheme: ISBN-13
  text: 978-0-57-855858-5
rights: © Year My Awesome Name
rights: All Rights Reserved
---
</code></pre>
<ul><li>Note: <code>identifier:</code> is only necessary if you actually have an ISBN. Even then, you don&#39;t need an ISBN to publish just an e-book.</li></ul>

<p>With the yaml block at the top of your document, Pandoc will be able to read it and attribute it to the .epub. For more documentation click <a href="https://Pandoc.org/MANUAL.html#creating-epubs-with-Pandoc" title="epubswithPandoc">here</a>.</p>

<h3 id="step-3-latex" id="step-3-latex">Step 3. Latex</h3>

<p>Here&#39;s where it gets juicy. Pandoc does a pretty decent job of outputting .pdfs by default, but figuring out how to format them for print on demand took me a lot longer than I thought it would.</p>

<p>Pandoc uses a default template to format the .pdfs, and while they look okay, they were not adequate for print on demand. I decided the easiest way to get the .pdfs I wanted was to modify the Pandoc Latex template and tell Pandoc to use that template. Fortunately, you don&#39;t have to sit through the long hours of tinkering it took me to get that working.</p>

<p>First, make sure you have latex installed. Latex is a .pdf engine that is capable of making beautiful print-ready documents. On most linux distributions, there is a handy “texlive-all” package you can install to get all the dependencies and extensions. On Windows and Mac, Pandoc recommends installing latex via <a href="https://miktex.org" title="miktex">MiKTeX</a>.</p>

<p>Next, let&#39;s copy the default Pandoc template so we can modify it. The easiest way to do this is to tell Pandoc to output its default latex template into our custom template with:</p>

<pre><code>pandoc -D latex &gt; custombook.latex
</code></pre>

<p>Alternatively, you can go to the directory where Pandoc stores the templates, find “default.latex”, copy it, and rename it.</p>

<p>Next, open your custom template file and add these modifications after line 7:</p>

<pre><code>% DEFINE DOCUMENT CLASS HD
\documentclass{book}


% DEFINE PHYSICAL DOCUMENT SETTINGS HD
% media settings
\usepackage[paperwidth=5.5in, paperheight=8.5in]{geometry}

% FORMAT CHAPS AND HEADER HD
\usepackage{titlesec} % make chapters start on a new page, and remove auto-generated chapter headings HD
\titleformat{\chapter}[display]
	{\normalfont\bfseries}{}{0pt}{\Large}

\usepackage{tocstyle} %make the TOC pretty HD
\usetocstyle{noonewithdot}


\usepackage{fancyhdr} % make the headers pretty HD
\pagestyle{fancy}
\fancypagestyle{plain}{%
	\fancyhead{}
	\renewcommand{\headrulewidth}{0pt}
	}
\fancyhead{}
\fancyhead[RO, LE]{\leftmark}
\renewcommand{\headrulewidth}{0pt}

\makeatletter % remove header from chapter pages automatically HD
  \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  \hbox{}
  \vspace*{\fill}
  \vspace{\fill}
  \thispagestyle{empty}
  \newpage
  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
</code></pre>
<ul><li>Some notes:
<ul><li>I am not an expert, but this is what worked for me. If you run into problems, check the forums and documentation.</li>
<li>Make sure to delete the other \documentclass{} definition before replacing it with \documentclass{book} .</li>
<li>Under <code>%media settings</code> make sure to input the dimensions you desire.</li>
<li>If you get errors, read them. They can be very useful in figuring out what went wrong. Sometimes it&#39;s as simple as a missing <code>{</code>.</li>
<li>Latex is very powerful, and I am sure there is a lot more you can do with it. Feel free to experiment and improve upon these modifications.</li>
<li>Documentation is your friend. Sometimes sitting down and reading it is a lot more efficient than searching the forums, plus you learn more.</li></ul></li></ul>

<p>After you modify the custom template, you have to tell Pandoc to use it with <code>--template=custombook.latex</code>. Make sure your template is in the same directory as Pandoc&#39;s defaults. If you don&#39;t know where those are you can search for the file “default.latex”.</p>

<p>Now we&#39;re ready to generate it. Here&#39;s what your final command should look like:</p>

<pre><code>pandoc --toc --template=custombook.latex yourmanuscript.md -o yourbook.pdf
</code></pre>

<p>In order to format the table of contents satisfactorily I had to remove the numbers from my chapter headings in my manuscript because <code>--toc</code> numbers the sections and it looked odd. Your mileage may vary but if you figure out an easier way to do this, let me know.</p>

<h2 id="step-4-publish" id="step-4-publish">Step 4. Publish</h2>

<p>Congrats! Now you can upload your manuscript to Amazon, Barnes and Noble, Kobo, Ingram Spark, and just about anywhere you want. I won&#39;t bore you with a tutorial for those because if you got this far, you can figure out those web interfaces pretty easily.</p>

<p>For a cover, I used <a href="https://www.canva.com" title="canva">Canva</a> and a vector drawing of the moon I did with Inkscape. I was able to use the same .png for all e-book platforms, but for print, I downloaded the .pdf templates for each one and used LibreOffice Draw to modify them. There are myriad cover <a href="https://kindlepreneur.com/book-cover-design/">tutorials</a> out there if you need help, or you can hire a designer at a marketplace like <a href="https://reedsy.com/design/book-cover-design">Reedsy</a>.</p>

<p><a href="https://blog.hdansin.com/tag:nonfiction" class="hashtag"><span>#</span><span class="p-category">nonfiction</span></a> <a href="https://blog.hdansin.com/tag:howto" class="hashtag"><span>#</span><span class="p-category">howto</span></a> <a href="https://blog.hdansin.com/tag:publishing" class="hashtag"><span>#</span><span class="p-category">publishing</span></a></p>

<hr/>

<p>First, thank you for reading! I sincerely hope it helps. To echo a sentiment from Thomas Hardy, it is a great regret that I will never be able to meet many of you in person and shake your hand, but perhaps we can virtually shake hands. It is a poor substitute, but it will have to do in this strange world. I promise I will not gum up your inbox.</p>



<hr/>

<p>Send me a kind word or a cup of coffee:</p>

<p><a href="https://www.patreon.com/hdansin">Patreon</a> | <a href="https://ko-fi.com/hdansin">Ko-Fi</a> | <a href="https://zencastr.com/Raise-a-Glass">Podcast</a> | <a href="https://mastodon.social/web/@hdansin">Mastodon</a> |  <a href="https://twitter.com/hdansin">Twitter</a> | <a href="https://github.com/hdansin">Github</a></p>
]]></content:encoded>
      <guid>https://blog.hdansin.com/self-publishing-with-pandoc-and-latex-a-basic-guide</guid>
      <pubDate>Sat, 17 Aug 2019 17:57:01 +0000</pubDate>
    </item>
  </channel>
</rss>