Você está na página 1de 96

Self-publishing

. . . is easier than you can imagine

How to Create & Publish Your


E-book
Using Free Tools

John McDevitt

The Aware Writer


i

Cover design by John McDevitt. The drawing of the printing press


on the cover is a public domain image I found. The pictured press
is an Albion press invented by Richard W. Cope in England during
the early 19th Century. Today, nearly 200 years later, everyone
who owns a computer has access to a virtual printing press and the
undreamed of power of self-publishing.

Unless noted otherwise, all of the software packages cited in this


book are licensed under the terms of the GNU General Public Li-
cense (GPL). Screen shots used to illustrate various options and
operations were made using the Take Screen shot application built
into ubuntu 8.04.

Copyright © 2009 John McDevitt

This work is licensed under the Creative Commons Attribution-


Noncommercial-No Derivative Works 3.0 United States License.
View a copy of this license at http://creativecommons.org/licenses/by-
nc-nd/3.0/us/ or send a letter to Creative Commons, 171 Second
Street, Suite 300, San Francisco, California, 94105, USA.

Contact the author: awarewriter@gmail.com


Contents

Introduction viii

1 Software: The Free Tools 1


Software Freedom . . . . . . . . . . . . . . . . . . . . . . . . . 1
Locating and Installing Your Tools . . . . . . . . . . . . . . . . 2
TEX: Your Typesetting Engine . . . . . . . . . . . . . . . 2
LyX: Your Writing Workhorse . . . . . . . . . . . . . . . . 3
Gimp: Create and Manipulate Images . . . . . . . . . . 3
Inkscape: A Vector Based Drawing Program . . . . . . . 3
FreeMind: Brainstorming and Mind Mapping . . . . . . 4
Other Helpers . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Planning Your Book 5


The Importance of a Good Title . . . . . . . . . . . . . . . . . 5
What Goes Into A Great Title? . . . . . . . . . . . . . . . 5
S.U.I.T. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
The Grammar of SEO Titles . . . . . . . . . . . . . . . . . 8
Title Length and Google . . . . . . . . . . . . . . . . . . . 9
Title Challenge . . . . . . . . . . . . . . . . . . . . . . . . 10
Brainstorming and Organizing with FreeMind . . . . . . . . 10
Brainstorming . . . . . . . . . . . . . . . . . . . . . . . . . 11
Organizing . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 Setting up LyX 12
Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Look & Feel . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

ii
Contents iii

Document Settings . . . . . . . . . . . . . . . . . . . . . . . . . 14
Document Classes . . . . . . . . . . . . . . . . . . . . . . 15
Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Text Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Page Layout . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Page Margins . . . . . . . . . . . . . . . . . . . . . . . . . 19
Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Numbering & TOC . . . . . . . . . . . . . . . . . . . . . . 19
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . 19
PDF Properties . . . . . . . . . . . . . . . . . . . . . . . . 20
Math Options . . . . . . . . . . . . . . . . . . . . . . . . . 20
Float Placement . . . . . . . . . . . . . . . . . . . . . . . . 20
Bullets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
LAT
EX Preamble . . . . . . . . . . . . . . . . . . . . . . . . . 21
Document Settings Used for This Book . . . . . . . . . . . . . 21

4 LyX Environments 24
Paragraph Environment Pull-Down Box . . . . . . . . . . 25
Front Matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Title Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Copyright Page . . . . . . . . . . . . . . . . . . . . . . . . 27
Dedication . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Table of Contents (TOC) . . . . . . . . . . . . . . . . . . . 28
Lists of Figures or Tables . . . . . . . . . . . . . . . . . . 28
Back Matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Endnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Headings: Structural Hierarchy . . . . . . . . . . . . . . . . . 31
Headings: Default Classes . . . . . . . . . . . . . . . . . 31
Extra Headings: KOMA-Script Classes . . . . . . . . . . 32
Contents iv

The List Environments . . . . . . . . . . . . . . . . . . . . . . . 33


Features Common To All List Environments . . . . . . . 35
Numbered Lists . . . . . . . . . . . . . . . . . . . . . . . . 35
Itemized Lists . . . . . . . . . . . . . . . . . . . . . . . . . 36
Labeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Special Environments: Quotes & Poetry . . . . . . . . . . . . 37
Quotes and Quotations . . . . . . . . . . . . . . . . . . . . 37
Poetry or Verse . . . . . . . . . . . . . . . . . . . . . . . . 38
More KOMA-Script goodies . . . . . . . . . . . . . . . . . . . . 38
WYSIWYM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5 Graphics = Punch + Clarity 41


Bit mapped and Vector Graphics Revisited . . . . . . . . . . 41
How to Use The Gimp . . . . . . . . . . . . . . . . . . . . 42
Why You Need Inkscape . . . . . . . . . . . . . . . . . . . 45
Using Graphics and Tables in LyX . . . . . . . . . . . . . . . . 46
Insert . Graphics . . . . . . . . . . . . . . . . . . . . . . . . 47
Insert . Table . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Floats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

6 The Power of Links 50


Cross Referencing with LyX . . . . . . . . . . . . . . . . . . . 50
Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Inserting Cross-References . . . . . . . . . . . . . . . . . 51
Recommendations and a Discovery . . . . . . . . . . . . 52
The TOC and Other Listings . . . . . . . . . . . . . . . . . . . 53
Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Citations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Hyperlinks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

7 A Professional Cover 56
Assembling the Ingredients . . . . . . . . . . . . . . . . . . . . 56
Cooking the Meal . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Setting Up Your Page . . . . . . . . . . . . . . . . . . . . . 57
Create the Base Cover Object . . . . . . . . . . . . . . . 58
Contents v

Add Color to the Cover . . . . . . . . . . . . . . . . . . . . 58


Add Graphics to the Cover . . . . . . . . . . . . . . . . . 58
Add Text to the Cover . . . . . . . . . . . . . . . . . . . . 59
The PDF Cover . . . . . . . . . . . . . . . . . . . . . . . . 60
Adding the Cover to Your Book . . . . . . . . . . . . . . . . . 61
Add the Cover Using LyX . . . . . . . . . . . . . . . . . . 61
Alternative Ways to Add a Cover . . . . . . . . . . . . . . 61

8 Putting it all Together 63


Structure is a Matter of Degree . . . . . . . . . . . . . . . . . 63
Why PDF? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
The On Screen Presentation . . . . . . . . . . . . . . . . . . . 65
Selecting a Page Size . . . . . . . . . . . . . . . . . . . . . 66
Font Selection . . . . . . . . . . . . . . . . . . . . . . . . . 66
Font Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Help the Reader Navigate . . . . . . . . . . . . . . . . . . . . 67
TOC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Cross References . . . . . . . . . . . . . . . . . . . . . . . 67
External Links . . . . . . . . . . . . . . . . . . . . . . . . . 68
Why I Didn’t Include an Index . . . . . . . . . . . . . . . 68
Simple and Consistent . . . . . . . . . . . . . . . . . . . . . . . 69
Explore and Experiment . . . . . . . . . . . . . . . . . . . . . . 69
This is Just the Beginning . . . . . . . . . . . . . . . . . . . . . 70

A LyX: Main Menu Highlights 72

B The LATEX Preamble 76

C Alternative File Formats 79

D How to Include Attachments 83

Bibliography 85
List of Figures

3.1 LyX: Document Settings Dialog . . . . . . . . . . . . . . 15


3.2 PDF Properties: Additional Options . . . . . . . . . . . . 21
3.3 LyX: Numbering & TOC . . . . . . . . . . . . . . . . . . . 22

4.1 LyX: Paragraph Environment Pull-Down . . . . . . . . . 25


4.2 LyX: List environment toolbar buttons . . . . . . . . . . 34

6.1 LyX: Label Dialog Example . . . . . . . . . . . . . . . . . 51


6.2 LyX: Insert Cross Reference Dialog . . . . . . . . . . . . 52

7.1 Inkscape: Text and Font Dialog . . . . . . . . . . . . . . . 60


7.2 LyX: External Material Dialog . . . . . . . . . . . . . . . 62

vi
List of Tables

3.1 Document Settings Used in This Book . . . . . . . . . . 23


3.2 Page Margins . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.1 Headings for default article, book and report classes . 32

vii
Introduction

It wasn’t so long ago that self-publishing was looked upon with


scorn. People would laugh behind their hands and pity the “loser”
who couldn’t find a publisher. They snickered and whispered “vanity
press.”

No more. The power of the PC and the Internet combine to wipe the
smile off the doubter’s faces and put the power of the press directly
into your hands. You don’t need to wait for a publisher to “choose”
your book as worthy of publication. You don’t need a “gatekeeper”
because you can publish your book yourself. It’s a lot easier than
you might have thought.

Creating and publishing your own book is a straightforward journey


when you know the territory. This book is a map that will help guide
you through the rough spots, avoid time wasting detours and get
you to your destination on time.

You won’t need to go out and buy expensive software. If you have
a reasonably current PC and are willing to install the key software
yourself, you’ll have the tools you need to publish your book on your
own. Well, not quite on your own because this book will be here to
guide you.

Think of this book as your laboratory. It’s the finished product that
shows you what can be done. As we go through the book together,
I’ll explain everything I did step-by-step. By the time you finish the
book, you’ll understand the how, the why and you’ll have the skills
you need to produce a professionally formatted bestseller on your
own.

viii
ix

I suggest you read each chapter in sequence. There’s a lot of mate-


rial, some you may never need, but you’ll have a good understanding
of what’s possible.

After introducing you to the recommended software and showing


you how to get the tools you need, I take a short detour to share
what I know about creating a good title for your book and suggest
ways to plan before you jump into writing.

You’ll discover the magic of LyX, how to set it up and how to get LyX
working for you. Good software should support your writing and
stay out of your way. LyX does just that.

We’ll get into graphics, how easy it is to include links within your
text, how much better your E-Book will be and how much your
readers will appreciate the extras. You’ll discover how to create a
professional looking cover. It’s not difficult at all and is the finishing
touch that says “professionally done.”

The focus is on producing the final document as a PDF file. PDF is a


universal format that’s easy to distribute and that can be read easily
on virtually all computers regardless of operating system.

What of the alternatives? I’ll get into a few other options in Appendix
C. Let’s get started then.
1 Software: The Free Tools

Software Freedom

All of the software tools recommended here were used to create this
book. All have been released under the terms of the GNU General
Public License (GPL) and are freely available for download over an
Internet connection at no cost.

Every one of these programs is equal to (and often better than)


costly commercial software.

"Free software is a matter of liberty, not price. To un-


derstand the concept, you should think of free as in free
speech, not as in free beer.
Free software is a matter of the users’ freedom to run,
copy, distribute, study, change and improve the software.
More precisely, it refers to four kinds of freedom, for the
users of the software:
1. The freedom to run the program, for any purpose.
2. The freedom to study how the program works, and
adapt it to your needs.
3. The freedom to redistribute copies so you can help
your neighbor.
4. The freedom to improve the program, and release
your improvements (and modified versions in general)
to the public, so that the whole community benefits.”1

1 The Free Software Definition

1
CHAPTER 1. SOFTWARE: THE FREE TOOLS 2

Locating and Installing Your Tools

You’ll be working with four programs. LyX, the document processor,


takes center stage. FreeMind, The Gimp and Inkscape can help with
the organization and finishing touches. All four software packages
will run under Linux, Mac OS X or MS Windows. I use ubuntu Linux
(8.04 as of this writing) and all of the listed programs are available
from the repositories. Installation is a snap.

Installation under Mac OS X, Windows or if you want to install on


your own under Linux is simply a matter of following the provided
link to the home page or direct download page for each program,
then downloading and installing the package for your operating
system.

You’ll find a brief description for each package in the following


sections. Each site has specific, clear instructions for installing their
software on your system. Follow the on site instructions and you’ll
be up and running in no time.

TEX: Your Typesetting Engine

LyX, the document processor, will be the program you use for writing.
But LyX needs a TEX / LATEX, “backend” typesetting system to work
properly.

• TEXLive for Linux systems All Debian based systems including


the popular ubuntu distribution make the complete LATEX sys-
tem available from the repositories. The simplest method is
to use Synaptic and install either the basic TEXLive package
(texlive), or the full package (texlive-full).
• MiKTEX for Windows systems “It is very easy to install MiKTEX.
The MiKTEX Setup Wizard guides you through the installation
process. You don’t have to be a computer expert. . . MiKTEX’s
integrated package manager installs missing components from
the Internet, if required.”
CHAPTER 1. SOFTWARE: THE FREE TOOLS 3

• MacTEX for Mac OS X “MacTEX consists of two pieces: MacTEX-


2008 and MacTEXtras. MacTEX-2008 is an install package
which installs everything needed to run TEX on Mac OS X. The
package uses Apple’s standard installer; installation takes four
to eight minutes and is automatic. MacTEXtras is a collec-
tion of optional extras: Additional Front Ends, Spell Checkers,
Documentation, and Showcase items.”

LyX: Your Writing Workhorse

LyX is the main actor, your primary tool for both creating and
publishing your book. The other programs play an important but
supporting role. Don’t worry. LyX is easy to install. The LyX
installers will set up a complete LyX environment for you.
• Lyx Home Page
• Direct link to the Lyx download site

Gimp: Create and Manipulate Images

If you want to include graphics in your book, you’ll need an image


manipulation program and the Gimp (GNU Image Manipulation
Program) is a good one. The main site has all the information
and installation instructions you’ll need for Linux. If you need the
Windows or Mac OS X version, click on the links below and follow
the installation instructions.
• The Gimp Home Page
• Link for Windows users
• Mac OS X

Inkscape: A Vector Based Drawing Program

Why would you need another graphics program? If you want to


create covers for your books (and you should), you’ll get the highest
CHAPTER 1. SOFTWARE: THE FREE TOOLS 4

quality results with a vector graphics program like Inkscape. The


differences between a vector graphics program and a bit mapping
program like the Gimp will be explained later when we get into the
details.
• Inkscape Home Page
• Download site for all operating systems

FreeMind: Brainstorming and Mind Mapping

FreeMind is written in Java so it’s platform independent. All you


need to run FreeMind is a current version of the Java run-time
environment along with the FreeMind installer for your operating
system (available on the FreeMind download page). Most systems
will already have Java installed. If you need to install or upgrade
Java, there’s a direct link to Sun on the FreeMind download page.
Grab the FreeMind installer for your operating system, download
and install. It’s quick and easy. There’s also a detailed guide for
installing on different flavors of Linux. The version of FreeMind in
the ubuntu repository for my version (8.04) is way out of date, but
I had no problem at all installing the latest Debian version on my
system.
• FreeMind Main Web Page
• Direct link to FreeMind download site

Other Helpers

These helper programs are icing on the cake. You don’t “need” them
but they will allow you to do some sophisticated manipulations of
your PDF files. With pdftk, you’ll have the ability to combine PDF
files, add attachments and much more. pdfjam2 includes pdfjoin, an
alternative method for joining PDF files. Both packages run from
the command line.
2 pdfjam is not available for the Windows operating systems
2 Planning Your Book

The Importance of a Good Title

You must have a good title if you expect people to buy your book.
A good title attracts people to your book the way high curb appeal
welcomes house hunters to stop, knock on the door and ask to come
in for a look around. A good title arouses a reader’s curiosity and
invites them to pick up your book and take it to the cash register.

Sol Stein, in his book Stein on Writing[3], devotes an entire chapter,


The Door to Your Book: Titles That Attract, to the subject. Too
many good books gather dust on the shelves because the title stinks.
Titles are that important.

The Internet is the greatest marketing tool ever. But potential


customers must be able to find your book first and a good Internet
title is the key. It’s not difficult to adapt your title to the rules of the
Internet so it can be found easily.

What Goes Into A Great Title?

Informative

The title tells people searching the web for information what to
expect when they read your book – a promise of what’s to come.
More importantly, a good title helps them decide to buy your book
in the first place.

5
CHAPTER 2. PLANNING YOUR BOOK 6

Keyword phrase smart

Think like a person browsing the web for answers: How would nor-
mal people phrase their questions? Would you say embellishing your
nails or making your nails shine? More likely, you’d say something
like painting your nails. The closer your keyword phrases come to a
typical web query, the higher in the search engine list your title will
appear.

Precise

If you mean fingernails (or toenails) then say so. The average
carpenter probably won’t paint their nails, but you never know. Be
specific enough to avoid confusion. You’ll almost always get a better
ranking with a narrower search phrase.

Using keyword modifiers will bring more potential customers to


your specific title. If your topic is E-Book publishing, say so in your
title. Book publishing may bring visitors, but using E-Book to modify
the key phrase will get more hits. Specific and precise will always
bring better Search Engine Optimization (SEO) results.

Keyword modifiers help you sneak in under the radar of your com-
petitors. It’s true that the highest volume keywords are on the head
of the Internet dragon. It’s also true that’s where your competitors
are likely to be mining their keywords.

Sure, when you move out onto The Long Tail[1], results fall off,
but not as fast as you might think. And you’ll capture a different
audience. The Internet dragon has two ends. Why not target both?

Engaging

When the web search gets a list of hits, grab the reader’s attention
and make your title stand out from the crowd. Suppose a web surfer
posts a question like painting nails? Your title could be:

• How To Paint Your Nails (direct, but bland)


• Painting Your Nails (direct, but no energy – yawn)
CHAPTER 2. PLANNING YOUR BOOK 7

• Painting Your Nails Like A Professional (direct but rare word –


"professional")
• Paint Your Nails Like A Pro (pro is much better plus you get rid
of the weak "ing")
• Painting Your Nails: Get The Nail Salon Look Without The Cost
(too long with a weak "ing")
• Paint Your Own Nails: Avoid Nail Salon Costs (direct, engaging,
succinct)

An engaging title hooks a reader’s eye by using energetic language


and sells the reader on why he should buy the book and read it. It
may be hard to guess what will grab the web searcher’s attention.
Always focus on benefits. Everyone perks up when they think they’ll
benefit. And no reader wants to waste time: Be clear and to the
point.

S.U.I.T.

Let’s put all this together with an easy to remember S.U.I.T. acronym. . .
Follow these guidelines and you’ll be sure your title "suits" your
goals.

Search

Take off your writer’s hat and think like a person searching the web
for information. Get into the mind of your intended audience of
readers. What phrases are they likely to use? SEO or search engine
optimization is critical for getting titles listed high on search lists.
Weave that vital keyword phrase into your title.

Unambiguous

Ambiguity is a title killer. When your title is ambiguous, you confuse


readers. Compare these before and after examples:

• PMI Explained Vs. Private Mortgage Insurance (PMI) Ex-


plained
CHAPTER 2. PLANNING YOUR BOOK 8

• What Are LEAPs? Vs What Are LEAP (Long-Term Stock Options)


Investments?

Interesting

When people searching for info find your title, you want to tweak
their interest enough to stop and explore. An interesting title will:

• Arouse reader curiosity


• Sell a reader on the benefits of clicking through to find out
more
• and generate higher sales volume

Timeless (never outdated)

People want books about timely, topical subjects. The best titles
stand the test of time and do not become obsolete.

The Grammar of SEO Titles

Grammar? Wait — come back! I didn’t mean to scare you off like
that. This isn’t your stern English teacher talking. Grammar just
happens to have a few neat analogies for explaining how to craft an
effective Internet title.

A sentence is a complete thought. A title should be complete and


able to stand on its own — just like a sentence.

In The Elements of Grammar[2], Margaret Shertzer describes the


parts of a sentence.

“The subject of a sentence is the person, object, or idea


being described. The predicate is the explanation of the
action, condition, or effect of the subject.”

It’s not too much of a stretch to describe an SEO title using the
same terminology. The subject of the title is the keyword phrase, the
predicate explains and completes the thought. The keyword phrase
CHAPTER 2. PLANNING YOUR BOOK 9

as the subject of the title should come first. The title’s predicate
assures a complete title that can stand on its own.

• Subject + Predicate = Sentence


• Topic (SEO keyword phrase) + Energetic verb = SEO effective
and engaging title

A well-chosen title is complete because it identifies the topic clearly.


The SEO-friendly subject focuses your title and your verb choice
adds energy. This is how you appeal to both audiences, SEO search
engine spiders crawling the web and your audience of readers
searching for just the right book for them.

Compare this before and after title fix:

• Poorly formed title: What NOT To Buy At A Dollar Store


• Well-structured title: Bargain Shopping: Dollar Store Deals To
Avoid
• While the meaning of the first title is clear to a person reading
the title, too much is implied and the first six words are not
SEO keywords. The only keyword in the entire title is Dollar
Store
• The topic is really about bargain shopping and what not to buy
at the dollar store.
• The second title immediately has Bargain shopping as a key-
word to be scooped up by the web spiders. Dollar store (and
perhaps deals) will also be scooped up as SEO keywords.

Title Length and Google

When a person searches the Internet using any of the search engines,
the search engine returns the results of the search in a search engine
results page (SERP). The first line of each hit, the blue text with
the embedded link, is the title and the first thing the person doing
the search sees. Google truncates titles that exceed 65 characters
CHAPTER 2. PLANNING YOUR BOOK 10

(or ten words). Keep your titles at or below this threshold and
the reader will see exactly what you intended. Long titles will be
incomplete, and may not even make sense to the searcher – not
good.

Different search engines truncate differently and allow a few more


characters. Google is king of the hill. Follow Google’s rules and you
can’t go wrong.

Title Challenge

What do you think of the two titles listed below? They’re illustrations
of how you might combine SEO with reader interest with an almost
complete thought. Almost, because you want your audience to buy
your book to discover the answers for themselves.

• Title Writing: How To Tap The Reptilian Brain Of Your Reader


• How To Write An Irresistible Title

Crafting a good title isn’t easy. In fact, the best copywriters will
write dozens, even hundreds of headlines to find the right one. Play
a bit. Write a dozen titles of your own on the topic of title writing. I
think you’ll be pleasantly surprised.

Brainstorming and Organizing with FreeMind

You don’t need FreeMind to create your book. You could scribble
your notes on pieces of paper or index cards, keep track of your
research in a text file or you may already have a favorite outline
program. I suggest FreeMind because it works, it’s free and it’s
easy to learn. Brainstorming for good book titles is a great way to
get started.
CHAPTER 2. PLANNING YOUR BOOK 11

Brainstorming

When you create a new file, FreeMind places your cursor in the
center node. Enter your central idea here and press enter. All nodes
connecting to the center are child nodes. Press the insert key or
choose new child node from the insert menu to begin.

Brainstorming gets the ideas flowing freely. Whenever you’re unsure


of where to go next, brainstorming frees ideas from the log jam and
moves your project in the right direction. FreeMind is perfect for
the task. Press enter once to accept a word or phrase then press
enter again for the next idea.

The key to effective brainstorming is to keep going without editing


or organizing your ideas. You can do that later. FreeMind mind
makes it easy and accepts your ideas as fast as you can type. Follow
your instincts. If an idea suggests a new branch, just press the
insert key to add a new child node and keep on typing until you run
dry.

Organizing

Organizing is as easy as grabbing a node with your mouse and


dragging it to the new location. Here are some organizing ideas to
get you started.

• Create a titles node, a child node then brainstorm titles. When-


ever you have an idea for your title, put it here. There’s no
rush.
• Create a node for the book’s organization. You can play with
chapters and sections and get the general layout for your book.
• Use FreeMind to collect and organize data for your book. Put
all the book organization to the right of the central node and
your data on the left. The red arrows on the nodes tell you that
the node is a live link to a URL, Local file or another node in
the open mind map.
3 Setting up LyX

LyX is a document processor that models (WYSIWYM) What You See


Is What You Mean instead of the typical word processing (WYSIWYG)
What You See Is What You Get. Modern word processors use an
obsolete typewriter paradigm, forcing you to worry about the details.
Word processors expect you to be the typesetter. You must decide
which characters get the emphasis, what fonts and font sizes go
where, how each page will break and so on.

Granted, word processors have improved greatly over the years.


Open Office Writer lets you set up and use styles and if you take the
time to set them up and use them consistently, you can take much
of the manual labor out of writing a book.

But writer’s aren’t typesetters and shouldn’t have to learn typeset-


ting to produce professional output. With LyX, you concern yourself
with what you write, the computer takes care of how your docu-
ments look. Simply tell LyX what you mean and concentrate on your
writing.

This book was written using LyX. I’ll walk you though LyX and how
you can produce a professional looking book like this one easily, but
first let’s get your LyX preferences set up.

Preferences

When you fire up LyX for the first time, go to the Tools . Preferences
menu where you can tailor LyX to your liking from the Preferences
dialog. Accept most of the defaults. The settings you’ll want to look

12
CHAPTER 3. SETTING UP LyX 13

at and change are listed below. When in doubt, leave the default.
You can always come back later.

Look & Feel

• User interface

– Switch tool tip help on or off


