Saturday, April 28, 2007

Converting .pdf file (Adobe Acrobat) to .doc file (MS Word)

In the last post I had mentioned a way that I thought I am going to use to get a .doc out of the .pdf I had.

After a few more online searches, I was extremely thrilled to know that there were many more options for me, all thanks to the LaTex community. This http://www.tug.org/utilities/texconv/textopc.html
has all the details! There are many options listed in that site, I am referring to a few
below and also have added some other ideas.

If you have a .tex file and want a .doc file at the end, you can choose one of these methods:
  1. .tex --> .pdf -> (pdftotext) .txt --> (copy & paste) .doc
  2. .tex --> (TeX4ht) .html --> (copy & paste) .doc
  3. .tex --> (LaTex2rtf) .rtf --> (MS Word/Open Office) .doc
  4. .pdf --> (Adobe Acrobat Standard - use 'save as' option) .doc
  5. .??? --> (Google Documents - covert to .doc) .doc


    I have used the 1st option many times before. It always requires some cleanup after the .doc has been created.

    I used the 2nd option for my work this time. The results are nice. Cleanup is not required at all for text. Tables and figures require some cleanup. There is another option "html,word" "symbol/!" "-cvalidate" which supposedly makes the .html output tuned towards MS Word. I haven't used that option yet.

    The 3rd option seems interesting. Should try it.

    The 4th options caught me off guard, since I had not thought of it. I tried it, but Adobe Acrobat did a very bad job. Text, tables will require a lot of cleanup, while no cleanup for figures is required.

    One of my friends recommended the 5th option. Have not tried it fully yet. Tried exporting a .xml file (created with TeX4ht) to Google Writer, but Google does not accept .xml files yet.


    In conclusion, I really must thank the selfless efforts of all the people who have created these amazing open source tools.

    Do refer to http://www.tug.org/utilities/texconv/textopc.html
    for all the options.

, ,

Friday, April 27, 2007

Creating American Psychological Association (APA) Style documents

For a book that I am writing for, I have to submit a .doc file (ugh!) which follows the American Psychological Association (APA) style. Just getting the 70+ references to follow this style was a nightmare for me. With no help from APA and the MS Word community (if there existed one!), I had to turn to Latex to help me out.

The Apacite package was what I used. I thought that as usual it would be relatively a simple task to use Latex, but this time Latex really took away a lot of my time.

I had forgotten how to install packages on a Linux machine and so first had to re-learn that from here. Once I had that working, it just seemed impossible to get the references working!

Firstly, I had to see that all the URLs were enclosed with the \url tag (before that I realised after many hours that I had forgotten the \usepackage{url} directive in the tex file and Latex had not specifically complained about that!), then I added the \bibnodot{.} command to the end of each URL.

After these steps of making my .bib file look as similar as possible to the .bib file provided at the CTAN's site for Apacite, I still was not able to get it working. The worst part was trying to debug the "Runaway argument"!

I got an error which was similar to:
Runaway argument?
\bibitem
! File ended while scanning use of \@tempa.

\par


After some googling and after finding some useful sites for debugging common Latex errors (this one), I still was not making any progress. I had this idea of replacing all the indents (hex09) in my .bib file by good old space (hex 20), thinking that it would help. I don't know if that helped or not, but by this time, I was able to get a few references.

Simply rewriting some of the bibtex entries (at places where Latex complained) helped ultimately and the invisible errors were at last gone!

At the end of hours and hours of working on the format of the document, at last I got a pdf file which followed the APA style guidelines.

((UPDATE-START))
A lot of errors such as this:

?
! Undefined control sequence.
l.1072 ...ves/sum2005/entries/turing-test/}\bibnodot
%
were flagged both by the CUI and GUI (Kile). Just ignoring them produced the .pdf file nevertheless.
((UPDATE-END))

BUT, Latex's promise was the EXACT OPPOSITE!

Latex promises that the writer does not have to worry about the style and can concentrate on the content only. It promises the flexibility of different styles just by changing a few lines or so. Well, Latex did not deliver that promise to me in this case.

But if I had taken the other route of working on the style while using a Word document, surely I would have gone mad by now and would not even have got close to finishing the task.

