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.

Comments

Popular posts from this blog

On Harry Potter and why I dislike the series

There could not be a better time for this post. There could not have been a worse time for this post. Now that the penultimate movie of the series is out, and my facebook wall filled with people who loved the movie. But this is something I really wanted to say, and I shall say it anyway. Harry Potter is pathetic literature. Now, you must be wondering why I say that. There are many reasons. Firstly, the storyline itself is flawed. When a writer sits down to write anything, he/she must set up some essential rules about what is happening. These rules must remain constant irrespective of how many times he/she changes his/her mind. This is so that the readers are allowed to have some sensibility in what they are reading. In the fourth book, Rowling goes ahead and kills Cedric. Then, at the end of the book, the horseless carriages are there again. Nothing special. We all knew that they are horseless. But then comes the fifth book, and BAM, the horses are actually winged beasts that only thos...

On the Dvorak Simplified Keyboard

This is a post that I have been meaning to write from quite some time. Long hours spent typing code on my computer left my hands fatigued, and left me with a lot of pain in my wrists and fingers. That is when I decided to use the Dvorak. But I have got the same bad habit as Dr. Watson, to tell a story backwards. Of course, you must be wondering what the Dvorak is. The story of keyboards starts with the invention of the typewriter. Christopher Sholes, the inventor of the typewriter, tried with a two row piano style keyboard. But then, he got into many difficulties with the design. Then he finally settled for a four row design. This was similar to the QWERTY layout that most computers and typewriters today possess. The engineers at Remington, to whom Sholes had presented his design modified the layout a little further, and then the QWERTY was born. As typewriters became popular, people got used to the layout, and started practising touch typing, i.e. typing without looking at the keys...

The paradox of government

I'm fascinated by the concept of government, and the paradoxes it presents. On one hand, governments grant us a certain set of rights or liberties. On the other hand, they work to strip us of the very liberties they promise. Now, I don't mean that all governments strip people of liberties, but there are liberal regimes, and there are sufficiently restrictive and dictatorial ones. Both models may have results to show, it does not mean that people in a restrictive regime are unhappy (refer to Dan Dennett's TED talk , where he states that ideas or memes can be dangerous when taken from one part of the world, where they are widespread, and, using the virus analogy, where people are immune to the memes; to a part of the world where they are foreign, where people may not be immune to the memes and where people may get infected). History has shown that people were sufficiently satisfied with autocratic governments with a benevolent dictator, and that people in other parts of the ...