– Session management (save windows, restore cursor posi-
tion, load open files from last session)
– File backups, open multiple documents in tabs, etc.

• Screen fonts (note: these settings are for on screen viewing


only and have no effect on your printed document)

– Choose your on screen fonts for Roman, Sans Serif and


Typewriter. The screen font will be the same font type as
your document font.
– Set the Zoom % for screen fonts (I like 125%)
– Screen DPI (LyX should use the system default setting so
you won’t need to fool with this one)
– Font Sizes: Best to accept the defaults here. If you do
change these, record the default values first.

• Colors: Change the colors if you don’t like the defaults


• Graphics: On/off switch to display graphics

Editing

• Control

– Set cursor behavior


– Sort environments alphabetically or group by category:
Environments are key to working in LyX and will be ex-
plained in detail in the next chapter. Group by category is
the default and the easiest to use.
CHAPTER 3. SETTING UP LyX 14

– Preferences for full screen mode: This feature is great. You


have complete control over the full screen environment.
Hide or show toolbars, the tab bar or the scroll bar. You
can also limit text width (in pixels). Try 700 to start with
and experiment until you like what you see. This setting
is what makes full screen mode work so well. It centers
the text horizontally and leaves space on either side giving
you a nice, distraction free writing environment.

• Shortcuts: A complete listing of all keyboard shortcuts. If you


want to make changes, this is the place to do it.
• Keyboard/Mouse: Leave the defaults unless you have a special
need.
• Input Completion: If you turn this feature on, LyX will suggest
word completion. Tweak your settings here.

Identity

Enter your name and email address. LyX uses the information you
enter here to identify you in the Track Changes feature when you
collaborate with others.

Document Settings

LyX uses LATEX ( pronounced La-tek) as it’s back end. The Intro-
duction available from the LyX help menu gives you the complete
story of how and why LATEX was developed. LATEX 2ε is the current
incarnation of a program that has been helping people produce
professionally typeset documents for 25 years, a quality that even
the best word processors can’t match.

Unlike a word processor that stores all of the formatting commands


in proprietary file formats, all files produced by LyX (and LATEX) are
stored in plain ASCII text files that can be read by any text editor.
CHAPTER 3. SETTING UP LyX 15

No, you won’t need to worry about embedded commands, LyX takes
care of all of this for you. Go to Document . Settings. . . to bring up
the Document Settings Dialog and enter your document settings.
Then all you need worry about is your writing.

Figure 3.1: LyX: Document Settings Dialog

Document Classes

Document Classes extend LATEX with a set of macros that define new
document types. The standard types are:

• Article (basic articles)


• Report (basic reports)
• Book (basic book writing)
CHAPTER 3. SETTING UP LyX 16

• Letter (US style letters)

The full LATEX installation usually includes a number of non-standard


classes for preparation of journal articles for various professional
associations, classes to create curriculum vitae, a special class for
spec scripts for the US movie industry distributed with LyX and
more.

You probably won’t need any of these special classes, but there is
a special KOMA-script class for articles, reports, books and letters
that are far more powerful than the standard classes. In fact, the
KOMA-script book class was used to prepare this book. I recommend
you try KOMA-script.

All you need to do to harness the power of a class is select the one
you need from the pull down menu.

Modules

Unless you need a special module (I didn’t) you can ignore this
option.

Fonts

Choose the fonts for your document from this dialog. You’ll be asked
to choose the default family from Roman (serif) fonts, san serif fonts,
and typewriter (fixed width) fonts. You also choose the base font
size (usually 10, 11 or 12 point). LyX uses the font families you
choose throughout the document and will increase or decrease the
size depending on the environment you are in at the time. Don’t
worry. Environments are easy to use, are the heart of LyX and will
be explained in great detail in chapter 4.

The fonts you’ll be using are type 1 fonts designed for Postscript
and PDF documents. These fonts are supplied with your TEX/ LATEX
installation and are not your system fonts. There are two types:
CHAPTER 3. SETTING UP LyX 17

• Bit mapped fonts: Defined by bit mapped graphics (pixels),


they look fine at the size they are designed for but don’t scale
well. For instance, the 18 point Times Roman example below
was enlarged 500 percent. The font is blurred the same way
a digital photo would blur when blown up. Imagine a 4 X 6
digital snapshot enlarged to 20 X 30. Bit mapped fonts and
digital photos are both made up of individual pixels that can’t
stand up to enlargement.

• Vector fonts: Built using mathematical curves, they will scale


as needed with no loss of quality. The 18 point Times Roman
example below was also enlarged 500 percent. No contest here.
The font is crisp and clear at any scale because vector fonts are
made up of mathematically generated lines and curves instead
of pixels.

Aa
I suggest you change your defaults from the older Computer Modern
bit mapped fonts to the newer Latin Modern (LM) fonts because
LM is a vector font that works well with PDF files. Latin Modern
prints beautifully, but I chose Bera Serif as my Roman font instead
of Latin Modern because Bera is larger and heavier. This makes
Bera a better font for on screen reading.
CHAPTER 3. SETTING UP LyX 18

Experiment a bit, LyX makes it easy. Simply click a few buttons and
in seconds all the fonts in your entire document have changed.

Text Layout

Here’s where you choose either indentation or vertical spacing. This


is a document wide setting:

• Indentation uses the standard format seen in most books pub-


lished in the US. The first paragraph is flush left and all follow-
ing paragraphs in a section are indented.
• Vertical spacing formats all paragraphs flush left and inserts a
vertical space between each paragraph.

You also choose line spacing here. The default is single. I used
OneHalf because Bera is a larger and heavier font and 1.5 spacing
is easier to read. Page through a few books and pay attention to the
vertical spacing between each line. You’ll find that most will have
extra spacing. This is another global setting that can be changed in
a matter of seconds.

Page Layout

Choose the format from typical sizes like US letter, US legal, etc.
The default orientation is portrait and can be changed to landscape
on this screen.

The default heading depends on the document class. (book)KOMA-


script centers the chapter number and name in italic all caps. This
book uses fancy. If you use the fancy heading and have long chapter
and/or section names they will probably overlap in the middle of the
heading. Not good at all.

This book uses fancy with a few special settings in the LATEX pream-
ble:
CHAPTER 3. SETTING UP LyX 19

\rhead{\thepage}
\lhead{\leftmark}
\cfoot{}
The first line puts the current page number flush right in the heading.
The second line puts the chapter flush left. The third line takes the
page number out of the footer.

Page Margins

The default page margins are designed for printed documents. The
KOMA-script classes calculate everything automatically based on
the font sizes and paper format for a truly professional look. You
might want to reduce the margins for an E-Book that’s designed for
on screen viewing. Table 3.2 on page 23 shows the margin settings
used for this book.

Language

You can skip this because the defaults will be set according to your
system settings.

Numbering & TOC

This dialog (Figure 3.3 on page 22) has a pair of sliders for number-
ing and TOC, global settings that can be changed anytime.:
• Numbering: Move the slider to indicate how deep LyX should
number your Parts, Chapters, Sections, etc.
• TOC: This slider tells LyX which elements to include in the
table of contents.

Bibliography

The default is typical so leave it.


CHAPTER 3. SETTING UP LyX 20

PDF Properties

This is a new feature in LyX 1.6. It allows you to customize the


PDF header, bookmarks and especially how URLs are handled. Take
a look at the PDF properties setting for this book (Table 3.1 on
page 23) as a guide.

Math Options

Specialized info for mathematicians.

Float Placement

Floats are the figures and tables you see in this document. This
dialog is a global setting that’s best left to the end. These figures
and tables are called floats because they will move depending on
where they fit best. You won’t know that until the end. Each float
has the identical dialog for setting individually.

Bullets

Leave the default unless you don’t like the looks of your bullets. You
can change the appearance of bullets at all levels.

Branches

See the LyX user guide for a detailed explanation. Branches allow
you to hide certain text from some users. For example, a teacher
may include the answers to a quiz in the branches so they can hide
it from students, yet activate and print out as needed.
CHAPTER 3. SETTING UP LyX 21

linkcolor=red, citecolor=cyan, urlcolor=blue, linktocpage=true

Figure 3.2: PDF Properties: Additional Options

LATEX Preamble

This is a special field for entering special commands that load pack-
ages and instructions. Be careful here. The commands I suggest
have all been tested and work. I’ll explain more of what they do in
Appendix B on page 76.

Document Settings Used for This Book

This section contains all the important document settings I used in


this book. I offer them as examples of what worked for me.

• Table 3.1 on page 23 is a summary of all settings


• Table 3.2 on page 23 shows the margin settings
• Figure 3.2 shows the additional options to add to the PDF
properties dialog for:

– Internal link color


– Citation color
– Hyperlink (URL) color
– linktocpage=true is the command that changes TOC page
number links from the text to the page numbers

• Figure 3.3 on the next page shows the TOC numbering and
depth settings
CHAPTER 3. SETTING UP LyX 22

Figure 3.3: LyX: Numbering & TOC


CHAPTER 3. SETTING UP LyX 23

Name Setting
Document Class book(KOMA-Script)
Fonts (Default Family) Roman
Fonts (Base Size) 10 pt
Fonts (Roman) Bera Serif
Text Layout Indentation
Text Layout One-half spacing
Page Layout 5.5 X 8.5
Page Layout Fancy Heading
Numbering Depth to Chapter
TOC Depth to Subsection
PDF Properties Use hyperref
PDF Properties No Frames
PDF Properties Color Links
PDF Properties Generate Bookmarks
PDF Properties See fig: 3.2 on page 21
All Other Settings Default

Table 3.1: Document Settings Used in This Book

Location Value Units


Top 0.75 in.
Bottom 0.5 in.
Inner 0.4 in.
Outer 0.4 in.
Head sep. 18 pt.
Head height 17 pt.
Foot skip 24 pt.

Table 3.2: Page Margins


4 LyX Environments

Paragraph environments are the heart of LyX. If you’re building a


new house, you don’t try to do it yourself. You choose the house
design, make all the decisions, hire a good general contractor to
co-ordinate all the trades and let the professionals do the actual
construction work.
Trying to build your book with a word processor is like building a
house yourself. Hire LyX to be your general contractor. Set up your
specifications using the document settings discussed on page 14,
design your book using the paragraph environments and let LyX take
care of the professional typesetting details while you concentrate
on content. It’s that simple.
Title page? Enter your title, then pick the Title environment from
the pull down menu with a single click. You’re done. LyX knows
how to typeset titles. Type in your name and choose Author. Again,
you’re done.
Start a new chapter? Enter the chapter name, choose Chapter from
the environment menu, press enter and you’re back in the Standard 1
paragraph environment writing text. Need a new section? Type
out the name of the section, choose Section from the environment
menu, hit enter and keep on writing.
If you’re halfway through your book and decide you want chapter
five to come after chapter one, just highlight chapter five in the
document outline window and, with a few key presses, move it up
under chapter one.
1 Except in a few special cases like bulleted lists where you want to remain in the
list environment, pressing Enter creates a new paragraph using the Standard
environment.

24
CHAPTER 4. LyX ENVIRONMENTS 25

Think of the paragraph environment as a “bucket” that contains all


the properties of the paragraph. You don’t have to worry about any
of the formatting, numbering, or other organizing details because
LyX does it for you. To view your typeset output, simply press
the View PDF (pdflatex) toolbar button. LyX creates the PDF and
launches your viewer automatically.

Paragraph Environment Pull-Down Box

The partial screen shot shows two views of the paragraph environ-
ment pull-down box at the far left end of the LyX toolbar (Figure 4.1).
The paragraph is the basic unit of composition. Choose from this
menu to tell LyX what kind of environment to use for each para-
graph.

Figure 4.1: LyX: Paragraph Environment Pull-Down

Books are divided into front matter (preliminaries), text (the heart
of the book) and back matter (references). The environment menu
is arranged logically to mimic this typical book organization:
CHAPTER 4. LyX ENVIRONMENTS 26

• List
• Section
• Unnumbered
• Front Matter
• Back Matter
• Main Text

Front Matter

The front matter of a typical book contains the title, author, publisher,
copyright page, dedication, the table of contents (TOC) and lists of
figures & tables if there are any. LyX provides an environment for
each of these paragraph types. Follow along with me and I’ll show
you how I used each of these environments to create the structure
of this book.

Title Page

Title

Simply enter your title and choose Title from the environment menu.
LyX will format and display your title in a large font centered on
screen. If your title is longer than a single line, you can control how
it wraps by using Ctrl + Enter. When you’re satisfied press enter
and you’re finished. Easy.

Author

