Easier Quotations in LaTeX with dirtytalk

I found it annoying that in LaTeX one has to type

``hello world''

or even

\glqq{}Hallo Welt\grqq{}

when writing German. I also thought that the computer could do the task of deciding whether double or single quotes shall be used. And—most important—I would like to be able to change the behavior at a later time.

This is why I wrote a package to do that. Here it is: dirtytalk

You can use it to write

Alice said: \say{I found a horrible mistake in \say{your} thesis, Bob!}

and get

Alice said: “I found a horrible mistake in ‘your’ thesis, Bob!”

You can specify any other symbol to be used for opening or closing quotes and for nested ones.

To produce the .sty file, run latex on dirtytalk.ins. After that, you can create the documentation file by running latex or—if you prefer—pdflatex on dirtytalk.dtx

This is the first time I wrote a package so I hope it won’t be too \say{dirty} and would be glad if someone finds it useful. Any comments and suggestions will be appreciated.



  1. mklammler
    Posted 2010-11-21 at 17:49 | Permalink | Reply

    Update: It’s also on CTAN now:


  2. Posted 2010-11-22 at 12:30 | Permalink | Reply

    It might actually be more useful if it weren’t for the fact that it’s more keystrokes to use \say{} rather than “”. This is especially true when “ can be typed by double-tapping the same key twice with one finger of the left hand, while ” can by typed by double-tapping another key with one finger of the right hand. \say{}, on the other hand(no pun intended), requires one to use both hands simultaneously and also using the shift key twice. More than twice if there are embedded quotations.

    I’m not saying it’s not useful, I’m just saying that there’s usability to consider, especially when writing novels or any large blocks of text requiring large numbers of left/right quotes. Now, what would be absolutely useful is for the TeX kernel to do this automatically with a single ‘ or “. Every modern wordprocessor does it. It made sense back in the ’70s when Donald Knuth wrote TeX on a PDP11 when he literally didn’t have the computing power to spare for that sort of logic, but I guess it’s just one of those weird left-over quirks we’ll have to live with.

  3. mklammler
    Posted 2010-11-22 at 22:45 | Permalink | Reply

    Hi Other Weirdo,

    thanks a lot for your comment.

    I probably hadn’t written this package if I were writing English exclusively. But as mentioned in the above post, one indeed saves some typing if he wants to use German glyphs. It also appears that I tend to frequently mistype the \glqq{} macro or forget the {} after the closing \grqq so no space will be set. An other consideration is that I have deadkeys enabled so I have to hit Shift + ` four times to get the desired result.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: