Using LaTeX for typesetting short story anthologies and novels

Nearly every year since 2009, the Writing Journey has had groups of people hard at work at writing, revising and self-publishing collections of short stories and poems. The anthologies have been one of my personal favorite Paths. They take us from idea to draft through critiques and editing (at least three rounds of that) to the joy of final publication.

Each year we have mostly relied upon Google docs for writing, editing and critiquing; and on Microsoft Word for the final publication. Unfortunately, MS Word is not the best tool for typesetting and can frequently produce sub-standard results. Getting things to look great (as Steve White did with Drops of Midnight (2012) and as Roger Lubeck did with The Day Before the End of the World (2012), Stories from Other Worlds (2014), and Voices from the Dark (2015)) takes a tremendous amount of work.

There is a better way: LaTeX. LaTeX is a typesetting system based on the harder-to-use TeX system. LaTeX was created by Leslie Lamport in 1985. It comprises a set of simple mark-up characterized by backslash commands that are interspersed throughout plain ASCII text. LaTeX is still widely used in academia in part because of its powerful ability to handle typesetting of mathematical and scientific equations. It arguably produces more beautiful results than competing solutions.

I confess that I tried LaTeX back in grad school, but it was a very brief fling. We had Interleaf that was, to my mind back then, far superior because of its WYSIWYG interface.

Recently, however, I decided to take another look at LaTeX. I’ve been writing my novels and short stories using vim, markdown and pandoc. ViM is a moded text editor, something that lets you do everything without your hands leaving the keyboard (no mouse required). Touch typists can be extremely efficient in writing with vim. Markdown is a minimal mark-up language that one can apply to ASCII text documents so they can be converted to other formats. pandoc is the tool that does the conversion. You can use pandoc to turn markdown marked-up text files into .docx or .html or into LaTeX.

It occurred to me that one could take the google docs that we use, download them as .docx files, use pandoc to convert them and then simply \input the converted LaTeX files into a LaTeX template, allowing us to produce nicely typeset PDF files with much greater ease and much less manual fiddling than had been required with Microsoft Word. I did some research and discovered that LaTeX is indeed very powerful and, once the template has been set up, it is relatively little work compared to the Microsoft Word workflow. Others have noted LaTeX’s superiority when it comes to aesthetics of the finished product.

Ryan Schuetzler notes: “The benefit of the separation of content and formatting is that changing the formatting can be done independent of the content of the document.” This especially comes to play when you are deciding to make fairly sweeping changes in presentation. E.g., how do you want the chapter titles to appear? With LaTeX, these can be set up with a macro. To make the change, just change the macro in one place and recompile the PDF. To do the same thing in Word would require not only changes to Word styles (which remains a dicey proposition–you are never sure whether you’ve changed every instance of a given style in a document) but might also require changes in layout in each individual chapter.

So the steps are:

  1. Download google docs (in .docx format)
  2. pandoc -f docx file.docx -t html -o file.html # Use pandoc to convert the .docx to .html
  3. pandoc -f html file.html -t markdown -o file.md # Use pandoc to convert .html to markdown
  4. pandoc -f markdown file.md -t latex -o file.tex # Use pandoc to convert markdown to LaTeX
  5. \input{file.tex} inside your template
  6. edit the template to add author, title, date and chapter (and chapter-author) names
  7. lualatex template.tex # You will need to run this twice the first time to generate the table of contents; it also generates the PDF file

I used lualatex, which is one of the distributions of LaTeX. Some websites recommended xetex. I used lualatex in ubuntu Linux, but it should also be possible to use it in Windows (perhaps as part of the MikTeX or TeX-live distributions).

Here’s the template (you can also see the resulting PDF). Yes, it may look scary, but there are only a small handful of lines that would need to be changed to link in your content. The rest are parameters that can be tweaked (e.g., what font you use).

Everything on a line after a % is ignored (comment).

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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
% ============================================================================
% SIMPLE NOVEL TEMPLATE for LaTeX
% Also good for short story anthologies
% 6" x 9" book through CreateSpace or Lulu
% Built by NewMexicoKid 2017-08-05
% Based on the answer by https://tex.stackexchange.com/users/30640/user12711
% Ref: https://tex.stackexchange.com/questions/66902/latex-template-for-typesetting-a-novel
% ============================================================================
\documentclass[ebook,11pt,twoside,openright]{memoir}
\usepackage[paperwidth=6.125in,paperheight=9.25in,top=69.0pt,bottom=66.0pt,headsep=21pt,headheight=66.0pt,outer=36pt,inner=53pt,heightrounded=true]{geometry
}
% Use this to debug: showframe