Enter your name (or names for multiple authors). Use Ctrl + Enter
to put multiple authors on separate lines. Press Enter and you’re
finished.
CHAPTER 4. LyX ENVIRONMENTS 27

Date

If you want a specific date on your title page, enter it here. If you
don’t enter a date here, LyX will default to today’s date. If you
prefer not to have a date on your title page, you must put this code
snippet in your LATEX preamble:

\date{}

This is a manual command where the date would normally be en-


tered between the curly braces. When you leave them empty as in
the example above, LATEX will skip the date.

Subject

LyX will place a subject paragraph at the top of your title page.
As of this writing, the newest version of KOMA-script has a new
environment for subtitles. Unfortunately it’s not available in the
Linux repositories so I used the Subject environment instead.

Publishers

Enter the publisher and any graphic you want here. LyX will put
this information at the bottom of the title page. We’ll cover graphics
in a later chapter.

Copyright Page

There’s no dedicated environment for a copyright page because you


don’t need a special environment. When you finish with the Title
Page, press Enter and you’ll be on a new page with no headings,
typical for a copyright page.

Once you have entered some text at the top of the copyright page,
you can put additional information at the bottom of the page, just in-
sert vertical fill (vfill) from the Insert . Formatting . Vertical space. . .
menu.
CHAPTER 4. LyX ENVIRONMENTS 28

Dedication

Use this environment to create a dedication page. LyX will format


your dedication page automatically in a larger center justified font.

Table of Contents (TOC)

Choose Insert . List/TOC . Table of Contents from the main menu


and LyX will insert the TOC at the cursor position. Really, that’s all
you need to do. Once you have a TOC, LyX keeps track of everything
so you don’t have to.

Lists of Figures or Tables

If you have figures or tables and want to list them in the front of
your book, you can add them from these main menu choices.

• Insert . List/TOC . List of Figures


• Insert . List/TOC . List of Tables

You must have the Table of Contents slider set to the Section depth
for your list entries to show up on either the Lists of Figures or Lists
of Tables pages.

Back Matter

The average person who publishes an E-book probably won’t need


much of the information presented here. I’ll touch on each of the
elements that are traditionally included in the back of a book and
refer the reader to the extensive documentation available from the
LyX Help menu for details.
CHAPTER 4. LyX ENVIRONMENTS 29

Appendices

Inserting an appendix in LyX is easy. Select Document . Start Ap-


pendix Here from the menu. When you use this command, LyX
designates the remainder of the document from the cursor position
as the appendix region and marks it with a red border line.

Chapters (and sections) within the marked appendix region are


identified with capital letters instead of chapter numbers and are
included in the TOC.

Endnotes

Changing the footnotes to endnotes is a specialized topic that’s


probably of marginal interest for most people reading this book. I
refer you to the EmbeddedObjects manual available from the LyX
Help menu.

Bibliography

LyX makes managing a bibliography a snap. All you need to do is


select Insert . List/TOC . Bibliography from the main menu. LyX will
insert the bibliography at the cursor location. LyX needs a BibTEX
formatted database to work properly. It’s easy to set one up. Here’s
a link to the LyX Wiki page that explains BibTex and includes a
listing of available BibTex managers:

• BibTeX and LyX

A BibTEX database is stored in a typical ASCII text file. Use one


of the listed managers to enter your data – it’s easy and as a side
benefit, it will keep your sources organized.
CHAPTER 4. LyX ENVIRONMENTS 30

Glossary

A glossary is an alphabetically sorted list of terms and short defini-


tions located at the end of a book. LyX uses the term nomenclature
for this function. Refer to section 6.7 in the LyX User Guide for
detailed help.

Index

Indexing your book is a straightforward task. Wait until you’re


finished or index as you go. . . it’s up to you. Indexing is a two step
process.

• Choose Insert . Index Entry or use the toolbar button to create


a new index entry. LyX will pop up a small box at the cursor
position and suggest the word where the cursor is located or
highlighted as the entry. Accept it or edit the entry. Try it now.
You’ll get a better understanding that way and you can hit Ctrl
+ Z or the undo button if you don’t want to keep it. Repeat the
process for each index entry.
• Choose Insert . List/TOC . Index List from the main menu to
insert the Index list at the cursor position. LyX doesn’t include
the index in the TOC but this shouldn’t be an issue because the
index is generally the last section in a book and readers know
where to look for it.

It’s a good idea to be conservative in your indexing. Choose the


most important uses for a word or phrase. Readers simply won’t
want to search for dozens of entries for each word. Indexing is more
art than science. Use your instincts and when in doubt, leave it out.

Refer to section 6.6 in the LyX User Guide for detailed help on such
subtopics as index grouping, page ranges, cross-referencing, index
order entry and index layout tweaks.
CHAPTER 4. LyX ENVIRONMENTS 31

Headings: Structural Hierarchy

Splitting longer documents into logical subdivisions using a well


thought out structural hierarchy is an essential part of the writing
process. LyX makes developing a good organizing structure easy.
Simply enter the title for your Chapter, section, subsection, etc.,
make the appropriate choice from the paragraph environment menu
and LyX takes care of the rest for you.

You can select the type of heading you want either before you enter
your title or you can enter your title first. No need to highlight your
text. As long as the cursor is in the paragraph, LyX will understand.

Here’s a real time saver to use in the beginning when you’re setting
up the structure of your book. Enter all of your chapter titles
pressing enter after each one in turn. Then highlight the entire
group, select Chapter from the paragraph environment menu and
all of your chapters are done with a single keystroke. You can always
change, rearrange or add later.

The same principle works as you go deeper into your headings.


Enter all the sections for a chapter, highlight, select Section from
the menu and again, you save multiple keystrokes.

Headings: Default Classes

Both numbered and unnumbered headings are available for the


default Article, Book and Report classes. See Table 4.1 on the next
page for details. Headings are not available for the Letter class.
Chapter is not available in the article class.

Parts are numbered using Roman numerals. All other sections


are numbered using a number series separated by periods. For
example, Chapter 1 sections are numbered 1.1, 1.2, 1.3 and so on.
Subsections are numbered 1.1.1, 1.1.2, etc. I stopped at the Chapter
number for this book because I think it looks cleaner.
CHAPTER 4. LyX ENVIRONMENTS 32

Numbered Unnumbered Subdivides Into


Part Part* Chapter or Section
Chapter Chapter* Sections
Section Section* Subsections
Subsection Subsection* Subsubsections
Subsubsection Subsubsection* Paragraphs
Paragraph Paragraph* Subparagraphs
Subparagraph Subparagraph* None

Table 4.1: Headings for default article, book and report classes

The choice is yours. See page 19 for the numbering and TOC dialog
details. Just move the sliders and let LyX take care of managing the
details for you:

• Choose the level depth for numbering


• Choose the level depth to include in the Table of Contents

Unnumbered sections (designated by a trailing asterisk) are never


numbered and won’t be included in the Table of Contents.

Extra Headings: KOMA-Script Classes

The KOMA-Script document classes include additional Unnumbered


paragraph environments:

• Addpart
• Addchap
• Addsec
• Addchap*
• Addsec*

Addpart, Addchap and Addsec will add a new Part, Chapter or Sec-
tion. This is a very useful feature. Unlike the standard unnumbered
CHAPTER 4. LyX ENVIRONMENTS 33

paragraph environments, Addpart, Addchap and Addsec titles will


be included in the Table of Contents and will appear in the page
headings.

Addchap solved a problem for me. An Introduction shouldn’t have a


number but you still want it to appear in the TOC and have a normal
heading. Addchap does this and allowed me to add the unnumbered
Introduction to this book outside of the “normal” chapter structure.

Addchap* and Addsec* are almost identical to Chapter* and Sec-


tion* with one important difference. They clear the running page
heads to avoid the confusion of showing obsolete page headings
from a prior chapter.

In other words, Chapter* and Section* don’t clear the heading and
will show the heading of the previous chapter or section. Not good.
Addchap* and Addsec* avoid the problem by clearing the previous
chapter or section heading and showing a blank heading instead.

The List Environments

LyX provides four paragraph environments for making lists: Itemize,


Enumerate, Description and Labeling. Select any of these from the
list group on the paragraph environment pull down menu or use one
of the list environment toolbar buttons shown on Figure 4.2 on the
following page.

Standard Lists are a special environment where pressing


Enter lets you continue with your list by beginning
a new list item instead of putting you back into
the Standard paragraph environment. When you
finish your list, press Enter and click the Standard
toolbar button, a handy shortcut that returns you
to the standard paragraph environment.
CHAPTER 4. LyX ENVIRONMENTS 34

Standard Decrease depth

Numbered List Increase depth

Itemized List Description

Labeling

Figure 4.2: LyX: List environment toolbar buttons

Numbered List [Enumerate on the menu] Is a numbered list.


Itemized List Bulleted list
Labeling The list you’re reading now is an example of the
labeling list. Labeling is a LyX add on to LATEX
that has a special feature not available with the
Description list. You can ensure even left mar-
gins, separated from the labels, by choosing Edit .
Paragraph Settings from the main menu and enter-
ing the text of your longest label in the box on the
pop up dialog.
Description Similar to labeling, but the label is emphasized in
a bold font and the left margin indent levels are
different.
Increase depth Lists may be nested. This button is a quick way to
increase the nesting level
Decrease depth Use this button to decrease the nesting depth.
CHAPTER 4. LyX ENVIRONMENTS 35

Features Common To All List Environments

LyX treats each item in a list as a separate paragraph. When you


press Enter in any of the list environments, you remain in that list
environment until you select another paragraph environment. To
return to the Standard paragraph environment, select Standard
from either the Standard toolbar button or the menu. [Hint] The
toolbar buttons are a great time saver for all list operations.

Use Ctrl + Enter to break a paragraph without starting a new item


in your list.

You can nest lists. In fact, you can mix different list environments
this way if you like. The Increase depth and Decrease depth toolbar
buttons are a convenient way to change the nesting level. Please
refer to Help . User’s Guide for a detailed discussion of nesting.

Numbered Lists

Are called Enumerate in the menu. The labels on these lists are
either numbers or letters depending on the nesting depth. To illus-
trate, here are the four standard list environments presented in a
numbered list in the order they appear in the menu:

1. Itemize
2. Enumerate

a) As you can see here, this item is nested and LyX changes
the numbers to lower case letters in parentheses.
i. Each level changes the label to make your list / outline
easy to read and understand.
A. You can go four deep with your nesting
ii. Use the toolbar buttons to either increase or decrease
nesting depth
b) LyX keeps count for you while you’re in the Enumerate list
environment
CHAPTER 4. LyX ENVIRONMENTS 36

3. Description
4. Labeling

Itemized Lists

Are the familiar “bulleted” lists. To illustrate:

• Each paragraph in an itemized list is labeled with a symbol

– The symbols change as you nest deeper


* Go to Document . Settings . Bullets to customize the
symbols LyX uses
· LyX allows nesting up to four levels
* Change the nesting depth with the Increase or De-
crease depth toolbar buttons

• Exit your list and return to the standard paragraph environ-


ment by clicking on the (you’ll discover how handy it really
is) Standard toolbar button. You aren’t limited to a return to
the standard paragraph. You may choose any new paragraph
environment you like to exit from a list.

Labeling

As mentioned earlier in this section, Labeling is a list environment


extension to LATEX and is unique to LyX. With Labeling (and Descrip-
tion) you choose the label for your list with the first word in each
item. LyX does this automatically and uses the first space after
the label to end the label. You can force LyX to treat a phrase as
a single word by using a “protected space(s)” by pressing Ctrl +
Space instead of the space bar after each word in your label.

Labels are not emphasized in bold


Left margins can be evened when you have a long label. The Left
margins label shown here illustrates a protected space
and a long label.
CHAPTER 4. LyX ENVIRONMENTS 37

Nesting works within all list environments


LyX list this environment gives you a useful alternative to the
Description environment

Description

As with the Labeling list environment, Description uses the first


word (or phrase with protected spaces) as the label for each item in
the list.
Labels are emphasized using a non serif bold font. Description
uses the emphasized label and a modest left margin indent to
distinguish each item.
Left Margins cannot be evened out using the paragraph settings
dialog to change the label width because the smaller left margin
is independent of the label width in a Description list.
Nesting works in this environment
Choose the list environment that best fits your needs

Special Environments: Quotes & Poetry

The special paragraph environments provided by LyX for quotes,


quotations and poetry widen margins to set them off from normal
text. Press Enter as much as you like and you’ll stay in the environ-
ment until you choose another either from the menu or drop back
into Standard by clicking on the Standard toolbar button.

Quotes and Quotations

When you select either Quotes or Quotations from the paragraph


environment menu (look for them at the bottom under the main
text group) LyX will widen both left and right margins. Here are
examples and further explanation.
CHAPTER 4. LyX ENVIRONMENTS 38

Quotes are normally paired with documents formatted


using vertical spacing between each paragraph and no
indentation.
Quote paragraphs are never indented and will have verti-
cal spacing between each paragraph.

Quotations are paired with documents formatted with


paragraph indenting. Quotation paragraphs always indent
each paragraph (even the first) and never put vertical
spacing between each paragraph.

Poetry or Verse

You’ll find this environment listed as Verse in the Main text group on
the paragraph environment menu. LyX widens the left margin and
puts extra space between each stanza. You must use Crtl + Enter
for each new line and use Enter to create a new stanza. Here’s an
example:

Lover’s escape
Fine fabric woven, bound
Together and strong
Threads unraveled, free, unbound
Lost on the wind

If you need more space between stanzas, you can insert additional
vertical space by choosing Insert . Formatting . Vertical Space from
the main menu.

More KOMA-Script goodies

The Addchap environment is worth the price of admission by itself,


but there’s more:

• Minisec
CHAPTER 4. LyX ENVIRONMENTS 39

• Captionabove
• Captionbelow
• Dictum

Minisec is my favorite. It let’s you put a bold heading in the standard


character size in the following paragraph without affecting the
document structure. Take a look at the Title Page subsection on
page 26 for one example of how I used Minisec in this book.

Captionabove, Captionbelow and Dictum are for special needs. See


Help . Additional Features . Section 5.14.2 for more information.

WYSIWYM

Now that you’ve been introduced to the LyX paragraph environ-


ments, you’ll have a better understanding of how to navigate LyX.
Like any good editor LyX gives you a complete suite of copy, cut,
paste, move paragraph and other familiar text manipulation tools.
Spell checking, a built in thesaurus and document statistics (word
and character count) are available from the Tools menu.

You’ve already seen how LyX departs from the usual WYSISYG
paradigm in the way you are able to set up your document, choose
your paragraph environments and let LyX worry about the type-
setting. WYSIWYM or What You See Is What You Mean takes the
paradigm a step further with the on screen display.

LyX uses the system fonts you choose when you set up your pref-
erences. The on screen fonts will use the same family you choose
for your printed output. For example, the KOMA-script class default
uses a serif font for your text but switches to a non serif font for
titles and headings. LyX mirrors this with on screen system fonts.

Headings are also larger and rendered as bold to distinguish them.


Bulleted or numbered lists show the labels and the indents, etc. In
short, what you see is mostly what you will get in the final output.
CHAPTER 4. LyX ENVIRONMENTS 40

What you won’t see are margins, tab stops, pages, etc. LyX wraps
your text automatically at the right of the window. You have the
option of setting a zoom factor for better readability on screen.

You don’t need to separate paragraphs by hitting Enter twice. In


fact, LyX won’t let you. You can’t hit a double space by accident
either. Again, LyX won’t let you. Not to worry, for those special
circumstances where you might need wider spacing either vertically
or between words, you can do these from Insert . Formatting on the
main menu. LyX is simply doing the typesetting per your instructions
so you won’t need to worry while you write.

LyX has an outline window that you can pop up on the left portion
of your screen that will show you your TOC, Lists of Tables, Labels
and References, Graphics, etc. Simply put your cursor anywhere on
the outline list, click with your mouse and you’ll go there instantly.
When you’re in the Table of Contents, you can easily change the
order of chapters, promote or demote any headings, etc.
5 Graphics = Punch + Clarity

Sometimes words aren’t enough. Images, when used quietly and


with discretion, can give your E-Book dimension and depth. The
old cliche that a picture is worth a thousand words isn’t quite true.
Illustrations and tables compliment your words and combine with a
synergy not possible with graphics or words alone.

I’ve used graphics liberally, especially screen shots, to illustrate


dialogs, menu choices and so on. My use of graphics also gives you
examples so you can see for yourself how integrating graphics into
the text brings clarity without complication.

Bit mapped and Vector Graphics Revisited

Computer graphics come in two flavors, bit mapped (or raster)


graphics and vector graphics. Bit mapped graphics uses individual
pixels to describe an image. Vector graphics uses complex mathe-
matics to calculate lines and curves.

Your computer screen uses millions of individual pixels and millions


of colors (16.7 million for 24-bit graphics) to display an image.
Digital photography is probably the most familiar and best example.
When pixels are small, they blend together for smooth color and
tonality because the human eye cannot detect individual pixels.
When you enlarge a bit mapped image too much, the eye begins to
detect the pixels and interprets what it sees as blur.

The mathematical basis of vector graphics allows unlimited enlarge-


ment without blurring but without the smooth colors and tonality

41
CHAPTER 5. GRAPHICS = PUNCH + CLARITY 42

possible with bit mapped images. Vector graphics are the right
choice for drawings where lines matter. The sharpest text fonts are
rendered with vectors.

How to Use The Gimp

Gimp is a sophisticated, complex package that gives you a lot of


power. The first thing you might do after installing Gimp, is click on
the help menu or press F1 to bring up the user manual. The manual
is well organized and complete and will give you an overview of
Gimp’s capabilities and specific instructions for the various com-
mands and screens.

I suggest you look through the complete tutorials available on the


Gimp home page. They’re quite good. Simply scroll to the bottom of
the page and click on the tutorial link. A complete guide to Gimp is
beyond the scope of this book. Here are a few of the ways I used
Gimp to prepare graphics for this book.

Scaling images

You may have a photograph or other high resolution image you’d


like to include in your book. Since you won’t display the huge image
directly in LyX, it makes more sense to scale the image before you
link it into your book. Doing this saves storage space and the work
LyX would have to perform to reduce the image.

Most of the screen shots used in this book are in the neighborhood of
635 pixels wide. A full size image (using my monitor as an example)
would be 1280 x 1024 pixels. It’s easy to scale using Gimp. Load
your image, then select Image . Scale Image from the main menu.
Simply enter the desired width (Gimp will preserve the proportions),
click Scale and save.
CHAPTER 5. GRAPHICS = PUNCH + CLARITY 43

Cropping an image

There are several instances where I used a portion of a screen shot.


To crop an image in Gimp, use the rectangle select tool to outline
the portion of the image you need, choose Image . Crop to Selection
from the menu. Then save.

Enhance photos

Gimp has a complete suite of tools to enhance and manipulate digital


photos. You can do amazing things with your photos in Gimp. I use
it for my digital photography all the time. The learning curve is
steep, but worth the effort.

Plug-ins to automate special features

You can download Gimp plug-ins from the Gimp home page that can
save you a lot of work. I use two:

Watermark inserts your copyright or other text you want to use into
a photo or drawing to identify and give you some measure
of protection when you post an image on the web. The code
for this is included as an attachment to this book. Here’s an
example where I used Gimp to transform a photo to look like a
pen and ink drawing and put my copyright watermark in the
lower right corner.
CHAPTER 5. GRAPHICS = PUNCH + CLARITY 44

Frames are a series of new menu items that allow you to add mats
and/or virtual frames to an image. The author provides a good
tutorial, Creating Virtual Mats and Frames with The GIMP.
There is a link for the script you need included in the tutorial.

Original drawings

You can create original drawings using Gimp. Here’s an example of


a drawing I created and will be using on a future book cover.
CHAPTER 5. GRAPHICS = PUNCH + CLARITY 45

Alternatives to Gimp

If you don’t plan on using a lot of graphics or your needs are simple,
you can probably use a good photo manager (usually included with
your system) to scale and crop images instead. I use my gThumb
photo manager on occasion, but I prefer the power of Gimp.

Why You Need Inkscape

Inkscape is a vector graphics editor. Simply put, Inkscape uses


vector mathematics to represent lines (straight and curved) and
points to describe complex shapes. You can fill those shapes with
color. For example, I used Inkscape to create the List Environment
Toolbar graphic Figure 4.2 on page 34.
I just dropped the bitmap file of the menu corner onto the Inkscape
page, selected the text font and size, entered the labels and drew
the lines from each label to the corresponding toolbar button. I used
Inkscape for two reasons:
CHAPTER 5. GRAPHICS = PUNCH + CLARITY 46

• The combination of a superimposed grid and the ability to align


each line in parallel
• Vector based fonts
A vector based font is made up of the curves and lines that precisely
define the outline of each letter. When the computer renders a
vector font, it draws the outline of the font then fills in with the
color. Vector fonts are always crisp no matter what size because the
computer generates them using a mathematical algorithm as they
are needed.
If you want the best looking cover for your E-Book, you need
Inkscape (or another vector editor of your choice). You could use
Gimp or another bitmap editor to create a book cover, but Inkscape
is easier and the results are superior. I used Inkscape to create the
cover for this book. Chapter 7 will give you a complete tutorial and
show you how to create your own professional looking covers.

Using Graphics and Tables in LyX

Introducing graphics and tables into your document is a simple


matter. Either insert directly into your text or use figure or table
floats, depending on what you want to accomplish.
When you insert graphics or a table directly into your text, the image
or table will appear at the cursor position and it’s up to you to make
the necessary room. Sometimes it’s just easier to insert a graphic or
table directly. This gives you direct control of context, but can often
result in unsightly large white spaces in the text. If you use figure
or table floats instead, LyX gives you tools to maintain context and
does most of the work for you. The advantages of using floats are
explained on page 48.
By default, all graphics and tables will be flush left. You can change
this easily by choosing Paragraph Settings by either right clicking
the mouse or from the edit menu. I like to center most of my
graphics and all tables, so I just click center and it’s done.
CHAPTER 5. GRAPHICS = PUNCH + CLARITY 47

Insert . Graphics

To add a graphic, select Insert . Graphics from the main menu brings
up the graphics dialog.

• Clicking on the Browse button brings up your file browser. Find


the file you want and accept it.
• The default is full size. If you want to scale your image, check
the Scale Graphics (%) box and enter a number. You’ll probably
want to view the PDF file to see how well the graphic fits. A bit
of trial and error will get the graphic to the size you want.
• Accept the remaining defaults except for LATEX and LyX options.
You can choose to either show the image on your screen or not
and select the on screen magnification from the LATEX and LyX
options tab. These settings are for on screen display only and
have no effect on the PDF output.

Insert . Table

Tables are a convenient way to summarize data. Select Insert . Table


from the main menu and a dialog pops up asking you to choose the
number of rows and columns. Use the toolbar button instead. It’s
more convenient and gives you a nice little pop up grid where you
can easily highlight the number of rows and columns to include in
your table.

Take a look at the table I created for the default headings on page 32.
It’s a good example of how you can pack a lot of information into a
small, easy to read space.

A right click when your cursor is in a table will bring up a context


sensitive menu where you can add or delete rows or columns and
make quick, simple adjustments. Click on Settings brings up the
table dialog where you can fine tune the table settings, borders or
select longtable:

• Table settings tab


CHAPTER 5. GRAPHICS = PUNCH + CLARITY 48

– Horizontal and vertical alignment of text within each cell


– Set a fixed width for a column or columns. The default
setting expands and contracts depending on the length of
the longest text. When you select a fixed width, long text
will wrap.
• Borders tab where you can set or clear borders and customize
the look.
• Longtable: Choose this option when you have a long table
that’s too long to fit on a single page. Check boxes and settings
allow you to:
– Tell LyX where to split the table
– Set up parameters for headers and footers
– Customize the borders

Floats

Floats are the way LATEX (and LyX) handles images and tables that
can’t be broken over a page break. Floats don’t have a fixed location
in the text. They can move forward or backward in your text to find
the best fit. This avoids large stretches of white space and gives
your document a more professional look.
It makes no sense to worry about the final position until your doc-
ument is finished because floats are processed when the output
document is processed. LATEX will move each float to the closest
location where the entire image will fit onto a single page and back
fill the empty space with text. You can fine tune the location of
any float by choosing Advanced Placement Options from the float
settings dialog when you’re ready.
Float figures and tables are numbered and captioned. They are
linked from the list of figures or tables in the front of your document
and can be cross referenced from any location within the docu-
ment to maintain context. Cross references are covered in detail in
chapter 6.
CHAPTER 5. GRAPHICS = PUNCH + CLARITY 49

To insert a figure or table float in your document, choose Insert .


Float . Figure or Insert . Float . Table from the main menu. LyX will
supply the correct label and number automatically. All you need to
do is enter the description for your caption in the box.

