Skip to main content

On WYSIWYG editors and document markup languages

Hi again!

So, with a new blog, I suppose that there is a lot to learn. The thing that I learnt with the first two posts was that the compose window of this particular blog in a WYSIWYG (What You See Is What You Get) editor. As soon as I understood this, I switched to the plain HTML editor.

Why do I do this? What is the harm in WYSIWYG?

The simple answer is that document markup languages like HTML or LaTeX define the structure of the document which is invariant of how it is rendered. The document may be printed on A4 paper, or posted on the web, or viewed as a PDF file. Moreover, if anyone wants the headings to be in a different font, or a different size, the style may be changed, but the document structure remains the same. The main difference between WYSIWYG editors and markup languages is the separation of document content from the formatting.

Take the example of a website that I have created. The website uses HTML for markup and CSS for style. Now, if I want to change the layout of the website, say, move the navigation links to the top of the page, as a navigation bar, instead of on the right side, I can simply change the CSS, and I have the required change in my website. Simple, isn’t it?

On the other hand, consider a website created using (say) MS Front Page (I apologise for not mentioning any recent editor, but I have not used WYSIWYG for websites in the past eight years). In case of an editor like that, a large part of the document will have to be changed, and in many cases, the changes in formatting will not be easy.

As another example, consider a book on programming. You write a book with a lot of code. Now, you send the book to a publisher, who does not like the font that you used for formatting the code. So, what does he do if he wishes to change the formatting?

If you had used a WYSIWYG editor like MS Word, or OpenOffice.org Writer, then he would have to painstakingly find out all instances of code in your document, and change the font for all of them. That is a lot of effort for a large book! Instead, if you had used LaTeX, the code would have come in a certain environment, and by changing the rendering settings for the environment, the publisher could easily change the formatting with minimal loss of time.

This is of course true if and only if you use the markup correctly. I recall that a friend used to use the <h2> </h2> tag in HTML everytime he wanted to make something bold and large. And another used ~.~.~.~ for ellipses in LaTeX.

So, give TeX a try, use it instead of MS Word (I wonder how many use OpenOffice.org) the next time you have to submit that project report. Let me assure you that the final result shall be so wonderful that you shall surely find yourself addicted to TeX.

Popular posts from this blog

Progressive Snapshot: Is it worth it?

I turned 25 last year, which in the highly mathematical and calculating eyes of the US insurance industry meant that I had suddenly matured into a much more responsible driver than I was at 24 years and 364 days of age. As a result, I expected my insurance rates to go down. Imagine my surprise when my insurance renewal notice from GEICO actually quoted a $50 increase in my insurance rates. To me, this was a clear signal that it was time to switch companies.Typically, I score really high on brand loyalty. I tend to stick with a brand for as long as possible, unless they really mess up. This qualified as a major mess up. As a result, I started shopping for insurance quotes.Two companies that quoted me significantly lower rates (30%–40% lower) were Progressive and Allstate. Both had an optional programme that could give me further discounts based on my consenting to the companies tracking my driving habits. Now, I am a careful driver – I hardly ever accelerate hard. I hate using the brak…

Cornell Graduate Students United: At What Cost?

On Monday and Tuesday, we graduate students at Cornell will be voting on whether or not we want to unionise. Actually, scratch that, only graduate students who hold a TA, RA, or GRA appointment can unionise.This is a shitty arrangement, and I will be voting against it.For those of you who are not aware of how graduate school works at Cornell, you could be on one of many appointments.FellowshipA graduate student on a fellowship gets a stipend and tuition paid without associated teaching or research opportunities. Graduate students on a fellowship typically work towards their own theses, but will be excluded from the unionGraduate research assistantshipsA GRA gives a graduate student stipend and tuition without teaching responsibilities. However, this money comes out of a specific project grant, and the students typically work on their own theses. Students on GRAs magically qualify to join the union, whereas there is virtually no difference between a GRA and a fellowship for the most pa…

Build those noise cancelling headphones

So, here's another DIYLet me start by putting the cart before the horse. I shall start with the credits. This project was done while I was working on my Electronics Design Lab, along with my friends, Srujan M and Indrasen Bhattacharya. The work would not have been possible without the generous help received from the staff at Wadhwani Electronics Laboratory, who ensured that the only thing we did right was to leave the lab on time. This project would also not have been possible without the guidance of our dear and learned professors. It would probably have just about become additional dead weight on the head.Enough with the credits, now, I need to dive right into noise cancellation and how it works.The essence of sound is a pressure wave. The pressure wave, when incident on the eardrum sets into motion the complex mechanisms inside the ear, and after a long path, rather like the Cog advertisement, ends up making some nerves vibrate. The nerves send electrical signals to the brain, …