Now I have a few more simple steps:

  1. convert pdf to text (pdftotext)

  2. copy the text to MS Word (or Open Office)

  3. do the final edits since pdftotext would not have done a neat job

  4. paste all the figures and create tables and

  5. that is it!


, ,

Thursday, March 29, 2007

Mails from the future

I wonder if anyone else has noticed this. Some of the spam that I receive is dated years away from now. For instance I received spam mails dated with the year as 2037, 2030 !

Some bug in the spammer's engine?

, ,

Wednesday, March 28, 2007

Well, I'll see you in a few minutes, ol' buddy!

27 March, 2007 (9:43am)

RIP dear Kuku.

--------------------------------------------------
Hobbes: I think we dream so we don't have to be apart so long. If we're in each other's dreams, we can play together all night!
Calvin: Hey, yeah.

Calvin: Well, I'll see you in a few minutes, ol' buddy!
Hobbes: I'll be right there!
--------------------------------------------------
Bill Watterson.
Released on: Sunday, Oct 22nd 1989.
The Calvin and Hobbes Searchable Database

, ,

Sunday, March 25, 2007

Dining in and around Fairfax

To make it easier for me, let me keep adding URLs to interesting places to eat in and around Fairfax city.

This website lists a lot of interesting places in Herndon where one could try different tastes.

Vegetarian places from the 'Veggilicious' website.


Friendly Reminder: "Eat to live, do not live to eat!"


, ,

This is no longer a 'beta' product !

Just noticed on the dashboard - Google's announcement that this is no longer a 'beta' product!

, ,

Cool Web Tools - creating a Google map of the route you walked/hiked/biked/ran/swam/etc.

Found this at a posting on a birding forum. (oops seems that the 'return' key is no longer supported by Blogspot and so this might end up being one long line!) Will return back later.....

I do not know what the problem is and where it is. Anyways I thought this would be a good reason to blog in HTML rather than plain English.


The problem: You walked/hiked/biked some place and want to know the distance that you travelled.
The Solution: this website!
It displays a UI which is the same as what you see in Google Maps and allows you to chart your route on it while displaying the total distance covered so far. Problem solved!!!


, ,

Firebug

Firebug is an excellent tool to debug website code and also to analyze websites. I recently found some nice video tutorials at their documentation site.

From there I got to know about this PHP/Ajax programmer's blog which seems pretty interesting.

, ,

Monday, March 12, 2007

Networking Cars !

This would be a big paradigm shift in our day to day lives. The idea is that all cars should be able to communicate with each other and to roadside Tx/Rx stations.

This month's IEEE's newsletter "The Institute" describes the standards for "car talk".

In the new world of networked cars this will be the scenario, your car will be aware of all the cars around it, their speeds, acceleration, deceleration, braking etc. If the car in the other lane tries to move into your lane, your car being in its blindspot, both the cars will recognize that situation and avoid the collision (by alerting the drivers perhaps).
As your car passes by a roadside information pole, it will be updated with the traffic conditions up ahead. Accidents on a road, major blockages and all such related information will be beamed to your car and you will be able to take a decision on an alternate route.

Sounds great !!!

To enable this scenario new standards have been developed and are called the IEEE 1609 suite of WAVE standards. WAVE here stands for Wireless Access in Vehicular Environment.

One of its promises is a simple technology change about which I think a lot (I almost led myself to believe that it was my new idea.) This simple idea is the idea of the traffic light signals being more than visual. Directional radio waves emitted by the traffic lights can "speak" to one's car and inform about whether it is ok or not to cross the intersection. WAVE will enable this simple idea.

If the system is integrated with the engine controls, the police might be able to over ride the car controls completely and take over the car of the runaway driver and stop it safely.

There is always a price to pay for new changes. This system will not only mean that a monetary price will have to be paid to have all that infrastructure in place but there will also be a loss of privacy, perhaps.

Security of the data will have to be a key concern. It must not be possible for one car to purposefully mislead the other car; or for some prankster to interfere with the waves of traffic lights.

The possibilities seem endless and so does the abuse. But nevertheless it sounds exciting.

, ,

Sunday, March 11, 2007

The visitor

Not once did he flap,
the visitor who came to check by.
while hundreds of pigeons took off,
flapping, turning, circling and restless,
all exploding into flight.

