# LaTeX: Hyphenation of \texttt

I have been using  since I was 17 and still love it. But one thing has been bugging me for a long time. For a while I had been manually tweaking documents to get proper linebreaks when using the \texttt{} macro. Now I had finally come to the point where this did not work any longer. A search gave me this snippet:

\renewcommand{\texttt}[1]{%
\begingroup
\ttfamily
\begingroup\lccode~=/\lowercase{\endgroup\def~}{/\discretionary{}{}{}}%
\begingroup\lccode~=[\lowercase{\endgroup\def~}{[\discretionary{}{}{}}%
\begingroup\lccode~=.\lowercase{\endgroup\def~}{.\discretionary{}{}{}}%
\catcode/=\active\catcode[=\active\catcode.=\active
\scantokens{#1\noexpand}%
\endgroup
}`

It works great!

# Using LaTeX with Windows 7

For those who are lazy and look for a relatively quick and easy setup guide for LaTeX with Windows 7, you should have a look at http://schlosser.info/latexsystem-en . Another interesting PDF document is here (German only).

Where I have deviated is the installation of Emacs. For several years now I have been using the distribution from http://ourcomments.org/Emacs/EmacsW32.html (patched version) which auto-installs all you need, incl.  gnuserv and gnuclientw. There is one caveat, however.  At the end of the installation you can have Emacs started automatically (on by default). This will most likely cause problems on Windows 7 (and probably also on Vista), because the installer is usually running with admin rights. In such a case the directory ~/.emacs.d and its subdirectories will not be created with the proper account as owner. Instead the admin user or group will own things. This will show itself in two problems:

• The window “Emacs Client” will display the message “Waiting for Emacs server to start” until a timeout occurs
• You will see the message “The directory ~/.emacs.d/server is unsafe” in the status line of your main Emacs window

To correct things, go to %USERPROFILE%\AppData\Roaming and change the owner of .emacs.d/ to your own user (make sure to apply this change to all sub-directories!).

Update October 2015
The download link for EmacsW32 is broken, in fact the whole website does not exist any more. I was unable to quickly find an alternative download.

# Make Command for LaTeX

I have been a happy user of the typesetting system LaTeX for almost 20 years. For creating the actual output (be it a DVI, PostScript or PDF file) I have usually used some home-grown script in the past. But recently, when digging through the repository of available software for my Fedora 12 system, I came across something much better: latexmk.

Apart from the expected things, like automatically recognizing when e.g. BibTeX or makeindex need to be run, it also supports a continous mode. It then monitors all the files that make up your document. And whenever one of them changes, it automatically re-creates the document. When your previewer supports auto-refresh, you can instantly see the effect of your update without any manual interaction needed.

# BibTeX Style natdin.bst for Fedora 12

Just having started with a new personal “project” I needed a good style for BibTeX. In the past (read ten years ago) I had used dinnat.bst which had good support for citing URLs (at the time that was rather unusual). This has been replaced by natdin.bst, which is not installed on Fedora 12. So here are the quick and dirty steps to install it:

The proper way would be to set up a hierarchy under /usr/local/share/texmf/bibtext/bst but I chose to not bother in this case. And ideally there would be an RPM…