Em dash in LaTeX

My friend Daniel Reeves was recently discussing different ways to typeset em dashes. Here is the way I like to do it in LaTeX.

\documentclass{minimal}
%this sets up a new command \dash, which makes nice dashes
\DeclareRobustCommand\dash{%
\unskip\nobreak\thinspace\textemdash\thinspace\ignorespaces}
\begin{document}
Let's test out several different variants on making an em dash using the
\LaTeX typesetting system --- this one uses \verb|---| with spaces around it

Let's test out several different variants on making an em dash using the
\LaTeX typesetting system---this one uses \verb|---| with no spaces around it

Let's test out several different variants on making an em dash using the
\LaTeX typesetting system \dash this one uses my \verb|\dash| command
\begin{verbatim}
\DeclareRobustCommand\dash{%
\unskip\nobreak\thinspace\textemdash\thinspace\ignorespaces}
\end{verbatim}

\end{document}

Here is the resulting output:

Different ways to make em dashes in LaTeX

Different ways to make em dashes in LaTeX

Notice how using spaces around the --- can result in a dash at the end of a line, which is not desirable. And using no spaces around the --- doesn’t look nice, and can also result in problems when copying and pasting. The \dash command solves both of these issues. I did not come up with it myself, but I cannot remember where I found it.

Posted in latex | 1 Comment

Vetting vignetting

We recently got some family portraits taken at JCPenney. I think they turned out very nicely. They had a bunch of different effects that they could apply. While we were at the studio, I really liked the way that the vignetting effect brought out our faces. However, after investigating the full set (we bought the digital images), I decided I didn’t like the vignetting, because it was actually making my face a bit dark in one shot. Then I decided to play around with vignetting a bit more. I was disappointed to see that Picasa does not support vignetting. Fortunately I found a handy gimp script to do the job. At first I tried using it with a rectangular selection. Then I tried an oval one which I like best. Here are the various pictures:

Posted in linux, photography | 1 Comment

UNIX/Linux permissions and groups – getent

I keep forgetting this command, so I writing it here so I know where to find it. Getent will list information about users and groups on a UNIX/Linux system, including NIS and LDAP users, which is crucial networks with multiple nodes. For example to list information about a user named robert_felty, you can do:

$ getent passwd robert_felty
robert_felty:$1$iPJ.svD/$ce77I/wxh129FLt2Z7UOm.:5440:112:Robert Felty:/home/robert_felty:/bin/bash
Posted in linux | Leave a comment

Cherry rhubarb pie

Slice of cherry rhubarb pie

Slice of cherry rhubarb pie

We joined a CSA this year, taking over Greg and Mekayla’s fruit share. This week we got 3 lbs of pie cherries and a huge bundle of rhubarb. That sounded like pie to me.
Cherry rhubarb pie

Cherry rhubarb pie

I have never made cherry rhubarb pie before, only strawberry rhubarb, but I found some recipes, and decided to give it a go, using mostly this recipe, with my mom’s crust recipe. I haven’t made pie in about 10 years, and I know that making the crust is tricky. I knew it wasn’t going well while I rolled it out. I kept adding more and more water. The fourth ball I rolled was finally about right. I need to get back in practice. In spite of the pie not being super well constructed, it still tasted very good.
Cherry rhubarb pies

Cherry rhubarb pies

Posted in wordpress | Leave a comment

Image stabilization in Canon EFS 17-85mm lens

Canon EFS 17-85mm with image stabilization off

Canon EFS 17-85mm with image stabilization off

Canon EFS 17-85mm with image stabilization on

Canon EFS 17-85mm with image stabilization on




I recently bought a new lens for my Canon Rebel XT. I debated for about 6 months between a new body, and one of three lenses, the 17-85mm f4/5.6 EFS, the 28-135 f 3.5/5.6 EF, and the 17-55 f2.8 USM. I ultimately decided that I’d rather have a new lens than a new body. My body is 5 years old now, but the only major thing I feel like I am missing is video. I also learned that some of my accessories for my current body would not work with a new Rebel, in particular the battery grip, which is probably my most expensive accessory, at about $150.

I have several lenses – the kit lens for my Rebel, which is an 18-55mm EFS, a 50mm f 1.8 single focal length, and a 28mm f1.8 single focal length. I really like the 28mm, but my wife frequently wants some zoom capability. My 28mm lens has USM focusing though, which is very nice, and I like being able to get good indoor shots without flash. Speaking of focusing, I had noticed recently that my 18-55mm seemed to be having trouble auto-focusing, which is what led to me consider a new lens. I decided that I definitely wanted a USM lens. I had almost decided on the 28-135 lens, which was the cheapest, but ultimately decided that I wanted to be able to go a bit wider than 28mm for my all purpose lens.

So far I am very happy, especially with the image stabilization. It is far better than I had expected. Normally I don’t take pictures slower than 1/30 of a second, but I was able to capture a pretty decent shot at 1/4 of a second. I took two versions of the picture, one with and one without image stabilization. There is a dramatic difference.

Posted in photography | Leave a comment