Special Characters

Sec­tion 11.12 of the The Chica­go Man­u­al of Style’s six­teenth edi­tion rec­om­mends includ­ing a list of spe­cial char­ac­ters at the end of any man­u­script (a spe­cial char­ac­ter gen­er­al­ly being any­thing not found on a stan­dard key­board). Because I’m lazy I want some­thing to do the work for me so I don’t have to track what char­ac­ters I’m using through revi­sions. Let’s make LaTeX track the spe­cial char­ac­ters we use.

Since the glos­saries pack­age sup­ports mul­ti­ple glos­saries we can use a spe­cial one just to track our spe­cial char­ac­ters. Update the pre­mable with some­thing like this:

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

Now we can add any spe­cial char­ac­ters specif­i­cal­ly to this glos­sary with a few extra fields filled out:

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

Notice the descrip­tion and type fields? These pro­vide infor­ma­tion about the sym­bol (in this case, é) includ­ing it’s Uni­code rep­re­sen­ta­tion and they tell LaTeX to put it in the new glos­sary we cre­at­ed in the last step. These fields are crit­i­cal to get the behav­ior we want so no skip­ping steps.

Now we can start putting our \gls{e-acute} tags wher­ev­er we want but that’s pret­ty hacky. Instead let’s add anoth­er glos­sary entry that does the work for us:

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

Now we can write like nor­mal and wher­ev­er we put \gls{cafe} we get a nice­ly for­mat­ted “café.” The last step is to actu­al­ly print the spe­cial char­ac­ters we’re using at the end of our doc­u­ment:

Spe­cial char­ac­ter list­ing

Not only can we avoid man­u­al­ly keep­ing track of what char­ac­ters we use while edit­ing, we even include page num­bers where our spe­cial char­ac­ters appear.

Naming Characters (and Places, Groups, Gods…)

I’m awful with names. Actu­al­ly that under­sells how bad I am. I’m the kind of per­son who likes things to be pre­cise and cor­rect from the begin­ning (engi­neer­ing hat) so I don’t even like hav­ing place­hold­ers and call­ing my char­ac­ters Bob, Janet, and Tony. I’ve tried, real­ly, but I keep fid­get­ing and will spend hours try­ing to come up with the per­fect name. Plus even if I some­how move on find/replace can only do so much. If I screw up and talk about how Bbo and Tony are try­ing to one-up each oth­er to take Janet on a date we all know what’s going to hap­pen.

The solu­tion: place­hold­ers. Yeah, even though I hate them they’re still the best option. Let’s look at a prac­ti­cal exam­ple.

  name = {Bob},
  description = { }
  name = {Tony},
  description = { }
  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 stu­pid LaTeX file I just wrote that spits out the fol­low­ing: “Bob and Tony both have a crush on Janet. I’d tell you who gets her in the end but I haven’t actu­al­ly thought that far ahead.” Notice how their names only appear in one place each, where I define the glos­sary entries? This means I can come in lat­er, 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 actu­al­ly thought that far ahead.”

Now I can pick names that are good enough (most­ly ones I bla­tant­ly pil­fer from video games) and I don’t have to wor­ry about find/replace let­ting me down when I go through lat­er with bet­ter names. It’s already helped me once when I real­ized there were two busi­ness­es with “Irv­ing” in their name (cour­tesy of Lloyd Irv­ing from Tales of Sym­pho­nia) so all I had to do was update one entry in my glos­sary files and my name dupli­ca­tion issue went away.