• To insert graphics in your figure, move the cursor outside of


the description box and follow the procedure outlined in the
Insert . Graphics section.
• To insert a table, move the cursor outside of the description box
and follow the procedure outlined in the Insert . Table section.

LyX always centers Float captions. Use the paragraph settings


dialog to center your image to match.
6 The Power of Links

While LyX will produce a PDF file that gives you truly professional
printed output, links can turbocharge your E-Book in ways no
printed document can ever hope to match. Links power the In-
ternet. In fact, the Internet is made up of and completely dependent
on links. And like the Internet, links can power your E-Book and
take the reading experience to levels unheard of in the print age.

A printed book is linear. The reader must page back and forth
looking for information. When a reader encounters a reference in
an E-Book, they can jump to the reference instantly with a single
mouse click and return to where they left off just as easily.

LyX excels at linked cross references, gives you and your reader
the power of a table of contents and other listings that link directly
to the text they reference, and straightforward ways to embed live
URLs and hyperlinks in your document.

Cross Referencing with LyX

Cross referencing is a two step process. Once you create a label for
any reference, you can use that label anywhere in your document to
create a linked cross reference. It’s easy.

Labels

Position the cursor on the text you want to reference, then select
Insert . Label from the menu or click on the Insert Label toolbar

50
CHAPTER 6. THE POWER OF LINKS 51

Figure 6.1: LyX: Label Dialog Example

button. Figure 6.1 is a screen shot that illustrates how to insert


a label in a figure. I put the cursor at the beginning of the figure
description box and when I clicked the Insert . Label toolbar button,
the shaded portion “fig:LyX-Insert-Graphic” popped up in a small
window. I accepted LyX’s suggestion and the result is what you see
in Figure 6.1. You are free to accept the suggestion offered by LyX
or you can edit if you like.

By the way. I used the Gimp to crop the image I included in Fig-
ure 6.1. I took a screen shot of the entire LyX screen, then cropped
to what I needed for my image. It only took me a minute. I also
inserted three cross references in this subsection.

Inserting Cross-References

Place the cursor in the location where you want a cross reference to
appear, then select Insert . Cross-Reference from the menu or click
on the Insert Cross-Reference toolbar button. Scroll through the
list of references shown in the pop up dialog (see Figure 6.2 on the
following page for an example), select the label to reference, choose
from one of the formats explained below and click OK.

<reference> prints the number of the chapter, section, figure or


table
(<reference>) prints the number of the chapter, section, figure or
table enclosed in parentheses
<page> prints the page number where the reference appears
CHAPTER 6. THE POWER OF LINKS 52

on page <page> prefixes the page number with “on page”


<reference> on page <page> prints the reference number, the text
“on page” and the page number
Formatted reference requires the LATEX-package prettyref. This is a
complex package intended for a specialized audience and isn’t
compatible with automatic reference naming.

Figure 6.2: LyX: Insert Cross Reference Dialog

Recommendations and a Discovery

When the simple solution works, why complicate matters? I tried


both Formatted Reference and Automatic Reference Numbering.
They are intended for people who write scientific papers with many
complex references. See Help . Embedded Objects if you’re inter-
ested in trying them out.

You can tap the power of cross references by simply typing the name
(Figure, Chapter, Table, etc.) in front of the inserted reference.
CHAPTER 6. THE POWER OF LINKS 53

That’s what I did. It’s easier and gives you complete control of the
text.

Cross references are the way LyX keeps floats in context. For exam-
ple, if you are referencing a Figure and use <reference> on page <page>,
just type the word Figure followed by a space in front of the refer-
ence. LyX prints a different cross reference depending on where
the referenced float is located.

• Figure x.x on the next page (or on the following page)


• Figure x.x on the previous page
• Figure x.x on page xx
• Figure x.x (when the figure is on the same page as the refer-
ence)

When you click on a figure reference in the PDF file, the cursor
jumps to the Label by default. This always bugged me because it
makes you scroll up in the document to show the image. I discovered
this code while digging around in the LyX manuals:

• \usepackage[figure]{hypcap}

If you put this line in your preamble, the referenced figure appears
at the top of the screen when you click the cross reference. It’s
simple and it works great. This will only work for figures. The
manual cautions against using it for tables.

The TOC and Other Listings

Every entry in the Table of Contents (TOC), the List of Figures and
the List of Tables is dynamically linked to a page number, figure
number or table number. LyX handles these links automatically.
CHAPTER 6. THE POWER OF LINKS 54

Footnotes

Footnotes are incredibly easy with LyX. Just click the Insert Footnote
toolbar button or pick Insert . Footnote from the main menu and
enter the text for your footnote in the box that pops up at the cursor
location. The footnote box shows as a gray shaded “foot x” with
an expanding area to the right for your text. Click on the shaded
portion to show or hide your text.

LyX numbers footnotes consecutively and keeps track automatically.


Footnotes are marked in the text with a superscript number that
links to the footnote at the bottom of the current page.

Citations

If you have a bibliography, use citations to “cite” your sources.


Either click the Insert Citation toolbar button or Insert . Citation
from the main menu and choose the appropriate bibliography entry
from the pop up dialog.

Each citation is marked in the text (at the cursor position) with
the number of the bibliography entry and is enclosed in square
brackets. Each citation is linked so a click on the citation jumps to
the corresponding bibliography entry.

Hyperlinks

A hyperlink can link to a URL, an email address or a local file.


There’s no reason for a link to a local file in an E-Book, but you
might want to include a click-able link to your email. The main
use for hyperlinks in an E-Book is to give the reader live links to
websites.
CHAPTER 6. THE POWER OF LINKS 55

Add a hyperlink by clicking on the Insert Hyperlink toolbar button


or select Insert . Hyperlink from the menu. The pop up dialog has
two fields:

• Target: Enter the URL here


• Name: Enter a name for the link here. If you leave this field
blank, LyX will show the URL highlighted in your document
instead of the name.
7 A Professional Cover

Clothing a well crafted e-book in a poorly designed cover is like


wearing sneakers with a tuxedo. Neither is appropriate. When
someone says you can’t tell a book by it’s cover, they’re wrong. Your
cover is the first thing a prospective customer sees. A professional
looking cover makes your book stand out and sends a message that
what’s inside your book is as well done as the cover – worth buying
and reading.

Assembling the Ingredients

• Cover size = page size: If you haven’t chosen a final size for
your book, do it before you begin designing your cover.
• Cover graphics: Do you have an image you’d like to include
on your cover? Scale the image using your bitmap editor if
necessary. Make the image a little larger than you’ll need so
you can fine tune the size in Inkscape. The same width or
slightly smaller than your cover is a good starting point. An 8
1/2 X 11 letter size cover is 765 pixels wide.
• Final title: Or your final draft(s). You can play with font sizes
and titles while you work in Inkscape.
• Subtitle: Same deal with your subtitle. Have it or a few draft
ideas ready before you begin.

56
CHAPTER 7. A PROFESSIONAL COVER 57

Cooking the Meal

Let’s fire up Inkscape and get that cover designed and exported as
a PDF file. When Inkscape loads you’ll see a blank window with a
page outlined in the center.

Setting Up Your Page

Page size

Select Document Properties from the file menu to bring up a dialog.


If the page size you need isn’t listed in the preformatted page size
box, enter the width and height in the custom size boxes. Be sure to
change the default px (pixels) to inches (in) or metric (mm or cm).

Leave Show page border checked so you can see your page on the
screen. If you like the default border shadow, leave Show border
shadow checked as well. It will show in your final cover. I left it
checked because I like it. I think it adds an extra dimension to a
cover.

Set up a grid to guide you

Click on the Snap tab in the Document Properties window All you
need to do here is make sure that Enable snapping is checked.

Next, click on the Grids tab in the Document Properties window.


Click New Rectangular grid, make sure Enabled and Visible are
checked and enter the spacing for your grid.

The default Grid units are pixels, so you’ll need to change them.
Use the same units you used for your page size. Leave the X and Y
origins set at zero. Enter a number for X and Y spacing. Use the
same number for both so you get a square grid. Use a number that
will put each corner of your page on a grid intersection. Since this
book is 5.5 X 8.5, I used 0.5 inches.

Dismiss the Document Properties dialog. Your settings will be saved.


CHAPTER 7. A PROFESSIONAL COVER 58

Create the Base Cover Object

Select Create rectangles and squares from the toolbar on the left
side of the screen (or press F4). Position your mouse on the upper
left corner of the page, press and hold the left mouse button and
drag the rectangle to the lower right corner of the page and let go.
Your cover will be the exact size of the page because the grid will
force the cursor to snap to the corners.

Go back to the toolbar and select the Select and transform objects
tool. It’s the arrow at the top. You can also press F1 to select this
tool.

Add Color to the Cover

It’s easy to add color to your cover. When you grabbed the arrow
tool, the cover object was selected automatically because it was the
last thing you worked on. Whenever an object is selected, you’ll
see arrows at the corners and four sides. Clicking anywhere on an
object with the arrow tool will select it.

Select Object . Fill and stroke from the main menu. This will bring
up the Color Dialog. The dialog should default to the Fill tab with
Flat color and the color wheel selected.

Play with the color wheel until you’re satisfied with the color. Leave
the blur setting at the default zero. Fine tune color tones with the
color wheel if you use the Opacity slider to fine tune color tones your
tones may not translate properly. Set the Opacity slider to 100%.

When you’re finished, just dismiss the color dialog.

Add Graphics to the Cover

The easiest and fastest way to add an image to your cover is to pull
up your file browser in a separate window, select the graphics file
with your mouse and drop it onto the base cover.
CHAPTER 7. A PROFESSIONAL COVER 59

Scaling the image

You’ll probably want to tweak the size of your image. Select Object .
Transform from the main menu (it’s near the bottom of the pop up).
This will bring up a new dialog where you can scale your image to
fit.

Click the Scale tab, check the Scale proportionally box and enter
the numbers for width. The default values are percentages, but you
can choose inches (or any other unit) if you like. Each time you click
the Apply button, you will see the changes on screen. When you’re
happy with the image size, dismiss the Transform window.

Positioning the image on your cover

Select the arrow tool from the toolbar, click on the image and drag
it into position. If you want to eyeball your image without snapping
to the grid, just go to the main menu, select View . Snap to toggle
Snap off. For more precision, change the grid settings to a smaller
fraction from Document Properties.

Add Text to the Cover

Selecting and entering text

Select the text tool from the toolbar on the left. The icon is an upper
case A. Position the cursor on the base cover and enter your text.
You can select the font and size from the window on the main menu
or once you begin typing, click on Text . Text and Font from the main
menu to pop up a floating window as shown in Figure 7.1 on the
next page.

Choose the Font Family, Style, Font size, Layout (default is centered)
and Line spacing from the Font tab in the window. Use the Text tab
to enter / edit your text in the text window. Click the apply button
when you’re finished.
CHAPTER 7. A PROFESSIONAL COVER 60

Figure 7.1: Inkscape: Text and Font Dialog

This window puts everything at your fingertips but you can just as
easily enter the text directly on the cover and choose fonts, etc.
from the toolbar at the top of the main window. Your choice.

Positioning text on the cover

Text is an object and can be manipulated easily with the arrow tool.
Select the arrow tool from the toolbar, click on the text and move it
around on the cover until you are satisfied. When any block of text
is selected, you can also pull up the Text and Font window to make
changes.

The PDF Cover

When you’re satisfied with your cover, use the Select and transform
objects tool (the arrow) to put a rectangle around the outside of the
entire cover. Select Object . Group from the main menu. This will
group the base cover, image and text objects as a single object. You
can always reverse this with ungroup.

Now go to the file menu, choose save as then scroll through the
file types and click on PDF. Save the file and you’re done. When
you quit, Inkscape will ask if you want to save the Inkscape (SVG)
CHAPTER 7. A PROFESSIONAL COVER 61

file. Say yes because you’ll need that file if you ever want to make
changes to your cover.

Adding the Cover to Your Book

Add the Cover Using LyX

• Open the LyX file for your E-Book


• Position the cursor at the beginning of the file in front of your
title and press enter
• Select Insert . File . External Material from the main menu
• Select the following from the External Material pop up dialog
(see Figure 7.2 on the following page for an example).

– Use the File: Browse window to find your cover.PDF file


– Choose PDFPages from the Template pull down box
– Click on the LATEX and LyX options tab and enter the fol-
lowing in the text window:

* pages=-
– LyX will show the cover in LyX by default. Uncheck the
Show in LyX box in LATEX and LyX options to turn this off.

