image

Nowadays I start most of my work with a .Rnw document that I convert later in to a LaTeX file. Since .Rnw keeps a running log of the trials / mistakes encountered in a project, it serves as a good summary document of the time spent on data analysis , model building , visualization , back testing etc. One big limitation that I was facing in preparing .Rnw documents was that I had forgotten most of the LaTeX syntax that I had used 4 years back. I somehow got by till date by knowing only a handful LaTeX commands. But my “memory” never fails to embarrass me!..and so had to go over LaTeX syntax.

So, after a brief search in the gigantic ocean of LaTeX literature, I picked up this book to get up to speed on the syntax. In the hindsight, this book was perfect to me as I could read the entire book in one sitting. The book is organized in to 13 chapters and has a cookbook kind of layout. The author explains a requirement, does something, shows why/how it works and moves on. In all, I picked up some 100 odd commands from this book that should more than suffice my requirement for now. I have listed down these commands in this post and I guess these are the most widely used commands in preparing basic LaTeX documents. Now that I have spent some time on this book , I hope to make my .Rnw files more readable so that it ultimately leads to better analysis.

Here is a list of some important commands (105 to be specific ) that can be used based on the type of task 

Formatting Words, Lines and Paragraphs

image

Designing Pages

image

Creating Lists

image

Creating Tables and Inserting Pictures

image

Cross Referencing

image

Listing Contents and References 

image

Using Fonts

Trivia – What is a sentence called if it contains all the alphabets (a-z) ? It is called pangram and in the context of fonts, pangrams are best to check how various fonts display them.

image

Developing Large Documents

image

In the above list, I have deliberately avoided mentioning math related commands as they constitute a universe in themselves. Hence the commands needed are completely dependent on the type of math that is being described in the document.The above list is also missing bibliography related commands.

imageTakeaway :

The book is written in the form of a cookbook. I think it covers ~ 90% of the situations that one comes across while preparing a TeX document. This book teaches basic commands of LaTeX and then suggests to pick and choose any package from the plethora of open source packages available, based one one’s requirement.

Advertisements