August 26, 2009

BibTeX Journal Abbreviations

Filed under: LaTeX — Chris @ 3:17 pm

Ladies and gentlemen, a list of BibTeX’s built-in journal abbreviations, of which Google is largely ignorant:

acmcs: ACM Computing Surveys
acta: Acta Informatica
cacm: Communications of the ACM
ibmjrd: IBM Journal of Research and Development
ibmsj: IBM Systems Journal
ieeese: IEEE Transactions on Software Engineering
ieeetc: IEEE Transactions on Computers
ieeetcad: IEEE Transactions on Computer-Aided Design of Integrated Circuits
ipl: Information Processing Letters
jacm: Journal of the ACM
jcss: Journal of Computer and System Sciences
scp: Science of Computer Programming
sicomp: SIAM Journal on Computing
tocs: ACM Transactions on Computer Systems
tods: ACM Transactions on Database Systems
tog: ACM Transactions on Graphics
toms: ACM Transactions on Mathematical Software
toois: ACM Transactions on Office Information Systems
toplas: ACM Transactions on Programming Languages and Systems
tcs: Theoretical Computer Science

The availability of the above will depend on your chosen bibliographystyle. They are provided by all of the built-in styles (e.g., plain, abbrv, unsrt, etc.).


March 24, 2008

LaTeX Appendectomies

Filed under: LaTeX, Tech — Chris @ 4:41 pm

I have need of a LaTeX package. I think a lot of people would find this package useful. I would prefer not to write it myself.

This package would take a mode argument in the preamble and format the document in one of three ways: as a conference submission, as a camera-ready conference paper, or as a tech report.

Suppose I have a theorem and that theorem has a proof.

  • In a conference submission, the theorem would appear in the main text and would be re-stated along with its proof in an appendix.
  • In a camera-ready conference paper, the theorem would appear in the main text and the proof would not appear at all.
  • In a tech report, the theorem and the proof would appear inline in the main text.

Preferably, proofs could be included in the main text or sent to an appendix on a case-by-case basis. Proofs could also have “sketch” versions and full versions: the sketch version appears in the main text of a conference paper (either kind) and the full version appears only in a tech report.

Suppose that, in proving a theorem, I first prove a lemma.

  • If the proof of the theorem appears in the main text (or an appendix), then the lemma and its proof should also appear in the main text (or the appendix), before the theorem.
  • If the proof of the theorem is omitted, or if a proof sketch is included which makes no reference to the lemma, then the lemma and its proof should not appear at all.

One should be able to conditionally include text depending on the mode. For example, in camera-ready conference mode, one would probably include the sentence: “Full proofs of all theorems appear in a technical report [citation here].”

The only package I’ve found that does anything like this is thrmappendix , but it doesn’t allow for a proof to appear in the main text at all. It’s primarily concerned with the appearance and re-appearance of the theorem, with or without its proof; I’m primarily concerned with the appearance or suppression of the proof.

November 25, 2007

Style Guidelines for People

Filed under: LaTeX — Chris @ 8:03 pm

In the midst of some unrelated Googling, I came across Luca de Alfaro’s style guidelines for student co-authors. This is good stuff. I particularly like “one sentence per line” b/w “fill-sentence macro”. It’s an elegant solution to a frequently annoying deficiency of diff, which is unfortunately the baseline for anyone collaborating via CVS or SVN. I tweaked his macro to get nice indentation in AucTeX:

(defun fill-sentence ()
    (or (eq (point) (point-max)) (forward-char))
    (forward-sentence -1)
    (let ((beg (point)))
      (if (equal "LaTeX" (substring mode-name (string-match "LaTeX" mode-name)))
          (LaTeX-fill-region-as-paragraph beg (point))
        (fill-region-as-paragraph beg (point))))))