Between one ledge and the other,
a thousands flaps were heard.
but not once did he flap,
the visitor who slowly disappeared in his soar.

(c) Deapesh.

, ,

Tuesday, March 06, 2007

Spam and Weather Advisories

Noticed recently that pump and dump spam was using text from some weather advisory.

The IP address I got it from was 67.199.231.212 (no information available on this IP address) and then relayed to 24.150.209.12 the address of which is Stoney Creek, Ontario, Canada. The address matches the weather advisory. Perhaps this content was cached on the computer.


The particular one that I received used the following weather advisory content.

ONE OF THE COLDEST AIR MASSES OF THE WINTER SEASON HAS SPREADSOUTHEASTWARD FROM CENTRAL CANADA. A LATE SEASON ARCTIC BLAST ARRIVING IN WESTERN MAINE ANDNORTHERN. THE NATIONAL WEATHER SERVICE IN PADUCAH, KENTUCKY HAS ISSUED AFLOOD WARNING FOR THE FOLLOWING RIVERS. THIS LOW PRESSURE SYSTEM WILL STARTSPREADING SNOW INTO THE REGION WEDNESDAY MORNING AND SHOULD ENDBEFORE WEDNESDAY EVENING. STRONG NORTHWEST WINDS BEHINDTHE FRONT WILL PREVAIL OVERNIGHT. STAY TUNED TO NOAA WEATHERRADIO OR YOUR LOCAL MEDIA FOR FURTHER STATEMENTS AND POSSIBLE UPDATEDFORECASTS. THIS LOW PRESSURE SYSTEM WILL STARTSPREADING SNOW INTO THE REGION WEDNESDAY MORNING AND SHOULD ENDBEFORE WEDNESDAY EVENING.
AVOID SERIOUS CONDITIONS SUCH AS FROSTBITE AND HYPOTHERMIA BYKEEPING WARM. A SNOW ADVISORY REMAINS IN EFFECT UNTIL 6 AM EST TUESDAY. LIGHT SNOW POSSIBLE WEDNESDAY. SEVERE WIND CHILL VALUES WILL SET IN LATETONIGHT AND TUESDAY MORNING.
A WIND CHILL ADVISORY IS ISSUED WHEN WIND WILL COMBINE WITH COLDTEMPERATURES TO CREATE DANGEROUSLY COLD CONDITIONS FOR EXPOSEDSKIN.
THE GREATEST IMPACT BASED ON THE CURRENT TIMING IS FORTHE SNOW TO AFFECT THE AFTERNOON AND EVENING COMMUTE ON WEDNESDAY.
A WINDCHILL ADVISORY REMAINS IN EFFECT FROM 1 AM TO 6 PM EST TUESDAY.
A LATE SEASON ARCTIC BLAST ARRIVING IN WESTERN MAINE ANDNORTHERN. IF YOU MUST GO OUTSIDE. COUPLED WITH THE STRONG WINDS, THIS SHOULD PRODUCE WINDCHILL FACTORS REACHING AROUND ZERO COME TUESDAY MORNING. ONE OF THE COLDEST AIR MASSES OF THE WINTER SEASON HAS SPREADSOUTHEASTWARD FROM CENTRAL CANADA.
WIND CHILL ADVISORY REMAINS IN EFFECT FROM 1 AM TO 6 PM ESTTUESDAY. A DRY COLD FRONT IS MOVING FROM NORTH TO SOUTH THROUGHTHE MID ATLANTIC REGION.
THESE STRONG WINDS COMBINED WITH BITTERLY COLDTEMPERATURES WILL PRODUCE WIND CHILL VALUES FIVE TO TEN DEGREESBELOW ZERO LATE TONIGHT INTO TUESDAY MORNING.
CENTRAL AND SOUTHEAST NEW HAMPSHIRE THIS EVENING.
SNOW ADVISORY REMAINS IN EFFECT UNTIL 6 AM EST TUESDAY.
THE CORE OF THE COLDEST AIRWILL BUILD OVER THE REGION TONIGHT AND TUESDAY.
WIND CHILL ADVISORY REMAINS IN EFFECT FROM 1 AM TO 6 PM ESTTUESDAY. WIND CHILL VALUES WILL FALL TO 25BELOW ZERO OVERNIGHT THROUGH TUESDAY. LIGHT SNOW POSSIBLE WEDNESDAY.
THE HEAVIERSNOWSQUALLS WILL CONTINUE TO DIMINISH OVERNIGHT BUT STRONG WINDSWILL STILL PRODUCE POOR VISIBILITIES IN BLOWING AND DRIFTING SNOW.
THE HEAVIERSNOWSQUALLS WILL CONTINUE TO DIMINISH OVERNIGHT BUT STRONG WINDSWILL STILL PRODUCE POOR VISIBILITIES IN BLOWING AND DRIFTING SNOW.
TO THE LOWER AND MIDDLE TEENS IN URBAN AND COASTALAREAS. LAKE WIND ADVISORY REMAINS IN EFFECT UNTIL 6 AM EST TUESDAY.
IF YOU MUST GO OUTSIDE.
SEVERE WIND CHILL VALUES WILL SET IN LATETONIGHT AND TUESDAY MORNING.
A WINDCHILL ADVISORY REMAINS IN EFFECT FROM 1 AM TO 6 PM EST TUESDAY. WEST TO NORTHWEST WINDS HAVE GUSTED TO 35 MPH. A WIND CHILL ADVISORY IS ISSUED WHEN WIND WILL COMBINE WITH COLDTEMPERATURES TO CREATE DANGEROUSLY COLD CONDITIONS FOR EXPOSEDSKIN. OHIO RIVER AT CAIRO AFFECTING ALEXANDER. LAKE WIND ADVISORY REMAINS IN EFFECT UNTIL 6 AM EST TUESDAY. SEEK MEDICAL HELPIMMEDIATELY OR CALL 911. EVEN COLDER LOWS WILL BE ON TAP TUESDAY NIGHT INTO WEDNESDAYMORNING AS WINDS DECREASE AND LOWS DROP INTO THE SINGLE DIGITS.

