Looking for writing-related posts? Check out my new writing blog, www.larrykollar.com!

Tuesday, February 21, 2017 1 comment

Tech Tuesday: Roll Your Own Writing System, Part 2: Markdown in Scrivener

Last week, I showed you a brief introduction to Markdown. I only hinted at why you might want to use Markdown instead of comfortable old bold/italic (and other decorations). I’ll get detailed next week, but here’s a hint: you can save yourself an entire evening of work getting your eBook prepared for publication.

This week, though, we’re going to look at how Scrivener and Markdown work together. TL;DR: Very well, actually.

Scrivener supports a Markdown extension called MultiMarkdown. You don’t have to worry about the extensions, unless you’re writing more technical fiction with tables and the like. For fiction, what I showed you last week should cover all but decorative stuff.

Make a copy of your WIP. Got it open? Original one is closed? Okay, let’s get started.

In Scrivener, click the Scrivenings icon in the toolbar, then click the Draft or Manuscript icon in your Binder (whichever one your story is in). You should now see your entire story laid out in Scrivener.

Click anywhere in the story text, then go to Format menu→Convert→Bold and Italics to MultiMarkdown Syntax. If you use anything other than bold/italic in your writing—like typewriter font for text messages, or blockquotes for letters—you’ll have to go through your manuscript and mark those yourself. This is that other 10% I mentioned last week.

Stylin’

Scrivener has formatting presets, since it only remembers the formatting and not the preset name after you apply it. Not as good as styles, but they work for our purposes.

Markdown uses backticks (a/k/a accent grave) to define typewriter font: `this is a text message`. You can either insert your backticks by hand, or let Scrivener insert them when you publish. I have a preset called Typewriter for this, but we can define a new preset or redefine an existing one. Here’s how it works: any string of text marked “Preserve Formatting” (Format menu→Formatting→Preserve Formatting) gets the backtick treatment at Compile time.

So go find a text message or other small string of typewriter text in your manuscript, and select it. Apply Preserve Formatting as described above, and the text gets highlighted in cyan or light blue.

Now, go Format menu→Formatting and:

  • for a new preset: New Preset from Selection
  • to redefine a preset: Redefine Preset from Selection→(preset name)

For a new preset, enter the name in the dialog box. In both cases, select Save Character Attributes in the dropdown to create a text (as opposed to a paragraph) preset. Now, any time you mark a selection of text as Typewriter (or TextMsg, or whatever you called it), you’ll see it highlighted and in your designated typewriter font.

Looks good, gets converted to backticks. What’s not to like?

To make a block quote, put a > at the beginning of each paragraph in the block, and in any blank lines in between. Add a blank line to the end of the blockquote so the next paragraph doesn’t get picked up as well. Scrivener assumes that preserved-format paragraphs are code blocks, and displayed as-is, so you can’t use its Block Quote preset this way unless you turn off Preserve Formatting. In either case, you’ll have to add the > character.

Okay, ship it!

Not quite. There are still a few things you need to set up before you can get to the Efficiency Nirvana that Scrivener and MultiMarkdown offer.

To see where we need to go, let’s have a look at the output. In Scrivener, click Compile, then go to the Compile For: dropdown at the bottom of the compile window and select MultiMarkdown. You could also try MultiMarkdown→Web Page. Don’t forget to check which directory it’s going in, so you’ll be able to find it. Open it an a text editor (Text Edit, Notepad, whatever you like).

You should now see a few lines at the top with the story and author name, followed by the rest of the story. If you don’t use blank lines between paragraphs, your paragraphs run together in one big blob. There may not be any chapter titles, and likely no section breaks beyond blank lines. So let’s start fixing things. You’ll only have to do these once, or (at worst) once for each project.

Close the file, go back to Compile, and click Separators in the list. For Text Separator, click Custom and then enter the following:

<p class="sectionbrk">&bull; &bull; &bull;</p>

This tells Scrivener to put three bullets between each scene. (Anything Markdown or MultiMarkdown can’t do directly, you can do with HTML.) You’ll want to create or edit a CSS file to format the sectionbrk class the way you want (most people want it centered with a little space above and below). We’ll go over how to automatically link the CSS file to your HTML in a later post.

Set the other parts to Single Return. That’s all you have to do for Separators. In the other options:

  • Formatting: Check Title for Level 1 (and lower levels, if needed) folders.
  • Transformations: Check:
    • Straighten Quotes
    • Convert em-dashes
    • Convert ellipses
    • Convert multiple spaces
    • Convert to plain text: Paragraph Spacing
  • Replacements:
    • Replace (Option-Return twice); With (Option-Return)<p class="sectionbrk">&nbsp;</p>(Option-Return twice)

The Transformations section sounds a little scary, but MultiMarkdown re-converts those text entries to their nice typographical equivalents. I suggest you do it this way for more consistent results. The Replacements entry just inserts a blank section break that won’t get deleted during a conversion. You could just insert a non-breaking space, but (again) a later blog post will show you how you can use this to eliminate formatting issues.

Converting paragraph spacing to plain text replaces a paragraph break with two paragraphs, inserting a blank line between paragraphs as Markdown expects. It works if your Body paragraph format puts space at the beginning or end of the paragraph. If you use indents instead, try “Paragraph Spacing and Indents” and hope the indents are deep enough for Scrivener to catch.

If that doesn’t work, add two more entries to Replacements:

  • Replace (Option-Return); With (Option-Return twice)
  • Replace (Option-Return four times); With (Option-Return twice)

The two replacements are needed because of a bug in Scrivener. It converts one return to four instead of two, but the second time through fixes it.

Now hit Compile, then open the generated file in a text editor. You should see a plain text file, with a blank line between each paragraph and Markdown syntax for various highlighting. You can go back into Scrivener and try MultiMarkdown→Web Page to see what that looks like, too.

Now What?

Now that you can export a clean MultiMarkdown file from Scrivener, you can work with it in any text editor. Sometimes, just looking at the same text in a different way is enough to get you moving on a WIP and get it done. If you have an iPad, you can still edit your Markdown-ified project using Scrivener on iOS, or you can use an iOS Markdown editor like Byword to edit your Markdown file (and import it back into your Scrivener project later).

But that’s only scratching the surface. Next week, we’ll start looking at ways to prep your MultiMarkdown file for beta or final publishing.

Comments? Questions? Floor’s open!

Monday, February 20, 2017 1 comment

In-Tents Weekend #2

What’s more fun than a campout?

Camping out near the beach, of course!

The second of two camping trips offered to Mason’s Cub Scout pack this month was on Tybee Island. I’ve always wanted to go there ever since I heard about it back before I got married; as for Mason, he was entranced by the idea of camping out completely surrounded by water.


Backpack on wheels. There’s more room behind
the seats than you might think.
Having made notes about what we needed most on the last trip, I was able to do more with even less this time. It helped that I found my old backpacking stove, which is far more compact than what everyone else had, and a few other things. Seeing as Tybee is a nearly 6-hour drive from FAR Manor, I took Friday off work for the drive down (Mason’s school was out), and figured we had to leave by 11am to have enough light to set up camp. We got moving at 11:05, which goes to show that the fewer people you have involved in a trip, the less late you’ll be.

Last time I had gone to Savannah was when Daughter Dearest was in high school, going to either All-State Choir or GMEA. One thing I’d forgotten from those days: I’m sure Cat Stevens got the idea for his song Miles from Nowhere while traveling on I–16. What a boring drive that is. Fortunately, I’d brought a couple of frapps along, and I consumed them both. Mason used one of the empties when he went from “don’t need to go” to “freaking out” in 10 minutes. I swear, that kid’s bladder is the size of a walnut.

Warmth
But we got to the campsite in good order, and got the tent set up before it got dark. Some of the other families came down on Thursday, and did set up in the dark. Mason immediately took to haring around with the other scouts while the adults got supper together and went over some of the things planned for the weekend. I also kept a close eye on the weather forecast; there had been a 30% chance of rain for Saturday predicted earlier in the week, which dropped to 20% then came back up to 30%. Mason went full-tilt until about 10pm, at which point I told him to curl up in the sleeping bag with the iPad for an hour. I cut him off at 11… he said, “I’m not gonna go to sleep,” and was snoring five minutes later.

Now let me tell you about the campsite. It’s a pretty big RV park, and was far busier than I’d expected for mid-February. The tent area abuts the local cop shop—and the rear entrance is actually inside the campsite. That meant we were treated to diesel motors and backup beepers at 3am, as they brought in an impounded car, and plenty of white noise from the facility’s HVAC units. At least it wasn’t as cold as the Scoutland trip—in fact, the coldest it got was about the same as the warmest at Scoutland. On the other hand, Scoutland didn’t have a problem with bugs. As it turns out, the gnat line has crept up past Savannah, and I’ve added “bug spray” to our must-haves for future trips.

Concentrated joe…
Next morning, I put the backpacking stove on an unused grill, and started making espresso. The other guys were impressed with both the stove and the maker, both of which I bought around 1983 or so. So I played camp barista and helped everyone fortify themselves for the day ahead. Amazing, how a few shots of black espresso go down soooo good when you’re camping out.


Barefoot on the beach. Even if it’s a bit cool.
Because the next event was the whole point of island camping… the beach! If you’ve never been to Tybee, there’s North Beach, pretty highly commercialized and near the lighthouse. But there’s a second beach area that’s a lot quieter, close to the river mouth. The water was about as cold as I expected, which meant I didn’t bring Mason a swimsuit. But that didn’t stop him from kicking off his shoes and plunging in with the other boys anyway. eye roll I figured I had another change of clothes for him, so no biggie. WRONG! I could have sworn I packed some extra pants, but I didn’t. I had an extra shirt, that was it. It required a trip to a Dollar General to find him another pair of pants that only cost $6 and he’ll wear some more anyway. But walking back was pretty miserable for him.

Sleeping was a little tough this trip. Not because it was cold, but Mason was determined to hog the entire air mattress, and I found myself on the verge of falling off several times. No matter what time we went to bed, he woke up at his usual 7am—pretty much before anyone else cared to drag themselves into the world of the living.

So “here comes the rain,” and we all did our personal anti-rain dances—tying down rain flies, moving air mattresses into the middle of the tents, stashing stuff in the tents or cars. I think my own dance steps may have put the final knife in the rain: I got the ponchos and umbrella out of the car, within easy reach, and put the car cover on. 15 minutes later, we had six drops of rain and the sun came out.

Tybee Light in the background
We capped off the weekend with a walk to North Beach on Sunday morning. Mason was mad because he couldn’t jump into the ocean again, but I let him pull up his pant legs and wade. He was okay with that, because the water temperature was (as he put it) “ICE BUCKET CHALLENGE!!!”

Finally, we started back to the manor. Up Boredom Boulevard (a/k/a I–16), more frapps consumed, one more Mason bladder-panic, and returned by six. I got Mason into the bath right away, but I didn’t get my shower until around nine (what I want or need is automatically less important than… well, anything). The tent got a heavy dew fall, and I needed to put it up to air out, and that didn’t happen either. Oh well, I took care of that tonight. The Miata isn’t happy about the garage being occupied, but we’ll all deal. Tomorrow, I’ll pack it up and we’ll be all set for next time.

Speaking of which, I think next time I’ll try using one sleeping bag as a pad on the air mattress, and another as a blanket. And, as Mason pointed out, we need to add pillows to the packing list.

Tuesday, February 14, 2017 No comments

Tech Tuesday: Roll Your Own Writing System, Part 1: Markdown

I’ve said this before, but for people who want to make a living (or even beer money) writing fiction, the best writing advice out there is still Kristen Kathryn Rusch’s: treat it like a business. Simple enough, but the ramifications are as wide as the world of commerce.
  • Watch your expenses, but don’t hesitate to spend where it’s going to improve your product.
  • Plan time for editing and marketing as well as writing (I haven’t done too well in that regard over the last year).
  • Set a budget, and track your expenses (and income) so you know if you’re meeting it.
  • Analyze your processes, and look for better ways to do things.
For someone like me, the latter can be dangerous. It’s really easy to go down a rathole, constantly tinkering with stuff instead of actually accomplishing anything. That goes double when I often have to write one-handed, with a baby in my lap who is trying to grab the keyboard or anything else within reach.