(global-set-key "\ej" 'fill-sentence)

[UPDATE 1/20/08] Fixed an off-by-one error when the cursor is on the first character of the sentence by adding (forward-char).
[UPDATE 9/19/08] Fixed an error when the cursor is at the end of the buffer by changing (forward-char) to (or (eq (point) (point-max)) (forward-char))

LaTeX Letters

Filed under: LaTeX, Tech — Chris @ 4:42 pm

I was trying to write a letter in LaTeX the other day:





\opening{To Whom It May Concern:}

Hello, there.



This led to the following two errors, which shed little light on the situation:

! LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation.
Type H  for immediate help.

l.10 \opening{To Whom It May Concern:}

and (on a different example)

! Incomplete \iffalse; all text was ignored after line 66.

l.16 \end{letter}

Runaway text?
\@mlabel{}{\unhbox \voidb@x \ignorespaces \global \let

The problem, as it was gently explained to me, is I had omitted the second mandatory argument of \begin{letter}, which is the address of the recipient. The following is correct:




\begin{letter}{Foo Corp.}

\opening{To Whom It May Concern:}

Hello, there.



[UPDATE] I just realized that the reason I got so confused about this is that I was working off a previous business letter that was formatted like:

Foo Corp. \\
... \\
ATTN: Warranty Dept.}

I’m not sure if I intended it to be the case (probably not), but LaTeX picked up the braces around the address as the argument to letter. When I used this as the template for a personal letter and deleted the address, all hell broke loose.

March 18, 2007

Buffer-local Dictionaries

Filed under: Emacs, LaTeX, Tech — Chris @ 10:00 pm

If you write technical documents—especially technical computer science documents with code snippets and the like—you’re likely to come across a spell-checking dilemma like the following:

Unrecognized word: pBuffer

Replace with: (0) buffer (1) puffer (2) puffier (3) pouffe …
Space: Accept word this time
a: Accept word this session
i: Insert into personal dictionary

“pBuffer” is not a real word that should go in your personal dictionary, so you accept the word for this session. Say you’re going to write 5,000 more drafts of this document. All of those weird little technical words could get pretty annoying after a while.

In Emacs, you can type ‘A’ instead of ‘a’ to insert the word in a “buffer-local dictionary.” You can also presumably add a Local Words comment somewhere in your file by hand, like

% Local Words: pBuffer

Why is it always so hard to figure this stuff out?

Hat tip to the Linux Documentation Project.

Bonus tip: You want an em dash in your blog post? Try —. You would think I couldn’t be so em dash-happy and not know this already, but I am and I didn’t.

March 17, 2007


Filed under: LaTeX, Tech — Chris @ 11:22 pm

So you want to give an equation a name in LaTeX, instead of the number it gets automatically… For some reason, Google will resist telling you how. You may be tempted to use the eqname package. No need! No need at all! Use the \tag command. Why isn’t this easier to figure out?

UPDATE: I apologize to the writers of the amsmath documentation, who mention this pretty much immediately after they introduce the concept of equation numbering. I always assume that Google can find these things for me.

March 16, 2007

Lazy Scholarship

Filed under: LaTeX, Not Tech — Chris @ 8:31 pm

Fill in the blanks: You are ___% more likely to get cited if you include BibTeX and/or EndNote entries for your publications on your web page. You are ___% less likely to get cited if the PDF of your paper doesn’t support cut-and-paste.

February 20, 2007

Comments in BibTeX

Filed under: LaTeX, Tech — Chris @ 11:52 pm

Be warned: there is a @Comment directive in BibTeX, but it doesn’t appear to do anything.

UPDATE: @Comment works as expected so long as you use it outside any other directive. E.g., the following will not work,

@InProceedings{ key,
  title = {\BibTeX comments considered harmful},
  author = {Christopher L. Conway},
  booktitle = {Procrastiblog Symposium on \LaTeX Arcana},
  year = 2007,
  @Comment{ This never actually happened. }

whereas the following is fine,

@InProceedings{ key,
 title = {\BibTeX comments considered harmful},
 author = {Christopher L. Conway},
 booktitle = {Procrastiblog Symposium on \LaTeX Arcana},
 year = 2007,

@Comment{ The above never actually happened. }

Create a free website or blog at