, ,

Wednesday, February 28, 2007

Long days are back....

It no longer is dark when I reach home. Noticed it for the first time this Monday.

The winter retreats back slowly into the dark corners of the forest. While over the meadows the sun shines bright.

, ,

Tuesday, February 13, 2007

Pathetic Greed - scam mails

I received the following pump and dump scam email in my inbox:

============
Subject: The answers are ``it depends,'' ``no, definitely not,'' and ``yes and no.'' O'Reilly and Associates do take a risk in publishing the Networking Guide,

Train cars derail, catch fire in KentuckyMassive fireDare to be stupid.
In fact, idea! Whencounselor that convinced me that I thought I was I
was 12 years old I had a guidance University bombings

XXX XXXXX ENTERPRISE (XXXXX.PK) new share for YOU!!!
We PROVIDE U ADVANTAGEOUS METHOD to earn a lot of money.

This XXXXX.PK share increases with every hour !!!
It has CONSTANT GROWTH POTENTIAL.

For more info about XXXXX.PK check broker web-site!!!
Hurry up YOU need get this XXXXX.PK stock on TUESDAY: 02/13/07

--WARNING--: Tomorrow will be more expensive!!! Do it!!!

TV Wants You. I thought I was Need fresh faces shows all major networks
ABC, NBC, CBS & FOX Now But seasons 1-5 have already
============

where I have replaced identifying information with "x".

My point: how greedy must a person be, to accept an email with a subject line as:
"The answers are ``it depends,'' ``no, definitely not,'' and ``yes and no.'' O'Reilly and Associates do take a risk in publishing the Networking Guide,",
with content as:
"Train cars derail, catch fire in KentuckyMassive fireDare to be stupid.
In fact, idea! Whencounselor that convinced me that I thought I was I
was 12 years old I had a guidance University bombings "

and some advice about investing money in it to be true?

Is there ABSOLUTELY NO sense in people? It would be REALLY interesting to know the kind of people who will accept such an email to be good advice!

This brings us to the question, to what levels of distortion can the scammers stoop to, while still ensuring that the stupid greedy people will neglect ALL warning signs in the scam email?

I hope there is some level of distortion and obfuscation, below which even the most greediest person will become suspicious of the intent of the scam mail.

, ,

Thursday, February 08, 2007

General Knowledge Quiz

