Ads by Google

Tuesday, December 9, 2008

PDFcomment: A userfriendly interface to \pdfannot

Just saw this new package,PDFcomment on the ctan-ann mailing list.  The \pdfannot command is used to add comments to your PDF file when generated through pdflatex.  This has varying degrees of support depending on the PDF viewer and the version of the viewer i.e. you might not see the comments at all if your viewer does not support it;  Rest assured that the PDF file is still the same.

And this style file is a decent interface (warning PDF file) to the underlying pdfannot command.   Note that while one can add comments through PDFLaTeX, others receiving it cannot add more comments. Unless explicit permissions are set on the PDF file.  Which pdftex does not support and needs to be done using some other external tools.

The last time I checked, there were some legal issues in changing document permissions of an already created PDF file. Unfortunately, can't find where I saw that and I could be completely wrong about it.  I believe this AREnable tool probably would help though I've never used it.

Friday, December 5, 2008

Mouse avoidance mode: addressing minor irritants while working

You know the number of times you have to nudge the mouse, just to get the mouse pointer out of the way?  Irritatingly, right over the last letter and cursor when you have writer's block and staring blankly at the screen?

Well, Emacs has a minor mode to fix that too. erm....the mouse pointer, not the empty thought.

It's invoked as M-x mouse-avoidance-mode and gives you several options of how the mouse should behave when you call the function.  From the doc string


  * banish: Move the mouse to the upper-right corner on any keypress.
 * exile: Move the mouse to the corner only if the cursor gets too close, and allow it to return once the cursor is out of the way.
 * jump: If the cursor gets too close to the mouse, displace the mouse a random distance & direction.
 * animate: As `jump', but shows steps along the way for illusion of motion.
 * cat-and-mouse: Same as `animate'.
 * proteus: As `animate', but changes the shape of the mouse pointer too.

You can repeatedly chose from the different options to see what behaviour you like.  All you have to do is to bring the mouse close to point or where you are typing to see it move away.

Works beautifully without any noticeable disturbance to your typing.

Nice.

Thursday, December 4, 2008

OXML plugin for Firefox

Not sure where this heading but Microsoft has released an Open XML document viewer plugin for Firefox.

The plugin itself can be downloaded here.

If users don't know that it is a Microsoft standard document format, would they adopt it without reservations?  The plugin is not downloadable from Microsoft's support pages too.  I can't think of a reason why they'd want to release this plugin; it's not that they've cared before that their documents have to be read from different document editors or viewers.

What gives?

Saturday, November 29, 2008

Scoring Down Usenet Spam in Gnus

For some days over the last few weeks, some of the newsgroups that I was following was overrun with spam.  My article counts for some of the newsgroups was in the high hundreds even as I was catching up with the posts regularly.

Fortunately, Gnus offers  a way to score down the spam and even expunge the articles when the score is lower than a threshold.

Here's one way of doing it.


Saturday, November 22, 2008

Converting your Ascii art to PNGs

If you use org mode, in the contrib/scripts folder of the package you'd find a jar file called ditaa.jar. This is a small piece of software which requires Java (drat!) but nevertheless a neat one.

For those of you who know Artist-mode in Emacs, this would be a god send. Instead of the ASCII pictures that you send in your emails, the same ASCII can be converted to PNG images and sent across. Here's a sample of what I did; albeit a nonsensical one.

First I drew this ascii text of 2 rectangles by invoking M-x artist-mode and drawing them using the rectangle option.



I saved the text file and called the program thus

$ java -jar ditaa.jar ../../temp/aa.txt

DiTAA version 0.6b, Copyright (C) 2004 Efstathios Sideris

Using options:

Reading file: ../../temp/aa.txt


Rendering to file: c:\..\..\temp\aa.png


Done in 5sec


$


I did that in my cygwin emulation shell in Windows, so it should not be too different in Unix OSes or the DOS prompt.



The homepage of the package is ditaa and it has a good intro on how to use the software. So, it all boils down to learning artist-mode in Emacs and then converting that to PNGs. The package is written by Stathis Sideris and you can contact him for any bugs and features you need. In my opinion, this is one handy piece of software when your rough sketch needs to be seen by all and sundry. For simple database sketches, this will be an excellent tool and another reason to do all your work in Emacs!

Wednesday, November 19, 2008

Word count of your LaTeX document

Just saw an announcement on the CTAN-ann mailing list about TeXcount.  The homepage has more details on the feature list and other shortcomings. 

This should be useful for getting the correct word count instead of exporting the DVI/PDF file into a text file and then trying a word count.

Note that it require Perl, as it is basically a perl script.

Saturday, November 15, 2008

Email encryption howto

In a fortuitous coincidence, the Register has published an article on email encryption.   Just following on the heels on my posting about Gnus authinfo encryption.

While it is certainly Windows oriented, it should be useful to get your basic installation right.  Add to that my refrain, that it's always best to install it in folders without spaces in their names.  Sooner or later that tends to cop out somewhere with some program.

If you install it (note the warnings in the Epilogue about trusting public keys), then configure easypg to point to your gnupg exes and other files, you should be done.

Using it with Gnus is not the only reason you need to install easypg and gnupg


Thursday, November 13, 2008

Encrypting your Authinfo file

The authinfo file is used by Gnus to connect to various mail servers.  Putting the connection details, userid and passwords in it lets you login into different mail servers and download or access your mail and News without having to type in your userid and password everytime.

But the data is stored in plain text.  And if you feel uncomfortable with the file have all the details in plain text, encrypt it using EasyPG.

The emacswiki page on GnusEncryptedAuthInfo provides clear instructions on how to configure your EasyPG setup to encrypt your authinfo file.  Do note that you need to have gnupg installed to make it all work.  Of course.

And a little idea about what is a pass phrase, public, provate keys would help you in understanding the instructions better rather than following arcane (seemingly) instructions.

Sunday, November 9, 2008

Closing and Opening server connections in Gnus

When using Gnus, it sometimes happens that the server is flaky or there is a problem with your internet connections and the entire Gnus session sort of hangs.   And you have problems reconnecting.

Perhaps the simplest method is to, close the server connection and open it again as mentioned in this post.  To get to your *Server* buffer, use ^ in your Group buffer.

It's much cleaner than killing your Emacs session and taking other drastic measures.

Saturday, November 8, 2008

Emacs in the NYT

I never thought I'd see a mention of GNU Emacs in the New York Times, albeit in the comments section.

But it is there, mentioned as one of the oldest software around by some knowledgeable commenter.