That’s all you need to do. LyX takes care of the rest. Each time
you view or export to PDF, your cover will be included as the first
(unnumbered) page in the file.

Alternative Ways to Add a Cover

Adding the cover in LyX is the simplest method and will preserve
your PDF index. However, it’s always a good idea to have fallback
alternatives. Choice is a good thing.
CHAPTER 7. A PROFESSIONAL COVER 62

Figure 7.2: LyX: External Material Dialog

• You can use either of the helper programs to join two or more
PDF files. See on page 4 for the download links. Run either
of these programs from the command line. For example type
pdftk –help for detailed instructions.
• http://www.mergepdf.net is a free online service that will merge
two or more PDF files. The service is quick and easy to use.
Follow the on screen instructions to upload your PDF files, then
simply download the merged document.
8 Putting it all Together

So far we’ve been talking about how to gather and set up the tools
you’ll need to write your book – how they tick and what they can do
for you. By now, you should have a basic understanding of how LyX
works and what’s possible. But the best teacher is doing. Yes, it’s
time to pull all of this technical stuff together, get busy and start
writing.
But first (there’s always something else to do) I’d like to share
some insights, explain how I put this book together and why I made
certain decisions so your journey might be a bit easier.

Structure is a Matter of Degree

All books are structured. They begin on the first page and continue
to the last in sequence. A narrative story line only makes sense
when read in sequence. Other books, especially reference books,
are meant for page flipping. Some books need a detailed table
of contents while others are better without one. Words alone are
sufficient for many books, but others benefit from illustrations and
examples that help the reader’s understanding. A book’s structure
should suit the topic. This book is highly structured for a few good
reasons:
• Sequence is important. Understanding depends on lessons
introduced in progression.
• It’s much easier for a reader to understand the operation of
unfamiliar software and concepts when the words are supple-
mented with images to illustrate those concepts.

63
CHAPTER 8. PUTTING IT ALL TOGETHER 64

• The book itself is a showcase for what’s possible.

I probably could have used fewer figures (or none at all) and gotten
my points across, but I used as many of the powerful tools as I could
to enrich your understanding.

• Seeing figures and tables is far better than deciphering a word


picture.
• Using the power of hyperlinks and later learning how easy
they are to set up sinks in deeper than a highly technical
explanation.
• Clicking on the many cross-references gives you first hand
experience of how they work in practice.

None of these would have been possible without the right format.

Why PDF?

I’ve focused on the PDF format and LyX/LATEX throughout for a


number of reasons. PDF is mature, it’s reliable, it’s an accepted
worldwide standard, it’s accessible across all operating systems and
it’s powerful.

PDF is perfect for creating highly structured documents. The


Portable Document Format (PDF) was created by Adobe more than
15 years ago and was officially released into the public domain as
an open standard (ISO 32000) in 2008. PDF has evolved into the
defacto norm for electronic document exchange across the Internet.
PDF is a compact file format that gives you, the creator, full control
because it preserves your intent and delivers the document faithfully
formatted, exactly the way you created it.

PDF documents are independent of operating systems and software.


PDF readers (Adobe Reader is available for all operating systems,
and Evince for Linux) are free, so anyone with a computer can
access and read PDF documents.
CHAPTER 8. PUTTING IT ALL TOGETHER 65

LATEX, the standard mark up language for producing professionally


typeset documents for a quarter of a century, takes full advantage
of PDF. LyX, first released in 1999, just gets better and better and
harnesses the power of LATEX in a familiar, GUI package that neatly
sidesteps the steep learning curve of pure LATEX. LyX insulates you
from the behind the scenes processing and puts all the power of
LATEX and the advantages of PDF at your fingertips.

When you export your completed book as PDF(pdflatex), you’ll have


a highly polished, finished product you can be proud of. True, PDF
is a page layout format first designed for the printed page, but
when your book includes images and tables that depend on proper
formatting, PDF is the best choice.

The question, Why PDF? has a few additional answers:

• All LULU E-Books are in PDF file format


• Scribd converts uploaded source files to iPaper (for online
viewing), PDF and plain text. They accept different source file
types including PDF, RTF and plain text.

Two of the major self-publishers like PDF. I think PDF gives you
advantages you won’t find with other formats. Even if your book is
pure text, PDF can be the best option.

But when you use LyX to create your book, you aren’t locked into
PDF, you have the freedom to export to other file formats if necessary.
For instance, you can export to RTF (see Appendix C for more on
alternative file formats) for uploading to a site like Smashwords,
a reasonable alternative if your book is in Smashword’s preferred
simple narrative text style without a TOC, tables or images.

The On Screen Presentation

Each page in a PDF E-book should be clearly readable on screen


without forcing your reader to scroll. On screen readability depends
on the right combination of page size and font.
CHAPTER 8. PUTTING IT ALL TOGETHER 66

Selecting a Page Size

I experimented with a few different page sizes for this book before I
settled on the 5.5 in. X 8.5 in. size. The secret is giving your readers
a balanced page that keeps the information in context.

Keeping the vertical dimension as short as possible means a larger


page image and easier reading. I thought about using 8 1/2 X 11 in
landscape mode to mimic a typical monitor screen, but that means
the page is too wide for comfortable reading (a 60 to 70 character
average text line is an ideal width) and the document would need to
use columns.

The 5.5 X 8.5 page size, together with the small margins, used for
this book gives the reader:

• A singe page that’s large enough to read easily on screen


• An average text line length of 60 to 70 characters
• The option to view two pages on screen without reducing the
page size
• Printouts with 2 pages side by side on a single 8 1/2 X 11 sheet

Font Selection

Computer monitors are low resolution devices compared to printed


output. The typical monitor is 72 or 96 dpi. Printer resolution is
much higher at 300 to 600 dpi. The pixels on a monitor are square.
Printers use round dots.

A font like Latin Modern will print beautifully but be hard to read
on screen. I used the Bera font family for this book. Bera is the type
1 (postscript and PDF font) derived from Bitstream Vera. The font is
beefier and was designed for on screen reading while still giving a
decent printed output.

Experiment a bit and you can see for yourself. It only takes a few
keystrokes to change your fonts.
CHAPTER 8. PUTTING IT ALL TOGETHER 67

Font Size

Bigger is better for on screen fonts. If you use Palladio or Latin


Modern or one of the other type 1 fonts designed for printed output,
use 11 or even 12 point. I settled on 10 point Bera because Bera is
already a larger font. I suggest you give Bera a try. It’s available in
all TEX distributions.

It all comes down to judgment and experimentation. Try different


page sizes and fonts. It’s easy to make changes from the LyX
document settings. Experiment until you find the combination that
looks best for your book.

Help the Reader Navigate

Using links wisely taps the power of digital publishing and gives you
and the reader navigation options not possible with a printed book.

TOC

A well made table of contents is a road map to your book, an outline


that can simplify and reveal the structure of even the most complex
book. Your readers will have an easy time understanding and be-
cause the TOC is linked to the text, navigation is instant – no page
flipping required.

Cross References

LyX leaves word processors in the dust when it comes to cross


referencing. There’s no contest, and LyX makes it easy.

Cross referencing helps you and your readers. When you touch on a
topic that you’ve covered in detail earlier in the book, it’s a simple
CHAPTER 8. PUTTING IT ALL TOGETHER 68

matter to include a linked back reference. You won’t have to repeat


yourself and your reader can double back easily if they choose.

The converse is true as well. When you know you’ll cover a topic
in detail in a later chapter, you can touch on the subject, tell your
reader that you go into detail later, then give them the live link so
they can see for themselves.

Whenever you move a chapter, section, figure, etc. that’s been cross
referenced, the link updates automatically to the new location so
the information is always available for instant reference.

External Links

When you refer to an Internet address (URL) or an email address


in an E-Book, take advantage of the medium to include a live link.
People are used to clicking links while on the Internet. They will
appreciate being able to click a reference from your book and go
right to the URL.

I’ve used hyperlinks throughout this book. When I introduced the


free software in the beginning of the book, I also provided hyper-
linked URLs. You may have noticed that I included the URL to my
blog, The Aware Writer, at the bottom of the title page. I also put
in a link to my email address at the bottom of the copyright page. I
offer these as examples and an invitation to use both to contact me.

Why I Didn’t Include an Index

I could have included an index and would have if the book was des-
tined for printing. An index in a printed book gives the reader a way
to search for and find important terms. A good index compliments
the tree based table of contents with an alternative, keyword based
search tool. An index is useful because it collects and references
the most important terms in the book. But the traditional index is
limited because it’s a static view imposed by the author’s judgment.
CHAPTER 8. PUTTING IT ALL TOGETHER 69

He or she must decide which terms to include and which to exclude.


An index can never be exhaustive nor should it be.

But anyone reading an E-Book has access to a powerful search


engine built into the reader software that allows them to decide,
on the fly, which terms are important to them. Each reader can
exercise their own judgment because they can add their own ad hoc
index to any book – even books where you wouldn’t expect to find an
index. Why limit your readers when the built-in search gives them
what amounts to an exhaustive index suited to their unique needs?

Simple and Consistent

Structure and features don’t necessarily lead to over complication


when they are handled properly. The most important aspect of a long
work like an E-Book is consistency. Use restraint. If you don’t need
graphics or tables, don’t include them. If your book makes more
sense and is better understood with deeply nested and numbered
Parts, Chapters, Sections, Subsections and so on, use them. Maybe
Chapters alone are enough. Simpler is often better.

You may decide that using LyX is overkill. If you are writing a short
narrative piece, especially if the source needs to be .doc or .rtf, why
add an additional layer of complexity when it makes more sense to
use a word processor? Word, Open Office Writer or AbiWord, to
name a few, are all up to the task. They can also export or save as a
PDF file.

Explore and Experiment

Don’t be afraid to play. LyX makes it easy to change the entire


look of your book with a few keystrokes. Use the automatic backup
function. If you don’t like your changes you can easily revert to the
CHAPTER 8. PUTTING IT ALL TOGETHER 70

saved version of your book. If you want to make major changes, use
save as to preserve your original until you’re sure.

The LATEX online community is huge. I’ve discovered all kinds of


tricks using Google search. Visit the LyX Wiki to see what the
programmers are up to. Dig into the LyX help menu. There are
hundreds of pages of manuals if you like exploring for yourself.

This is Just the Beginning

Self-publishing is about to explode. The print publishing world is


feeling the digital heat and the opportunities are there for people
like you to publish your own book as a digital E-Book. Web sites like
LULU, Scribd and Smashwords are eager for your E-Book and they
make it easy for you. Self-publishing really is easier than you might
have imagined. You can do it yourself. It’s not difficult at all.

And creating and publishing your own book won’t cost you a dime.
There’s plenty of quality software available from the Open Source
community and books like this one can help you get started.

A few months ago, I had no idea I’d write this book. After publishing
two newsletters for more than half a year and helping a friend
format and publish her book, I realized that I’ve learned much. I
had to write this book.

I learned so much writing this one that I’m ready for another. One
with a fresh approach to self-publishing. This main message of this
book is “here’s some great free software and here’s how it works.”
Much of the book focused on the power of LyX and LATEX, but there’s
more.

I want to explore self-publishing in greater depth and from the other


end, a problem - solution approach. It will be a new book, not a
rewrite of this one (though I will draw on the material and massage
what I need). I love adventures and I hope you’ll join me.
CHAPTER 8. PUTTING IT ALL TOGETHER 71

Feel free to stop by and visit my blog, The Aware Writer to see what
I’m up to. I’ll be posting progress on the new book from time to
time. If something I’ve written puzzles you, contact me via email at
awarewriter@gmail.com and I’ll answer as best I can.

But if you need extensive help or would rather have someone edit
or format your book for publishing, contact me. We can work out a
very reasonable fee structure for any of my services.
A LyX: Main Menu Highlights

I’ve highlighted the more frequently used LyX menu choices along
with my own advice and comments. The LyX User’s Guide, available
from the help menu has a complete explanation of all available menu
choices in Appendix A, The User Interface.

File

Import LyX gives you quite a few import options here. The easiest
and quickest import is usually from a clean, plain text file.
Sorting the imported file into LyX environments goes quickly. If
you must import a Word file, copy and paste the Word file into a
plain text editor to get rid of any embedded control codes then
recreate the formatting in LyX using the Word file as a guide. I
tried importing Word directly. The text option is cleaner and
faster. You’ll be surprised how quickly you can put the elements
in a text file into the proper LyX environments.
Export Use PDF (pdflatex) to export your finished book directly to
PDF. See Appendix C on page 79 for more info on alternative
file formats.