Attending and winning quizzes was great fun during my school years (especially if the team you are on is the best team in the city). The questions in the quizzes during my school days were pretty much like the questions below, simple GK based question. But then during my college years, the quizzes became intensely "trivia" oriented. If you had not seen the third episode of a series, you would not know the answer kind of question, like the most important question below.

Answer these questions:

* When did Columbus discover the Americas?
* The first shot of American Revolutionary War was fired here ______.
* Which Bolshevik played a key role in the October Revolution along with Lenin?
* What did Eli Whitney invent in 1793?

(I could remember the answer to the last question only!)

and the most important question is:
what is the common theme between these questions?


Hint - He is the 'Defender of freedom', 'Advocate of liberty', the 'champion of liberty and justice', "it's a bird, it's a plane, no its not ...it's ..."

, ,

Friday, February 02, 2007

Sometimes...

when you look back you wonder IF....

, ,

iMac, Canon Camera and an argument lost

One of my friends had an iMac and late last night we got into a contest regarding the super-powers of an iMac (why do all such experiments have to begin late at night always?).

He said that we could get any device and his iMac will instantly recognize the device and without the need for any drivers to be additionally installed, make the device usable.

The first device we got, as starters was a wireless mouse. We plugged it in, and in a few seconds the mouse was working. Wow! my other friend said while I was still unimpressed.

The real test would be, I declared, if it recognizes and downloads photos from my camera.

I was certain that it was not possible. On my Linux machine, certainly the OS did not recognize the camera and rightly so, 'cause Canon was using a proprietary protocol to download the images. I had googled it up and read elsewhere too, that this was a task still not possible.

I had previously taken a look at gphoto2 and now, from what I recall, it was said that this task was not possible yet.

So, I went and got my camera and with a smile attached it to the iMac's USB port. iPhoto came on, it went into some searching mode, my smile got wider, the iMac owner showed some restlessness and my smile got even wider.

Ha, I said, it is not possible!

It had been a few minutes now, the software had only recognized the camera make and the number of photos in the card.

It is over, I said and started to explain about the proprietary protocol and why definitely there was a need for a driver to be installed.

Lo and behold then, iPhoto started displaying the photos ! (we had clicked on the "import" button by then).

Another late night argument, this one I lost.

, ,

Sunday, January 21, 2007

Historical Note

So shall it be noted, that on the 21 of January, 2007 at 13:04 hours, the city of Fairfax, VA had its first snowfall for this winter.

, ,

Wednesday, January 17, 2007

Two 21 winds

It happened at last. The wind made its way into my room shattering the glass panels. I used many devices as I grew up to keep it out of my room and every time it had come knocking, begging to be let inside, I flatly refused it.

Every man has his room and so would I. It screeched, howled and spoke at lengths to me. But I persisted, every man has his own persistence and so did I.

We ended up speaking so much with each other, that I started looking forward to meet it. I would wait for it to knock and bang on my windows. As one eager child waiting for his Dad to get back home from work, I would leave every thing which I might be involved in, and would rush to the window to hear it speak.

At last it managed to convince me. To my credit, it took two winds to convince me. And they were not just any winds, they were the catch 21 winds (in a catch 22, one has two options, while in a catch 21 situation, (which is as you would have already noted, one less than 22) one has to choose just one option).

These two winds teamed up and convinced me at last that I should let them in so that they could explain everything to me. I had always been very curious and I really wanted to know. So I did let them in.

It was then that I realized that I had never asked them any question. What then would they explain to me? Well, it was too late, I had already decided to let them in. They broke the glass panes and came in.

I waited for them to settle down. They finally did settle down but did not speak anything.

Well..I said, so what is it?

"The answer, my friend, is blowing in the wind, The answer is blowing in the wind" they said.

(c) Deapesh.

, ,

Sunday, January 14, 2007

TED Conferences - II

Found that TED conferences has an interesting blog here and the video/audio files can be found here.

, ,

TED Conferences

Thanks to Kiran T, that I was made aware of these brilliant short presentations from renowned people. The presentations I am talking of are of the presenters in TED conferences.

From their website, they describe this annual gathering as:
TED (Technology, Entertainment, Design) is an invitation-only event where the world's leading thinkers and doers gather to find inspiration.


Some of the videos are available on Google Videos. Listen to a great talk by Richard Dawkins about how we perhaps have been evolved to live and rational in the middle world.


, ,