About Me

When not at work with students, I spend my time in my room either reading, calculating something using pen and paper, or using a computer. I read almost anything: from the pornographic to the profound, although my main interests are mathematics and physics. "When I get a little money I buy books; and if any is left I buy food and clothes." -Erasmus

Tuesday, November 23, 2010

TeXworks and MikTex 2.9

I wrote my thesis using LaTex (pronounced La-tek, although other pronunciations are acceptable), a typesetting language. It's not like MS Word-- the output is not what-you-see -is -what-you-get -- you write a program and then compile it to produce pdf output. It's very handy when typing equations; you don't need to worry about portability. All pdf readers should be able to handle opening the finished product.

This portability of output can be contrasted with the various versions of Equation Editor on the market. Every time you upgrade to later versions of equation editor or math type, the equations you worked hard to prepare become gibberish.

You do need to learn the correct syntax. When programming in C or fortran, you can use an ordinary text editor like notepad, and then go to the command prompt or console, type in the compilation command, and wait for the executable to be produced. For latex files, compilation produces a pdf file. That was actually how I first learned to TeX; I used the console of a Linux distribution and an ordinary text editor.

A few years ago, I learned about TeXnicCenter. It was an integrated development environment (IDE) that allowed you to edit TeX files and then you can click on an icon to compile and view the output. To get it running, you had to install a TeX distribution-- I used an earlier version of MikTex, and you also needed to install a pdf reader (Like Adobe pdf reader). You needed to configure TeXnicCenter to recognize MikTeX and Adobe reader, and if you happen to be a newbie, getting it to work properly was hell. (I did learn though, and that's how the thesis got written.) For all of its faults-- and the only fault I could think of was how hard it was to get it working when newly installed, it does a very good job. If you compiled to dvi, then each new compile would lead to changes that you can easily track, if you had a dvi viewer open along with TeXnicCenter.

Pdf's were a problem. If you compiled to pdf, and you wanted to see the output, you opened the file with Adobe reader. If you make changes in the code you wrote and wished to recompile, you had to close the open pdf file; an open pdf file stopped the compiler from modifying the pdf because it was locked in place by Adobe Reader. So closing the open pdf took a few extra moments in addition to editing, viewing and recompiling.

Now fast forward to my new computer. Among the necessities of scientific writing (at least for the physics, engineering, and math community) is a TeX editor and compiler. So I looked up TeXnicCenter and MikTex and downloaded both of the latest versions. After installing both of these programs, I was surprised that .tex files were associated by Windows with TeXworks instead of TeXnicCenter. Since I did not recall installing this program, I decided to open a .tex file and found that it was a different IDE from TeXniCenter. I didn't like unncessary duplication, so I decided to look it up on the net, and I learned that it was bundled with MikTex 2.9, so there was no need to install TeXniCenter. Best of all, the output was a pdf file, and the associated viewer did not need to close the pdf in between compilation cycles.

I showed the program to the resident TeX geek, and she was overcome with admiration for TeXworks. Installation was a breeze-- you needed only one installation, just MikTeX 2.9. No more messing around with ghostscript, and configuring TeXniCenter.

The people who worked on MikTeX 2.9 did a terrific job of making the TeX editing easier with their latest stable release. In fact, I've uninstalled my copy of TeXniCenter and will be relying on TeXworks from now on.


.

8 comments:

Helen Mary Labao said...

Hi! Wow, I'll take it from you to get really nice things. Nga pala, the book portal you sent me no longer accepts new registration... =( So sad. Although, I do have a full plate when it comes to reading materials... Might try this one for one of my projects...

Mike said...

Just email the books you want-- I can still access it and the download is usually just a few minutes.

Leanne Dong said...

Hi,
I am a newbie of LaTeX, hv to know it well for my honour thesis in SP.
I have both Texwork(which included in miktex 2.9) and TexnicCentre on my PC. I know it's a bit waste of space...but I still feel reluctant to uninstall TexnicCentre because it is a proper editor which has lots of built in command&symbols which Texwork doesnt has...If I just use Texwork I will have to remember all those command....So could you help me with a question?Why do you think Texwork can replace other IDE Latex editor?Should I remove TeXnicCentre and rely on Texwork only?

Mike said...

Each editor will have its own advantages. I like Texworks because I happen to be minimalist, and I'd rather know the commands instead of clicking on buttons.

However, it's not for everyone. If you feel more comfortable using TechniCenter, then it's alright to use it. My impression is you're used to working with TechniCenter; your thesis is more important and you ought to use the program that you're more comfortable with.

Also, note that I use TexWorks in my netbook, while I still keep TechniCenter on my other laptop. I'm definitely not removing TecniCenter until I'm completely comfortable with TexWorks.

Leanne Dong said...

Thanks for getting back to me!
These days I am trying to take notes and do homework using latex.(just want to get myself some familiarity for future sake) However I found it quite time consuming and not vy effective-can't think very well when typing...
So do you think doing maths homework with latex is a bad strategy? Or do you think scatch thought with pen&paper in first hand then latex it is a better way?

Appreciate your comments!

Mike said...

I still like paper and pen for notes because it's much faster for me to write mathematics than to use LaTex. I use Latex mainly for writing papers or the thesis, or if my teachers specifically ask that I use LaTex.

I first learned how to use Latex a few years ago because I was forced to -- conference proceedings editors required papers in Tex-- so my buddies and I crammed it. But when thinking things out, I'd rather use a blackboard or lots of paper.

Sometimes, when I use Maple (or get a buddy to use Mathematica for me), I print the results and attach it to what I write. If you use Maple there is a command that converts Maple output to Tex. If you use symbolic computation software a lot, it can be faster to do the calculations and the writing using your computer.

I confess that using paper gives me more satisfaction because there's a more tangible output compared to leaving all of your writing in your hard disk.

Leanne Dong said...

thanks.
My work is mainly on Stochastic Processes/Calculus; Analysis&some multivariate statistics, sometimes involves some simulation and data fitting with some statistical method like MLE.But most of the time is about constructing some proof.I found it not so comfortable to prove thing with LaTeX because it makes me tired more quickly. But it looks so much cleaner than my handwriting and easier for record keeping.
Yes I used to use mathematica to do everything including graphing,programming and note taking, but the LaTeX conversion is kind of strange, Im not sure what environment they are using, the codes just look different from what they supposed to be.
So do you reckon I shall keep doing most of 'thinking' work with traditional way and only adopt LaTeX for thesis, assignment or formal presentation?

My appreciation for comments!

Mike said...

If the "traditional" way is faster for you (as it is for me), then you ought to use it.

I've read that there are computers with a display that allows you to write on them with a stylus and the appropriate software. For example, you can install an app, Writepad (for the Ipad), and it translates your handwriting on the screen to text around 80 percent of the time.

It probably hasn't reached the stage where it can be used for writing equations and maths symbols, but someday we'll probably get there. Until that time comes, I'll keep using pen and paper.