Edit

The Edit menu gives you undo, redo, typical cut, copy and paste
functions and search and replace. Most of the functions on this

72
APPENDIX A. LyX: MAIN MENU HIGHLIGHTS 73

menu have Ctrl key shortcuts. I use them extensively. You’ll also
find a menu choice for paragraph settings. You can bring up a
context menu and access many of these choices with a right mouse
click.

View

Open or Close all Insets Footnotes, notes, figures are examples of in-
sets. Open insets show the text or graphics. You can close any
inset so only the “marker” shows on screen. Use this option to
open or close all insets in your document.
View Source This option opens a new window at the bottom of the
screen to view the LyX/LATEX source file.
Update or View When you make changes to your document, and you
have an active PDF, update will generate a new PDF file. View
generates a new PDF (or other doc type). I never use the menu
because the tool bar buttons are more convenient.
Split View Will split the main window either vertically or horizontally
so you can work on different areas of your document at the
same time. Use the next option Close Tab Group to return to a
single screen.
Close Tab Group Close a split view.
Fullscreen (F11) Puts LyX in full screen mode. Press F11 again to
exit.
Toolbars Select or hide the different toolbars.

Insert

Special Characters Allow you to insert special characters, an ellipsis


for one example, in your text. Many of these special characters
have keyboard shortcuts.
APPENDIX A. LyX: MAIN MENU HIGHLIGHTS 74

Formatting Insert superscript, subscript, extra vertical or horizontal


space, page breaks and so on.
Notes You can add three different types of notes to your document:

• LyX Notes: Add these notes in a box with bright yellow back-
ground. They won’t appear in the final output. Add reminders
to yourself or exchange notes with others when you collaborate
using LyX.
• Comments: These notes will appear in the LATEX source file as
comments but won’t show in the final output.
• Greyed out: These notes will appear in your final output as
grey text.

You can easily navigate any of these notes from the list window.

Tex Code (aka ERT or Evil Red Text) is a powerful tool but use with
care. “Evil Red Text” allows you to insert LATEX commands
directly in your text. I used it in two locations in this document.
It’s how I changed the page numbers to lower case Roman
numerals for the front matter pages. Here’s how I did it:

• Insert the command \frontmatter in the text after the title


page
• Insert the command \mainmatter after the Introduction

Navigate

Is an alternative method for navigating through your document. I


prefer the Document . Outline window to the left of the main window
for navigation. Either way gives you instant access to Sections,
Bookmarks, Notes, Cross-References and so on.
APPENDIX A. LyX: MAIN MENU HIGHLIGHTS 75

Document

Change Tracking This is an extremely useful feature when you collab-


orate with others on a single document. Once you turn tracking
on, you can merge, accept or reject changes and there’s even
an option to show the changes in the Output file. Please refer
to the User Guide for details of how Change Tracking operates.
LATEX Log This is more for experts who want to see what LATEX is
doing. Each time you generate an output file, a detailed log file
is generated. Use this option to take a peek.

Tools

The Tools menu gives you access to Spellcheck, the Thesaurus,


document statistics, and more.

Help

LyX gives you access to hundreds of pages of help. Click on any of


the available manuals and it will open as a LyX file. You can navigate
from within LyX or generate a PDF file. There’s a lot of information
here. I suggest you read the Introduction first. It’s a short manual
and will give you a nice overview of LyX and the philosophy behind
LyX.

Open the tutorial and try out LyX using the examples before you
dive into your first document. The tutorial is well done and takes
you step-by-step through a few common examples.
B The LATEX Preamble

Access the LATEX Preamble from the Document Settings Dialog. The
LATEX Preamble lets you load special LATEX packages or define LATEX
commands. The LyX users manual cautions that the preamble is for
LATEX experts, that you shouldn’t fool around unless you know what
you’re doing.

I’m certainly not a LATEX expert, but I’m a good researcher, and all
the special LATEX packages have manuals. I searched the Internet,
downloaded and studied the manuals for the packages I thought
would be useful to me. I also looked at the preambles for the LyX
manuals (available from the help menu). Some of the things I tried
didn’t work, but others did. The secret? Research carefully and
keep the preamble as simple as possible.

LATEX is a markup language that tells TEX what to do. This typesetting
engine runs behind the scenes. LyX takes care of nearly everything
so you won’t have to learn LATEX. Sometimes though, you need a
special package or LATEX command and this is why the preamble is
there. When LyX processes the file through LATEX, LyX inserts the
commands from the preamble and they become part of the LATEX
markup. No need to be afraid to use the preamble, just take care.
If you add a line and get an error message, just go back to the
preamble and comment out the line with a leading % symbol.

I’ve tested everything I added to the LATEX Preamble for this book.
The two packages I added and the commands I used all work prop-
erly. Here’s what I did and why. I’ll explain each code segment then
list the entire preamble I used at the end.

76
APPENDIX B. THE LATEX PREAMBLE 77

The microtype package

One of the reasons LATEX has been in use for a quarter century is
because of the sophisticated kerning techniques it uses to produce
professionally typeset documents. The microtype package takes
this kerning up a notch by introducing margin kerning and font
expansion. Margin kerning tweaks the characters at the margins
for more precise optical alignment of the margins. Font expansion
uses a wider or narrower font variant to get more even inter-word
spacing. The effects are subtle but they do make a noticeable
improvement. All it takes to use microtype is this single line of code
in the LATEX Preamble:

• \usepackage{microtype}

The hypcap package

I discovered this gem while digging through the LyX manuals one
day. Hypcap can do more tricks, but I was only interested in “fixing”
the click to a figure. Figure labels are normally anchored to the
caption. When a person clicks on a reference when reading a PDF,
the caption pops to the top of the screen obscuring the figure itself.
This line of code fixes the problem so the figure appears at the top
of the screen instead of the caption:

• \usepackage[figure]{hypcap}

No date on the title page

LyX will put a date on the title page unless you tell it not to. This
line of code simply tells LyX the date is null. Put this in your LATEX
Preamble if you don’t want the date on your title page:

• \date{}

Fancy headings

I give a complete explanation for this one on page 18.


APPENDIX B. THE LATEX PREAMBLE 78

Tweaking the Figure and Table captions


If you use the KOMA-script document classes (highly recommended),
this line of code will put the caption label (Figure, Table, etc. along
with the reference number) in bold text. It’s a nice touch. Just add
this line of code:
• \setkomafont{captionlabel}{\bfseries}

PDF bookmarks
Odds are you won’t need this next one at all. PDF bookmarks don’t
understand the extended character set used for some words. LyX
happens to be one of them. Until I found this last piece of code, I
got strange characters instead of LyX. The code simply tells LATEX to
use the literal word and not the extended characters. It works. This
one drove me nuts and it took me hours of digging to find a solution.
As I said, odds are you won’t run into a situation like this one. But if
you do, this code will come in handy.
• \def\LyX{\texorpdfstring{LyX}{LyX }}

LATEX Preamble contents


\usepackage{microtype}

\usepackage[figure]{hypcap}

\date{}

\rhead{\thepage}
\lhead{\leftmark}
\cfoot{}

\setkomafont{captionlabel}{\bfseries}

% redefine the LyX macro for PDF bookmarks


\def\LyX{\texorpdfstring{LyX}{LyX }}
C Alternative File Formats

Since there is no single ereader format that has emerged as a


standard (it’s like a cat fight out there as of this writing), it’s best to
stick with accepted standards until the dust clears. LyX can export
to these common formats with a single mouse click from the export
menu.

• HTML
• Rich Text Format (RTF)
• Plain text

HTML

HTML (hypertext markup language) is another mature standard.


Introduced in the early 1990s, HTML gave birth to the world wide
web as we know it. HTML is the universal language that all web
browsers depend on to dynamically format the text and images that
make up web pages. HTML has a steep learning curve. Indeed,
specialized software helps programmers make sense of HTML’s
complexity so they can better organize code and create sophisticated
web pages.

LyX will export directly to HTML so you don’t have to concern


yourself with learning HTML. There are a few caveats to keep in
mind if you intend exporting to HTML from LyX.

79
APPENDIX C. ALTERNATIVE FILE FORMATS 80

HTML & Pages

LATEX is a typesetting language and includes sophisticated features


that ensure professional pagination. Any feature that depends on
pages will not export correctly because HTML won’t understand
them.

Floats allow LATEX to position images and tables to minimize or elim-


inate excessive white space when a document is paginated.
Floats make no sense in the HTML environment.
Cross-referenced pages won’t translate to the HTML file because
there are no pages to reference.
Footnotes are all collected at the end of the HTML document.
Table of Contents won’t include page numbers when translated.

Graphics

Will work fine on full pages in HTML but they won’t scale. If a user
reduces the browser window, they will need to use the horizontal
scroll bar to view large graphics. Smaller graphics are fine and
work best if they are flush left. Images are saved in separate files,
not the HTML file. If your book includes graphics, you are much
better off using PDF instead of HTML.

Tables

Will scale, but large tables that work well on a defined page may
not work as expected when translated to HTML. Again, if you use
tables in your document, stick with PDF.

LyX only features

LyX doesn’t translate your document to HTML directly, it calls a


LATEX translator. LyX includes features that are unique to LyX and
they won’t translate at all. For example, The Labeling environment
is a special LyX feature that HTML doesn’t understand and it’s ugly.
Boxes don’t translate either, they simply disappear.
APPENDIX C. ALTERNATIVE FILE FORMATS 81

HTML is not an acceptable E-Book format

The major self-publishing sites like LULU.com and Scribd don’t


accept the HTML format. Is this this kiss of death? Although HTML
isn’t an acceptable E-Book format, it’s an important intermediate
step.

HTML Advantage

The option to export to HTML is insurance. ePub may very well


emerge as the dominant ereader format in the future and ePUB has
XHTML at it’s heart. XHTML is simply a reformulation of HTML to
conform to xml standards and well formed HTML files are easy to
convert.

Rich Text Format (RTF)

Microsoft developed the rich text format as a way to exchange


formatted documents across different platforms way back in the
1980s. It’s mature and virtually all word processing software can
read and write RTF files. Unlike most word processing files, RTF
files are ASCII text with embedded mark up.

Like HTML, rich text format is an intermediate file format for E-Book
creation. At least one self publishing web site, Smashwords.com,
will only accept MS Word or RTF files as source files. They use what
they affectionately call their “meatgrinder technology” to crunch
the Word or RTF source files and spit out multiple formats.

Plain Text

Any self respecting editor gives you the option to save your file as
plain text. It’s the ultimate insurance against disaster. Your precious
content, when saved as plain text can be read by any editor on any
APPENDIX C. ALTERNATIVE FILE FORMATS 82

operating system. If the worst happens and you lose your formatted
file, you never lose your content.
D How to Include Attachments

Run pdftk from the command line.

attach_files <attachment filenames | PROMPT> [to_page <page


number | PROMPT>] Packs arbitrary files into a PDF using
PDF’s file attachment features. More than one attachment
may be listed after attach_files. Attachments are added at the
document level unless the optional to_page option is given, in
which case the files are attached to the given page number (the
first page is 1, the final page is end). For example:

pdftk in.pdf attach_files table1.html table2.html to_page 6 out-


put out.pdf

The example above attaches two files to a specific page in


the PDF. Using the same file names to attach to the document
(at the end):

pdftk in.pdf attach_files table1.html output out.pdf where:

pdftk is the program you are calling


in.pdf example original PDF file (substitute the name of your
source file here)
attach_files is the command that tells pdftk to attach files
table1.html is the example file to be attached (substitute your
file name here)
output is the command that tells pdftk the next name will be
the new file with attachment
out.pdf example final file name (substitute your file name here)

83
APPENDIX D. HOW TO INCLUDE ATTACHMENTS 84

Running programs from the command line is a lot easier than it


looks. Try it out on a sample file first to get a better understanding
of the operation.

The file attached to this book is watermark.scm. It’s a Gimp script


that will put a watermark on a photo or graphic. Simply copy the file
to your Gimp script directory (look in Gimp Preferences . Folders .
Scripts for the location). After you install the script, select Xtns .
Script FU . Refresh Scripts to activate your new script.
Bibliography

[1] Chris Anderson. The Long Tail : Why the Future of Business is
Selling Less of More. New York : Hyperion, 2006. 6
[2] Margaret Shertzer. The Elements of Grammar. New York :
Macmillan, 1986. 8
[3] Sol Stein. Stein on Writing. New York : St. Martin’s Griffin,
1995. 5

85

Você também pode gostar