Still, I think I might have stumbled across something.
  • What if there was a way to write stories, using any computer (or tablet), anywhere you are?
  • What if you could preview your writing using a web browser?
  • What if you could output your writing in squeaky-clean HTML for producing EPUBs?
  • What if you could easily copy your entire oeuvre to a USB drive for backup or to continue writing when you’re offline?
  • And finally, what if you could play with different versions of your story to figure what what works best?
In other words, I think I might have found something better than Scrivener. That’s saying a lot; I’ve been using Scrivener for about five years now, and it’s close to ideal for the way I work. The fun part is, it’s possible to keep using Scrivener as long as you want, until you’re ready to let go.

So what is this miracle? Read on…

About Markdown

Markdown was created by John Gruber to make it easier to write blog posts. It has been extended every which way to work with more technical documents, but the vanilla version is well-suited for writing fiction as well as blog posts.

If you’ve ever decorated a text-only email, you already know how to use most of Markdown. Here’s an example that easily covers 90% of what you do in fiction writing:

# The Swamp Road

Night was falling,
yet Joe doggedly marched up the swamp road.
Time was pressing,
after all.

In the flickering light of his torch,
Joe saw two signs:

**SHORTCUT LEFT**

**Do NOT take the shortcut!**

He pondered the advice for only a second.
*Bah*, he thought,
*I have to get home*.

Taking the left fork,
Joe soon found himself sinking in the bog.

Let’s see how this looks when formatted:

The Swamp Road

Night was falling, yet Joe doggedly marched up the swamp road. Time was pressing, after all.
In the flickering light of his torch, Joe saw two signs:
SHORTCUT LEFT
Do NOT take the shortcut!
He pondered the advice for only a second. Bah, he thought, I have to get home.
Taking the left fork, Joe soon found himself sinking in the bog.
It’s pretty easy to see how this translates: blank lines start a new paragraph. Use asterisks to highlight, *for italic* and **for bold**. The number of pound (or hash) characters set the heading level. For example, # Heading 1, ## Heading 2, and so on.

In the example above, I broke lines inside each paragraph so each line is a phrase. That’s not necessary; you can go long and run your paragraphs together, like you would in Scrivener or a word processor. Either way, you’ll get properly-formatted paragraphs.

But I LIKE Scrivener!

Hey, no problem. Scrivener has built-in Markdown support, and can use it to produce cleaner output for publishing than its direct word processor or eBook output. We’ll have a look at how to set things up, and a couple of things to look out for, next week.


Thoughts? Questions? Floor’s open!

Thursday, February 09, 2017 No comments

Tech Tuesday (on Thursday): Tines 1.11

I didn't get this posted Tuesday. Oh well.

The two biggest components in this release are compatibility enhancements:

  • Tines now compiles and runs on Cygwin, something I've wanted for a while. That involved changing escdelay from a variable to a CLI command. The change is backward-compatible; there’s no difference in how it works in .tinesrc and scripts.
  • Tines now preserves and (where it makes sense) uses the metadata in the OPML <head>. You can access and change metadata through text variables, and Tines uses reasonable defaults when necessary.

With 1.11.0, Tines is essentially complete. The Creeping Feature Creature will get hungry some day, no doubt, but for now I’m going to focus on making packages available for people who don’t want to compile the app themselves, making the code more robust, and squashing any bugs that turn up. I might tinker with alternative RC files to focus Tines on special purpose uses as well.

Monday, February 06, 2017 2 comments

In-Tents Weekend

Mason is in Cub Scouts (Tiger) now, and there are a zillion activities happening all the time. We went on his first camping trip over the weekend, over at Scoutland (a Scout Camp on Lake Lanier, near Gainesville).

So I started digging around, looking for all my old camping gear. The Boy had destroyed the big cabin tent, back in his Drunk and Doofus days, and I couldn’t locate anything but my old sleeping bag and my backpacking espresso maker (don’t judge… we’re talking dozens of pre-teen boys running around, wired on s’mores and trail mix, you gotta keep up somehow). Mason didn’t have a bag in any case, so the wife went out and got him a sleeping bag and us a tent.

