Ads by Google

Monday, May 30, 2011

AucTeX Tip: Automatically save file before compiling

It used to be irritating for me that I had to save the file when I hit C-C C-C when compiling the file.  It tends to break my flow of work when I had to hit 'y' when Emacs queries me to save the file before compiling.

No  more.

Asking on the Auctex mailing list, the answer turned out to be a simple
(setq TeX-save-query nil) ;;autosave before compiling

customisation to my .emacs file.
It saves me a few keystrokes of C-x C-s too in the event I forget to regularly save my file.  Hopefully, this is worth it for you too.

Tuesday, May 24, 2011

A simple way to extract specific PDF pages

Today, I received a humongous PDF with about 300 pages of documentation which had to be shared with lots of people who had to review each section independently.  Instead of simply forwarding the entire document to them and asking them to wade through it themselves, I thought I'd split the pages out and send only the relevant bits.

That should be easy, right?

Well, I forgot what the tool was.  A few minutes of google search turned up...pdftk which was what I was looking for.  Turned out that I had installed it long time ago and when I tried it, it dumped core on the cygwin installation I had.

This happens to me.  A lot. Just when I have deadline and I think of the solution, the carpet gets pulled under me.  :-)

Wait, I did remember doing something using LaTeX and another quick search revealed pdfpages on CTAN.  Downloaded and installed it, read the documentation and it was  a breeze to get things sorted.  The smallest example that I can create to get a specific set of pages is shown below.

\documentclass[a4paper]{scrartcl}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages={ 9-14,27}]{RFP.pdf}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:


That's it.  LaTeXing the file gave me just the pages I needed.  If you have a TeX installation, this works for most cases.  Please read the documentation if you want to something fancy but the above is enough to get the pages you need.

Sunday, May 22, 2011

Fitting long TOCs into a single Beamer frame

Here's a simple way to fit a long TOC into a single frame instead of making it flow into multiple frames.  This might be useful for those preparing long lectures with beamer.

Monday, May 2, 2011

Automatic Screenshot insertion in Org Mode

Trawling the org-mode mailing list , found another interesting hack on getting screenshots into your org notes.  The thread on what was originally asked is here, where the OP wanted to go from the clipboard into a named file.  One of the org members posted this reply along with the link to the elisp code.

Works on Unix-like systems with Imagemagick installed.

No Gnus v0.17 Released

Happened on May 1st.  Biggest changes in gnus-registry, if you use it at all, along with minor bug fixes.  The snapshot can be downloaded here.

Sunday, May 1, 2011

Integrating Emacs, Org mode and Google Calendar

Well, sort of.

This thread on on gnu.emacs.help is interesting in that it can allow you to work with your google calendar and org-mode after daisy chaining shell scripts and using Googlecl.  While this may not be a perfect solution, if you're willing to spend time tinkering with all the tools and scripts, it shouldn't be too difficult.