%------------------------------------------------------------------------------
% Widows and orphans
% \usepackage[defaultlines=4,all]{nowidow} % get rid of widow lines - but bottom becomes ragged
\emergencystretch 3em
\widowpenalty=4500
\clubpenalty=4500
\setlength{\parskip}{3ex plus 2ex minus 2ex}
%------------------------------------------------------------------------------

\usepackage{textcomp} % Not sure what this does
\usepackage{verse} % for poetry, but you need to end each line with \\
\usepackage{alltt} % for PRE-formatted poetry

%------------------------------------------------------------------------------
% FONTS:
\usepackage[no-math]{fontspec} % Lets one use system fonts (but with no math)

% Enabling drop caps
\begin{filecontents}{Zallman.sty}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{Zallman}[2007/11/24 v1.0 Zallman CFR]

\input Zallman.fd

\DeclareRobustCommand{\Zallmanfamily
}{%
\fontencoding{U}%
\fontseries{xl}%
\fontshape{n}%
\fontfamily{Zallman}%
\selectfont}
\DeclareTextFontCommand{\zall}{\Zallmanfamily}

\endinput
%% end Zallman.sty
\end{filecontents}
\usepackage[utf8]{inputenc}
\usepackage{lettrine,Zallman}
\renewcommand{\LettrineFontHook}{\Zallmanfamily
}