I found The Boy’s old backpack from his scouting days, and there were a few useful items in it (most useful of all, a drawstring bag for clothes). So we gathered up food and other essentials, and loaded up the Miata—a backpack on wheels—and arrived at the camp as dusk was coming. Scoutland campsites have wooden platforms with metal pipe framework on them for a cabin-style tent, and several people pitched their tents on them. Our “four-person” tent1 was just slightly too large to fit comfortably on the platform, so we cleared the ground of pinecones and pitched it there. I unrolled our foam pads on the tent floor, put the bags atop them, and shoved our gear to the side. There was just enough room. I hung the battery-powered lantern on the loop at the apex of the tent, and that gave us plenty of light to arrange things as it got dark. Several people were impressed by how much stuff we pulled out of the Miata, by the way. Having gone backpacking a few times turns out to be a useful skill. ;-) For some reason, the parents’ signup sheet asked for age, and I’m pretty sure I was the oldest person there. Growing older, but not up.

The forecast low was 27°F, but that wasn’t a big deal. In fact, a couple of Girl Scouts were sleeping in hammocks. (Don’t mess with Girl Scouts!) As for us, Mason’s bag was rated for those temps, and my bag is an Army surplus down mummy bag, probably good to -40° in its prime. But I learned something important that night: when I was 28, even 38, I could toss my bag onto a foam pad and sleep okay. At 58… not so much. My hip drove into the ground, and now I find the mummy bag too confining, so I guess I need to retire it. The wife suggested (after the fact) I swap bags with Mason, which isn't a bad idea. He woke up once from the cold, and was fine after I told him to just burrow down into his bag & pull it over his head. Around 2 a.m., I fished a pool float out of the trunk of the car, blew it up (which warmed me up as well), and slept well until it deflated.

So Saturday morning was cold as you-know-what. Water buckets were iced over, cars covered in frost, etc. As Mason went to sleep at his usual bedtime, he woke up at his usual 7 a.m. The camp was dead quiet, except for him talking to me… but the Girl Scout leader (who was coordinating the campout for the county troops/packs) heard the noise and got a fire going. Soon, we had bacon and eggs going, and the kids filched marshmallows. Then the boys went running all over the large campsite, leaving the adults to wander around or sit by the fire and try to get warm.

Turns out a couple of the dads in Mason’s pack are very much into these clever things called “Hot Hands.” When you expose them to air and shake them, they produce an exothermic chemical reaction. I brought gloves that were more than adequate for 27°F, and my old ski mittens that would have sufficed for much colder temps, but my feet were cold… and I hate for my feet to be cold these days. So they tossed me a packet of “Toe Warmers,” which work the same way as the Hot Hands do. You take them out of the pack, stick them to your socks, and enjoy your day. At least I did. I also zipped into Gainesville to get an air mattress. For their part, they thought my espresso maker was awesome.

Saturday night was cold, but not as cold as before. That was fortunate, because it started raining around 2 a.m. The hammock’ers, not having thought to put up rain flies, bailed for a tent. Indeed, I think I might have been the only person in the camp who expected rain—as a motorcyclist, I know when you’re outdoors, 30% chance of rain means a near-certainty. The other pack dads left everything out, and I mean everything. So when Mason woke up at 7:15 a.m., declaring “I slept great!” I decided to just load up and go home. I always keep a towel in the Miata (highly recommended for any convertible), so I wiped down the tent and the cooler I left outside, then loaded the little car while Mason had one last run-around with the kids who hadn’t gone home Saturday afternoon. Overall, he had a blast and didn’t really want to go home.

Mason ended up with three patches for the weekend: Family Camping, Leave No Trace (for helping pick up trash), and Polar Bear (for camping in below-freezing weather). The latter is on the way, but he brought the other two home…

I left a blank spot for the Polar Bear patch

We’ll sew them onto his backpack.



1Camping equipment manufacturers love to play fast and loose with capacity. A tent measuring 6 feet by 9 feet can only be considered “four-person” if a) the people in question are children; b) they have no gear. In reality, there is barely enough room for two people and the gear you don’t want to leave outside.

LinkWithin

Related Posts Plugin for WordPress, Blogger...