Saturday, May 25, 2013

Sneery O'Leary Returns to Uncommon Descent

I am very happy to see that Denyse "Sneery" O'Leary, the world's worst journalist™, is back as a daily contributor to the creationist site, Uncommon Descent.

We can now look forward to months of mangled syntax, non sequiturs, sneers and defamation against legitimate scientists, vapid and effusive praise of anyone she thinks is a Darwin denier, and relentless plugging of her books. It promises to be a real cornucopia of stupidity.

In just her first week back, she

What you will never see, however, is Denyse actually interviewing anyone other than her favorite anti-evolutionary crackpots. Because that, you know, would actually involve real journalism. Why do real work when you can just summarize pop science?

Welcome back, Denyse! Get the popcorn.

Friday, May 24, 2013

New Bike Rack in Kitchener

Here's a new bike rack that just went up on Gaukel Street in downtown Kitchener. I like the design!

Moose in Connecticut

From reader RM comes this story about moose in Connecticut, and this warning for drivers.

Now, if they would only warn the moose about the cars...

Friday, May 17, 2013

Earthquake!

Today at about 9:45 AM, there was a mild earthquake in Waterloo Region. No damage in my building.

Now it's confirmed: Automatic detection of seismic event: magnitude 4.8 - 17 May 9:43 EDT - BRAESIDE, ON region.

Friday Moose Pool

Recommended by son #2, this nice (but probably faked?) view of a moose family relaxing by the pool:

Apparently they like paddling pools too

Sunday, May 12, 2013

Happy Mother's Day

Mourning doves nesting with young on top of our porch light again this year....

Friday, May 10, 2013

Who Does He Sound Like?

The Christian Right likes to suggest that atheists are secretly Muslims. Some Muslims, on the other hand, like to claim that no real Muslim could be a terrorist.

But when you listen to the guy recently charged in planning an attack on VIA trains here in Canada, Chiheb Esseghaier, who does he sound like?

“First of all, my comment is the following because all of those conclusions was taken out based on Criminal Code,” he said.

“All of us we know that this Criminal Code is not holy book, it’s just written by set of creations and the creations – they’re not perfect because only the Creator is perfect so if we are basing our judgment … we cannot rely on the conclusions taken out from these judgments.”

That sounds like it could have come directly out of the mouth of a Christian reconstructionist, doesn't it?

Wednesday, May 08, 2013

Ten Common LaTeX Errors

I am the editor for an electronic journal, the Journal of Integer Sequences. We only accept submissions in LaTeX format, which are then converted to ps, dvi, and pdf files for publication.

While most authors do a reasonable job preparing their papers in LaTeX, a reasonable fraction do not. After more than ten years of editing this journal, I've noted the following ten common LaTeX errors that authors make again and again.

1. Failure to use built-in LaTeX commands when they are available. Don't reinvent the wheel. There are lots of useful constructs available in the packages amsmath, amssymb, amsfonts, and amsthm, so your LaTeX file should include the following line in the preamble:

\usepackage{amsmath,amssymb,amsfonts,amsthm}

For example, theorems should be done using \begin{theorem} ... \end{theorem}. Remarks should be done with \begin{remark} ... \end{remark}, and conjectures should be done with \begin{conjecture} ... \end{conjecture}. The easiest way to do this is to put the following text in the preamble:

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
And of course, don't forget to use \begin{proof} ... \end{proof} for proofs.

2. Failure to follow basic conventions of mathematical exposition. For example, a common convention is that one-letter functions should be given in the italic font (which in LaTeX can be achieved with, say $f(x) = y$), while multi-letter functions are typically given in the roman font (and can be achieved, for example, with \sin, \cos, \tan, \log, \ln, \exp, \min, \max, etc.). But what to do when faced with a function like "lcm" for which there is no built-in definition? Then you just say

\DeclareMathOperator{\lcm}{lcm}

in the preamble, allowing you to write, for example, $\lcm(x,y) = z$ and have it appear correctly.

3. Failure to use "mod" correctly. If it is used as an equivalence relation, then you can write (for example)

$$ x \equiv y \pmod z $$

which displays correctly for centered equations. In-line, however, you should write $x \equiv y$ (mod $z$) to get the proper spacing. Sometimes, however, you want to do this all in-line without moving in and out of math mode. Then you need a definition in the preamble like

\def\modd#1 #2{#1\ ({\rm mod}\ #2)}

which can be used like $x \equiv \modd{y} {z}$. I find it very useful and wish it were built-in in LaTeX.

If you use mod as a function, then the syntax is different. Write $x = y \bmod z$ in this case.

4. Failure to do multiple citations correctly. Don't write \cite{ref1}, \cite{ref2}, \cite{ref3}; write \cite{ref1,ref2,ref3} instead.

Similarly, don't write

\cite{ref1}, Thm. 6, p. 10.

Instead write

\cite[Thm.\ 6, p.\ 10]{ref1}.

Note the backslash-space after the m and p; you need those because of the TeX convention that lower-case letters followed by a period are interpreted as the end of a sentence, which is conventionally followed by a double-space. If this is not the case, then you need to escape the space with the backslash.

5. Incorrect case statements. Sometimes writers use an array environment to make these, instead of the built-in case environment, which can be used as follows:

x = \begin{cases}
y, & \text{if $t = 1$;} \\
z, & \text{otherwise.}
\end{cases}
Note the use of the \text{...} command, which makes sure the enclosed material is in the default (roman) font.

6. Failure to use labels. Mathematicians are intimately familiar with the concept of variables; yet it is really amazing that they often do not use them when preparing LaTeX documents, preferring to "hard-wire" references to theorems, lemmas, and so forth. Everything in a document that is referred to later on should get a label: theorems, lemmas, corollaries, remarks, tables, figures, sections, and so forth. Doing so makes rearranging or inserting new results trivial.

7. Using the wrong quote marks. TeX distinguishes between left-quotes, which must be written ``, and right-quotes, which can be written either " or ''. Using the wrong left-quotes looks ugly.

8. Using the wrong kinds of dots. Never ever write "$x,...,y$". Instead write $x, \ldots, y $. Similarly, write $x y \cdots z$ for a product. The rule for distinguishing when to use \ldots and when to use \cdots is pretty easy: if the syntax to the left and right of the dots has a center of mass at the bottom of the line, use \ldots. If the syntax to the left and right of the dots has a center of mass at the center of the line, use \cdots.

9. Page ranges. Page ranges should be written with --, not -. So write 234--456, not 234-456.

10. Obsessive tweaking of the spacing. If your file contains lots of invocations of commands like \\, \noindent, \newpage, \bigskip, \medskip, \smallskip, \newline, \pagebreak, \linebreak, you're probably doing something wrong. LaTeX's own choice of spacing is usually pretty good, and the need to tweak it should be rather rare. In particular, I've had authors submit papers with \\ at the end of every paragraph!

And, for lagniappe, here's number 11:

11. Wrong angle brackets.. Use \langle and \rangle for left and right angle brackets, for example, in group presentations. Don't use < and >, which result in ugly output.

If you have other pet peeves about lousy LaTeX usage, feel free to add them here.

Friday, May 03, 2013

Second Story Moose

From Eric Rowland, a pair of moose at College and Bellevue in Toronto.