Actual comment from a LaTeX document that I am writing now.

% So, why are we not using \appdxsection here?
%
% Sit down, my child, and you shall hear a tale.  A tale of terrible
% danger and of great deeds by heroes who fought that danger but were
% ultimately defeated.  This is not a story with a happy ending.  Your
% father and I debated for a long time about whether you were old
% enough to hear it.  We eventually decided you were still too young,
% but you sneaked into my computer and are now reading it anyway, you
% little rascal!  Fine.  If you're old enough to break into the liquor
% cabinet, you're old enough to get drunk, as the saying goes.  (No
% one ever actually said this.  I just made it up.  But I'll bet that
% by this time next year it's trending on Twitter.)
% 
% Anyway, here's the deal:
%
% If we just use "\appdxsection{Foo}\label{appdx:foo}" here, then the
% first appendix's name will be something like "Appendix G".  In other
% words, the section numbering that we've been using so far will
% continue right on in to the appendix letters.  If the last
% non-appendix section was Section 6, then the first appendix will get
% named for the 7th letter of the alphabet.
%
% That sucks, but we all know what the solution is, right?  Just do:
%
%   \setcounter{section}{0}
%
%   (And actually, you can even combine that with another command,
%   "\renewcommand{\thesection}{\Alph{section}}", so that subsections
%   within the appendix get lovely appendix-y names like "A.1", "A.2",
%   "A.2.1", etc.)
%
% Ah, but there's a problem:
% 
% Now if you say "Section \ref{appdx:foo}" anywhere in the document,
% the ref's *link* will actually point to the page where -- you
% guessed it -- Section 1 is!  So while the reference's text would
% look correct (saying "Appendix A" or whatever), if you click on it
% it mysteriously jumps to Section 1, and if you hover over it, in
% Evince or in any other PDF reader that supports preview popups, you
% see a popup showing Section 1's header.
%
% I don't have a solution for this.  Or rather, I finally decided to
% stop shaving the LaTeX yak and just do it manually, with a regular
% unnumbered section that has "Appendix A:" in its title explicitly.
%
% Sometimes the dragon wins.

2 comments

  1. Karl, I deeply needed this laugh just now. Thank you so much for this. I read the funniest bits aloud to Leonard and he also enjoyed it.

    Typo report: “That sucks, but we all know what the solution, right?” should be “That sucks, but we all know what the solution is, right?”

  2. Thanks, Sumana! I’m so glad you both enjoyed it; I was hoping you would.

    I’ve fixed the typo, here and in the original document.

Leave a Reply

Your email address will not be published. Required fields are marked *

Rants.org Comments Policy

eighty nine − seventy nine =