%------------------------------------------------------------
% Enabling black out for blacking out/censoring text with the \blackout command
\newlength{\blackoutwidth}
\newcommand{\blackout
}[1]
{%necessary comment
\settowidth{\blackoutwidth}{#1}%necessary comment
\rule[-0.3em]{\blackoutwidth}{1.125em}%necessary comment
}
%------------------------------------------------------------

\setmainfont{Cardo} % Cardo font; https://www.fontsquirrel.com/fonts/cardo
% --- Supports bolding
% \setmainfont{EBGaramond} % EBGaramond font; this is the free Garamond clone
% You can get EBGaramond from https://www.fontsquirrel.com/fonts/eb-garamond
% --- Bolding doesn't show up well
% \setmainfont{Rosarivo} % Rosarivo font; see https://www.fontsquirrel.com/fonts/rosarivo
% --- Didn't seem as complete
% \setmainfont{Crimson} % Crimson font; https://github.com/skosch/Crimson
% --- Supports bolding
%------------------------------------------------------------------------------

\let\footruleskip\undefined
\usepackage{fancyhdr} % fancy headers
\usepackage{microtype} % use this to improve typography
\usepackage{hyphenat}\hyphenation{my-word, hyphen-ate, never, hyphen}

%------------------------------------------------------------------------------
% bottom margin consistency
\usepackage{setspace}
\frenchspacing\flushbottom % fairly consistent bottom margin
\OnehalfSpacing % line spacing set to 1.5 instead of 1
%
% \usepackage{setspace}\onehalfspacing\frenchspacing\flushbottom
% \usepackage{setspace}\onehalfspacing\frenchspacing\raggedbottom
% https://tex.stackexchange.com/questions/65355/flushbottom-vs-raggedbottom
% \setstretch{1.15}
% \setlength{\dimen0}{\textheight}
% \addtolength{\dimen0}{-\topskip}
% \divide\dimen0\baselineskip
% \setlength{\textheight}{\number\dimen0 \baselineskip}
% \addtolength{\textheight}{\topskip}
%------------------------------------------------------------------------------

\usepackage[normalem]{ulem} % Needed for \sout (strikeout)
\usepackage{suffix} % Needed for different chapter headings
\usepackage[english]{babel}

%------------------------------------------------------------------------------
% Table of Contents
\usepackage{etoc}% only so far to enable multiple uses of "\tableofcontents"
% maybe the document class already allows it.

\usepackage[newparttoc]{titlesec}
% Originally \usepackage{titlesec}; not sure what newparttoc does
% remove chapter name and number: http://blog.chapagain.com.np/latex-remove-chapter-name-and-number/
\titleformat{\chapter}[display]
{\normalfont\bfseries}{}{0pt}{\Huge}
\usepackage{titletoc
} %

\titleformat{\part}[display]
{\Huge\scshape\filright\centering}
{}
{20pt}
{\thispagestyle{empty}}
\titlecontents{part}[0pt]{\addvspace{2pc}\centering\large\bfseries}{}{}{
}%
%------------------------------------------------------------------------------

\usepackage{emptypage} % No headers on empty pages

\DeclareRobustCommand*\AUTHOR [1]{}
\newcommand\SHOWAUTHORS {%
\DeclareRobustCommand*\AUTHOR [1]{{\normalfont\small\itshape ##1}}}

%===================================================================================
% https://tex.stackexchange.com/questions/156862/displaying-author-for-each-chapter-in-book
% The following code not only displays chaptername and author in the TOC but also at the
% start of each chapter.
\makeatletter
\newcommand\newchapter[2] {\gdef\@chaptertitle{#1}\gdef\@chapterauthor{#2}\chapter[#1 / \AUTHOR{#2}]{#1}\printchapterauthor{#2}}
\newcommand\@chapterauthor{}
\newcommand\@chaptertitle{}
\fancypagestyle{mystyle
}{%
\fancyhf{}%
\fancyhead[LE]{\thepage\quad\textsc{\@chaptertitle}}%
\fancyhead[RO]{\textsc{\@chapterauthor}\quad\thepage}%}
\renewcommand{\chaptermark}[1]{\markboth{##1}{}}%
}
\makeatother

\setcounter{secnumdepth}{0}
\renewcommand{\chaptername}{}
\renewcommand{\thechapter}{}

\makeatletter
\newcommand{\printchapterauthor
}[1]{%
{\parindent0pt\vspace*{-25pt}%
\linespread{1.1}\large\scshape#1%
\par\nobreak\vspace*{35pt}}
\@afterheading%
}
\makeatother
%===================================================================================

% ---------------------------------------------
% Fancy headers with story name and author
% Refers back to mystyle defined above
% ---------------------------------------------
\pagestyle{mystyle} %fancy
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
% ---------------------------------------------
% bold, no-indent Inspiration with \medbreak
% ---------------------------------------------
\makeatletter
\newcommand{\inspire}[1]{
\medbreak
{\parindent0pt % no indentation for this section
\textbf{#1}
}
}
\makeatother
% -----------------------------------------------
% authorsc - small caps and bold the author name
% -----------------------------------------------
\makeatletter
\newcommand\authorsc[1]{\textbf{\textsc{#1}}}
\makeatother

% ========================================================================
% Needed for scene breaks with a "flowerleft" flourish
\usepackage{adforn}

% \Scene macro is used for scene breaks * * * * *
%%% \makeatletter
%%% \newcommand{\Scene}{%
%%% \par\nobreak\@afterheading
%%% \vspace{\topsep}
%%% \addvspace{\topsep\relax}
%%% \noindent\hfil%
%%% \adfflourishleftdouble\quad\adfflowerleft\quad\adfflourishrightdouble%
%%% \hfil\par%
%%% \vspace{\topsep}
%%% \@afterindentfalse\@afterheading%
%%% }
%%% \makeatother

\makeatletter
\newcommand{\Scene}{%
\par\nobreak\@afterheading
\bgroup
\begin{center}%
\addvspace{\topsep}
{{\adfflourishleftdouble\quad\adfflowerleft\quad\adfflourishrightdouble}
}%
\end{center}
\egroup\@afterindentfalse\@afterheading
}
\makeatother
% ========================================================================

% ---------------------------------------------------------------------------
% use begin{itpars} ... end{itpars} around blocks of text to be italicized
% https://tex.stackexchange.com/questions/258394/make-block-of-text-italicized
\newenvironment{itpars}
{\par\itshape}
{\par
}
% ---------------------------------------------------------------------------
% --------------------------------------------------------------------------
% hyperlinks for the e-book and PDF
\usepackage{hyperref}
\usepackage{color}
\definecolor{Blue}{RGB}{4, 6, 145}
\hypersetup{colorlinks,linktocpage,linkcolor=Blue,urlcolor=Blue
} % linktoc=all,
% --------------------------------------------------------------------------

% ===============================================================
% Provide the author, title and date for the title page
\author{A Bunch of Authors} \title{Our Little Short Story Anthology} \date{2017-08-15}
% ===============================================================

\usepackage{babel} % - for lorem ipsum
\usepackage{blindtext} % -- just for lorem ipsum

\begin{document}
\setlength{\parskip}{0pt
}

\frontmatter % the front of the book has (lowercase) roman numerals
\SHOWAUTHORS
% \tableofcontents
% -------------------------------------
% Import the front matter pages
\input{Front_Matter.tex}\clearpage
% -------------------------------------

\mainmatter % the main part of the book will have standard pages
%
% ======================================================================
%
% Import the chapters; specify chapter title and author with \newchapter
\part{Book One}
\newchapter{Story One}{Author One}
% \input{Story_One}
\Blindtext\clearpage
\Blindtext\clearpage
\Blindtext\clearpage
\clearpage
\newchapter{Story Two}{Author Two}
% \input{Story_Two}
\Blindtext\clearpage
\Blindtext\clearpage
\Blindtext\clearpage
\clearpage
\part{Book Two}
\newchapter{Story Three}{Author One}
% \input{Story_One}
\Blindtext\clearpage
\Blindtext\clearpage
\Blindtext\clearpage
\clearpage
\newchapter{Story Four}{Author Three}
% \input{Story_Two}
\Blindtext\clearpage
\Blindtext\clearpage
\Blindtext\clearpage
\clearpage
% ======================================================================
\end{document}

\Blindtext is just to put some sample text in. Normally you would replace that with the \input{file} command.

 Here’s the code for the front matter

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
73
74
75
76
77
78
79
80
81
82
83
84
85
% \begin{figure}[htbp]
% \centering
% \includegraphics[width=3.2in]{title_image.png}
% \end{figure}

\thispagestyle{empty}
\vspace*{1.5in}
\begin{center}
\fontsize{50}{60}\selectfont ANTHOLOGY TITLE
\end{center}

\vspace{1.0in}

\begin{center}
\Huge Author Name
\end{center
}

% \vspace{1.1in}
\vfill

\begin{center}
\emph{\large{06 August 2017}}
\end{center}

\clearpage

\vspace*{4.5cm}

\begin{center}
\Huge \textsc{Interior Book Title}
\end{center}

\vspace{2em
}

{\parindent0pt % no indentation for this section
Written by Author Name

\vspace{2em}

Copyright \textcopyright 2017 by Author Name

All rights reserved. Printed in the United States of America. No part of
this book may be used or reproduced in any manner whatsoever without
written permission except in the case of brief quotations embodied in
critical articles and reviews.

\vspace{2em
}

ISBN XXX TO BE FILLED IN

% \vspace{2em}
\vfill
Cover Design by A Book Cover Designer
} %end no indent

\clearpage

\emph{This page constitutes a continuation of the copyright page.}

\begin{center}

\emph{Story One} copyright \textcopyright 2017 by Author Name

\emph{Story Two} copyright \textcopyright 2017 by Other Author

\end{center}

\clearpage

\tableofcontents*

\clearpage

\section{Acknowledgements}\label{acknowledgements}

The Editors of this anthology would like to thank folks.

\section{Introduction}\label{introduction
}

\Blindtext
\Blindtext

% -------------------------------------

 

Thirteen lines…what’s the gee-whiz?

1-mouse Regular readers of this blog may remember that I’m following along with the Writing Excuses master class in fiction writing. Slowly. As in, I’m still working on assignments that were given back in April, but at least I’m working on them. For the assignment I’m on right now, I’m supposed to share the first 13 lines of a story, and then ask alpha readers—that would be you, if you choose to accept the assignment—what they think the “gee-whiz” of the piece is. In other words, what is the reason for telling the story? Is it a certain interesting society, character, piece of tech, kind of magic, or what? In that spirit, I’m sharing the first 13 lines of a story I’m writing, and asking for responses. Can you guess/predict the gee-whiz?

Kimberley savored a celebratory caramel macchiato in the coffee garden across from campus. Her eyes rested on a bed of pink tulips under a flowering crabapple tree as a light bubble of joy filled her chest. Her old implant pinged. Even before installing her upgrade, she was already thinking of her implant as the “old” one. Marco’s tone. She bit her lip. She’d hoped to tell her mother about her placement first. Mom would have the perfect reaction, but Kimberley’s ping to her had so far gone unanswered. She planned to tell Marco, too, though his response might dampen her mood.

As if anything could. He might not be as happy for her as she might wish, but they would both get over it. And she wanted to hear about his placement. She clicked her tongue to open a line, said, “Hey.”

“Did you find out yet?”

“Yes. How about you?”

“Skank! You first.”

There they are. The first 13 lines, at least in my web browser. Any impressions regarding genre, tone, conflict, story question or characters are welcome, but I’m particularly interested in what you think the “gee-whiz” might be.

In other news, Cookie, Sis, and I just got back from England and France. Photos and anecdotes coming soon…

Writing Excuses Assignment 10.5

In a previous post, I mentioned that Whitey, Tim, and a few other of my writing comrades from The Writing Journey had decided to take advantage of the fiction-writing master class that Mary Robinette Kowal, Brandon Sanderson, Howard Tayler, and Dan Wells are offering (for free!) via their Writing Excuses podcasts. Our group is a couple of months behind, so we’re just now getting to the second set of assignments, on creating characters. The idea was to use three of the characters we’d generated and have them walk through a marketplace to perform a dead drop. Apparently this is a common spy novel trope. While you write this scene for each character, you need to convey the character’s job, hobby, and emotional state without explicitly stating any of these things. I probably won’t subject you to all my assignments, but I found this one a lot of fun to do. Here’s one of my characters performing his dead drop:
Roscoe Lee spun the numbers on the lock and went towards the noise of the market. His bike was out of the way now, behind the train station. No one he knew would see it, especially not on a Saturday. Billy Czerwinski might get ideas if he saw Roscoe lock his bike, and Roscoe didn’t need that. Once he pulled off his next feat, Billy would finally recognize his superiority, but Roscoe didn’t want to deal with any noise from him before that happened. First he had to do what that old black lady said. “Just put this handkerchief in a leather purse you’ll find at the French market. It will be decorated with hummingbirds and hydrangeas.” She wouldn’t say any more than that. He had to go on the Internet to see what hydrangeas looked like. He just hoped no one spotted him putting a gay-looking lace handkerchief into a purse. Imagine what Billy Czerwinski would make of that. He didn’t see used consoles or games anywhere, so the food was the only good thing about this market. There was kettle corn and…score! The bacon he smelled was from some stand that was giving out free samples. He snagged a handful, ignoring the glare from the girl behind the table and walked on, munching. He was wiping the grease off on his jeans when he saw Sister Mary Patrick. Christ! He ducked behind a booth that sold some kind of cloth stuff—scarves and like that—and craned his neck to watch her from his hiding spot. She was at a stand full of leather purses. Just where he needed to go. What did she need with a purse anyway? He pulled back, considering. “Young man!” said a fat woman. She wore glasses with a chain dangling from them, “Would you mind not touching my merchandise?” “Sorry,” he mumbled. She stared over the tops of her glasses until he backed away from her booth. He wet his lips and snuck another peek at the purse stall. Thank God. Mary Puke-trick wasn’t there. Then he thought of something else, and turned his head back the way he’d come. Not there either. Was she really gone? He hoped so. He looked in every direction and didn’t spot her. Could she know he was coming, somehow? She might be hiding, even now. He moved slowly towards the leather stall swiveling his head as he went. His mouth felt like paper. No matter. As long as Mary Patrick didn’t catch him—and no one else he knew saw him either—he could drink after he finished the job. Leather purses lay on a table or hung from hooks near it, seeming to mock him with their curlicued flowers, fruits, and birds. He was rifling through the purses when a voice startled him. “Robert! What a surprise! Are your parents here? Crap. “Hello Mrs. Yao. No, just me.” “Really? What a big boy you’re getting to be, here all by yourself.” She didn’t sound like she thought it was a good idea. That was all he needed, someone asking his parents what he was doing a mile from home without supervision. Inspiration struck. “It’s kind of a secret, Mrs. Yao. Do you think my mother would like a purse?” It worked. She got that “awww” look that women and girls sometimes got when they thought something was cute. “I’m sure she would. Well, you be careful. Head straight home after this.” “I will.” She left, pushing her granddaughter’s stroller. Roscoe turned back to the purses. He finally found the one the old lady had described. When no one was looking, he pulled the crumpled lace handkerchief from his back jeans pocket and crammed it into the purse. Then he took off for the water fountain and drank as much as he could before hopping back on his bike to ride home.
Of the three scenes I wrote, I think this is the one that best fulfills the assignment, though I won’t know for sure unless readers share their guesses about Roscoe’s job, hobby, and emotional state. Feel free to comment below! Anyone else out there following along with these Writing Excuses podcasts? Posting your work? I’d love to see it…