Special Characters

Section 11.12 of the The Chicago Manual of Style’s sixteenth edition recommends including a list of special characters at the end of any manuscript (a special character generally being anything not found on a standard keyboard). Because I’m lazy I want something to do the work for me so I don’t have to track what characters I’m using through revisions. Let’s make LaTeX track the special characters we use.

Since the glossaries package supports multiple glossaries we can use a special one just to track our special characters. Update the premable with something like this:

\newglossary[spg]{special}{sps}{spo}{Special Characters}

Now we can add any special characters specifically to this glossary with a few extra fields filled out:

\newglossaryentry{e-acute}{
  name = \'{e},
  description = {e with acute [U+00E9]},
  type = special,
  sort = eacute
}

Notice the description and type fields? These provide information about the symbol (in this case, é) including it’s Unicode representation and they tell LaTeX to put it in the new glossary we created in the last step. These fields are critical to get the behavior we want so no skipping steps.

Now we can start putting our \gls{e-acute} tags wherever we want but that’s pretty hacky. Instead let’s add another glossary entry that does the work for us:

\newglossaryentry{cafe}{
  name = {caf\gls{e-acute}},
  description = { }
}

Now we can write like normal and wherever we put \gls{cafe} we get a nicely formatted “café.” The last step is to actually print the special characters we’re using at the end of our document:

\printglossary[type=special]
Special character listing

Not only can we avoid manually keeping track of what characters we use while editing, we even include page numbers where our special characters appear.

Naming Characters (and Places, Groups, Gods…)

I’m awful with names. Actually that undersells how bad I am. I’m the kind of person who likes things to be precise and correct from the beginning (engineering hat) so I don’t even like having placeholders and calling my characters Bob, Janet, and Tony. I’ve tried, really, but I keep fidgeting and will spend hours trying to come up with the perfect name. Plus even if I somehow move on find/replace can only do so much. If I screw up and talk about how Bbo and Tony are trying to one-up each other to take Janet on a date we all know what’s going to happen.

The solution: placeholders. Yeah, even though I hate them they’re still the best option. Let’s look at a practical example.

\newglossaryentry{first-guy}{
  name = {Bob},
  description = { }
}
\newglossaryentry{second-guy}{
  name = {Tony},
  description = { }
}
\newglossaryentry{girl}{
  name = {Janet},
  description = { }
}
\gls{first-guy} and \gls{second-guy} both have a crush
on \gls{girl}.  I'd tell you who gets her in the end but
 I haven't actually thought that far ahead.

That’s from a stupid LaTeX file I just wrote that spits out the following: “Bob and Tony both have a crush on Janet. I’d tell you who gets her in the end but I haven’t actually thought that far ahead.” Notice how their names only appear in one place each, where I define the glossary entries? This means I can come in later, change Bob to Brad, and after I process the file again I end up with: “Brad and Tony both have a crush on Janet. I’d tell you who gets her in the end but I haven’t actually thought that far ahead.”

Now I can pick names that are good enough (mostly ones I blatantly pilfer from video games) and I don’t have to worry about find/replace letting me down when I go through later with better names. It’s already helped me once when I realized there were two businesses with “Irving” in their name (courtesy of Lloyd Irving from Tales of Symphonia) so all I had to do was update one entry in my glossary files and my name duplication issue went away.