This is a summary of how to create a PDF file that has internal links. Perfect if, say, you’re creating a solitaire adventure for Tunnels & Trolls (think “Choose Your Own Adventure” kind of thing).
UPDATE: I decided to really blow this thing out and add a whole lot more detail. It’s so long it now has its own web page: http://www.ardenstoneadventures.com/writing/how_to_write_a_solo_adventure. I recommend you go there to read while I debate removing the below instructions.
These steps are how to write your document in Microsoft Word and then export into a slick PDF. I might eventually get around to moving into ebook formats (like EPUB & MOBI), but that’s a lot more involved. The really short version of this is: use styles, specifically headings. Everything else flows from there.
I created a silly example from the first part of Edgar Rice Burrough’s A Princess of Mars. You’ll see images from that throughout this document.
- Create your initial adventure. In this case we’re going to call each section a paragraph, even though a section could be multiple paragraphs, include a picture, etc. Typically you’re going to have something like:
You see a scary monster. If you run away, go to Paragraph 4. If you stay and fight it, go to Paragraph 5.
However, when you first start writing don’t say “Paragraph X” but instead put zzz1, zzz2, zzz3, etc. You want a string of characters that ends in a number so later you can say, “search and replace all of zzz4 with text ‘Paragraph 4′”. If you just write “1”, “2”, “3” then your search and replace is going to go nuts and replace too much. So, for now, write:
You see a scary monster. If you run away, go to zzz4. If you stay and fight it, go to zzz5.
- Keep writing this adventure. Don’t worry that the paragraphs are in chronological order, we’ll scramble them later. But you do want to start using headings. Give each label at the front of a paragraph (zzz2, etc.) the same Style and make sure it’s a Heading . I typically use Heading 5 since you want to save some higher level headings for titles, sections, etc. Don’t worry if you don’t like the look that this style causes, we can fix it later.
Screenshot of the heading style:
Note that you’re only putting Heading 5 on the initial paragraph label. Do not apply it to the choices at the end of a paragraph (if you choose X go do Y). We’ll get those later.
- Headings are hierarchical. So Heading 1 should be your biggest and most important (typically the title of the document). Heading 2 is some kind of sub-heading, I use it for sections (“Introduction”, “Appendixes”, etc.). You just select the text you want to use as a heading and then select the appropriate heading from Styles box. Note that it will only show Heading 1 and Heading 2 by default. The easiest way around this is to select the text you want to be Heading 5 for example, and click “Heading 2″. This exposes the next level down (“Heading 3″). Repeat until you get to the level you want. Once you have some text in a lower Heading level that level will stay in your styles box.
- Add in apendixes, etc. You probably want to play test at this step as much as possible; it’s a lot easier to edit and fix things before you jumble it all up.
- Here is my example document with headings and indexes, but not yet scrambled: Princess of Mars – early example.
- Let’s jumble! You’re going to want to create a table with your original numbers on the left, and the new numbers on the right. Often the first paragraph stays as #1, but the rest should be randomly distributed. If you have enough, you want to try and keep similar numbers away from each other, preferably far enough to go into a new page. Because your original numbers are somewhat chronological, you can easily spot if the right-hand column ends up with #3 near #5, for example. Here’s my grid for the sample adventure:
- Now you want to run a whole bunch of “Search and Replace All” functions in Word to replace, for example, zzz2 with “Paragraph 12″ (using my chart from above). This is where you want to decide what to call your sections. A lot of people just use the number (“12″), I added the word Paragraph in front for this example. It will typically say that it replaced 2 occurrences; the label and the paragraph that pointed to that label. However, if you have some paragraphs that lots of other paragraphs point to, it should replace lots of instances. Keep an eye on what it tells if, if it says “0 found” then you have a typo. Probably that same if it says “1 replaced”. Screenshot of a search and replace:
- Now cut an paste the paragraphs to line them back up into their new order. Remember that, in Word, triple-clicking will select the entire paragraph. When you’re done you should be back to having Paragraph 1, then Paragraph 2, then Paragraph 3, etc.
- It’s time to insert the references. This is where the heading magic starts to come into play. Get to the “References” tab in Word. Now highlight the first “go to” link (it probably says something like “go to Paragraph 12″ so highlight the ‘Paragraph 12′ part of that phrase – not the Paragraph 12 heading label!) and click “Cross-reference”. This will bring up a dialog box, make sure the “Reference Type” is “Heading”, choose the appropriate Heading (“Paragraph 12″) and click “Insert”. You’ve now created a cross-reference! This is just like a link on a web site. If you ever have to change some of your paragraph names (perhaps you want it to say, “Paragraph 12A”) you’ll need to find all the references, right-click on them and say “update reference”. This is a pain, which is why you’re doing these steps after writing, proofing, editing, etc. Double clicking selects an entire word, which is handy here. Screenshot of adding a content-reference:
- You should pause here, close the cross-reference dialog box and follow the link. If you hover over it, you’ll see that the whole link (“Paragraph 12″) highlights in gray. Hold the control key and click to follow the link; the screen should move down (or up) to so that the label for the correct paragraph is at the top of the screen. See, just like a link! This is what’s going to make your find PDF easy to navigate.
- While you’re add it, you might as well add a Table of Contents. This probably isn’t useful unless you’re making a really long adventure, and even then it’s somewhat questionable. Still, I tend to add it although often at the very end. If someone is using a mobile reader or e-reader this is the kind of thing that can be helpful. Also, because you’ve used headings, the work is already done! So figure out where you want it, put your cursor there, click the “References” tab and then Table of Contents -> Insert Table of Contents… You may want to play with your options here. For example, I often find that I don’t really want Heading 1 since that’s just the title of my document. But I do want more than the 3 levels it defaults in, so I set Heading 2 to be TOC level 1, Heading 3 to be TOC 2, etc. You can see from the screenshot below that I still get the Heading 1 displayed (it just doesn’t indent everything below it), so I just highlight and delete that row from the Table of Contents.
Screenshot of starting the process:
Screenshot of editing the Options button:
Screenshot of completed Table of Contents:
- We’re almost there! Now, let’s look at the final power of using Styles: easy ability to change the look and feel of your document. If you want all your initial Paragraph 5 headings to be bold and underlined, you can do that. On the “Home” tab, right-click the style you want (“Heading 5″) and select “Modify…”. From here you can change anything about the Style and it will change every instance of the Style on your page. Screenshot:
- One more very optional style hint: you might want to edit your headers and footers. Typically I like to only touch the headers and footers on every page but the first, which you can do by editing them on any page that’s not the first page. Just double click into the top or bottom of a page and you’ll be editing the header or footer. In my example I’ve changed the header to include the title of the solo adventure, so it will show up at the top of every page. When you’re editing a header or footer, check the “Different First Page” box up top and the first page won’t get updated. You can also insert page numbers, which I often do in the footer and a variety of other symbols (you can do things like “Page 2 of 16″, for example).
- Can we make a PDF already? Yes we can! Click the Office Button or whatever that thing is in the upper-left, choose “Save As” and then “PDF or XPS”. I “Optimize for” Standard and click “Options” and do “Create bookmarks using:” “Headings”. Clicking Publish will create a copy of the PDF in the same folder as you saved the document, by default. You’re done – you have your very own super snazzy, internally linked PDF! Here’s the final product I put together: Princess of Mars – Solitaire (PDF)
Here’s my Word file after all the editing has been done: Princess of Mars Solitaire