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

ERROR_SUCCESS

ERROR_SUCCESS. This macro would be familiar to all those who have done some programming in WIN32. It is the output of the GetLastError() function to check the thread's last error state when no error has occurred. Weird, isn't it? I mean, if it is a success, then why is it marked as an error in the macro? This is one example of a badly made API. APIs are considered bad when programming in them becomes non-intuitive. Software is said to be bad (or said to suck) when it seems counter-intuitive to the user. There is one very simple example of this. Start notepad. Type in any text. Click on close. The message that you see is: This makes no sense to me as a user. Of course, the programmer follows the approach that he creates a temporary file called Untitled , and in that file he allows the user to make all his changes. But how am I, as a user to understand that? A similar disconnect occurs even between two different programmers. That is why it takes a whole lot of effort to make

Elements of a Story: The Whispers

I'm compelled to begin each post with a meta. That way, my blog posts seem less like essays or dissertations, and more like diary entries, or web logs. So here goes... I started this blog a little over a year ago. The main purpose of this blog was to experiment with styles of writing, and find an effective outlet for all the subjects I wish to rant about; saving my classmates the agony of having to listen to them. As I wrote this blog, I've experimented with so many styles, and have received comments claiming that my work is a shameless copy greatly inspired by so-and-so author/work. Fact is that I simply chanced upon that style. I read, so obviously, my work shall reflect the styles of those I admire, but I've worked out so many styles without even knowing that they exist, only to be informed of them later. Recently, I've been struck with the seeming absence of whispers as an element of a story. The more I've thought of the subject, the more I've been convince