Homemade LaTex package: Scientific diary!

Everyday, many of us spend a lot of time studying various subjects most of which in direction of our field of study, lab, or work. It is almost impossible to make a good use of whatever we read everyday without taking note systematically. This brings me to the title of my post. The question is, what is the best way to store and organize everyday note?

I have searched online for rather long time and these are the approximate solution that I have found so far:

  1. Microsoft Onenote and the free (cloud based) Evernote software
  2. There are also several packages or class in Latex:
  • labbook: is a customized latex class mostly intended for experimentalists
  • ouline: outline-style indented lists with freely mixed levels up to four levels deep.

I have also came across some of purchasable softwares such as circus pony, however, none of the above was useful for me. Here, I have developed my own package. I am using LaTex for a rather long time, however, I am very new to this package/class writing business. Hence, it is a very simple package.

Here what is in this package: this package provide new command called \nitem[tag][comment]{category name}{title} . The first two entries (tag and comment) are optional, and the second two (category name and title) are mandatory. For example, \nitem[physics, les houches lecture note][This is something important]{spin}{How to manipulate spin} has the following output:


The special point about this new command (\nitem) is that it classify items according to “category name”. For example, in the above example, spin is one of my categories that I am interested to list when I search later. Note that, YOU SHOULD DEFINE YOUR CATEGORY NAME AFTER \begin{document} BEFORE USING.  Here is the template code for defining new categeory name:


Just replace your desired keyword for X. In the case of the above example, I defined:


Here is the style package. Download this package and leave a copy in the directory of your .tex file. Then insert \usepackage{scidriary} in the preamble (before \begin{document}). Do not forgot to define your desired category names after \begin{document}.

This is a early version, and it is continuously changing. I will be grateful if you could help me with your comments on how to improve it. It seems that I can not upload sty file here, so please contact me in case you are interested in.

A brief guidelines for preparation of writing your thesis.

First and foremost, you need a reliable and flexible text editor. I personally suggest LaTex or Lyx to everyone. For beginners, it might be a drag but after a little bit you will appreciate the strength and flexibility. Then, you need a very good  vector graphics editor, so your image does not get distorted after resizing. There are several open source softwares out there such as Inkscape, XFig, etc. However, it is important to choose something that you are very comfortable with, since creating new images usually take a long time. You also need a flexible software to plot your equations and save as SVG. I suggest to use GNU plot. Finally, yo need an easy-to-use citation manager software such as JabRef, Refworks, or Zotero.

Now that you have all the tools,  you need some strategy to start writing your thesis. It is usually suggested to leave the introduction and conclusion chapters to the end. Now, I will outline the strategy I find useful for writing a paper or a thesis. Create a folder for every chapter (or section in the case of paper). Each day that you make some changes to the particular chapter, start with a new copy of the last version of that chapter in a new folder. Name the folder, the day you are working on that chapter.  Finally, make a log file (a text file) and write changes you have made at the end of the day. See below figure.



How to add a custom class to lyx on Mac.

Preface: Latex is one the most sophisticated typesetting system designed for production of technical and scientific documents. If you are not using it, you do not know what you are missing. Lyx is another open source softwares which has the power and flexibility of Latex with a user friendly graphical interface.

Despite the powerfulness of the above softwares, sometimes there is compatibility issue between them. For example, adding a custom class file (<classname>.cls) written for LaTex to Lyx takes more than copy and paste. In the following the procedure for adding a cls file to Lyx is outlined: http://blog.icall-research.net/2011/01/07/latex-adding-a-custom-class-in-lyx-1-6-8-for-mac-os/

I would like to add three more points:

1) As explained in the link, first you need to copy the cls file in your latex directory. To find your latex directory you can use the following syntax in the Terminal: kpsewhich -var-value TEXMFHOME

2) To make a layout file, you just need to open a text file and name it as <custom>.layout .

3) You also need to find your Lyx package content directory. You can find your package directory  by opening Lyx>About Lyx. There are two addresses. You need the Library directory.

Following the above procedure you would be able to import the class file into the Lyx, however, the new commands defined in the class file do not automatically appear in the Lyx menu, although you can use it as Latex command in the Lyx.

what is happening in the middle east?

Looking at the media, it is very hard to ignore the situation in the middle east. Of course some part of the problem is just magnified by media. Some other part of problem is due to pressure and interference from outside world, particularly west. However, I believe the main problem is the clash between eastern and western  philosophy.

Let me open up this issue further. For many years the western society has moved toward the humanistic/materialistic state of mind, where everything is evolving around human and of course nothing exist beyond what we can “see”. Meanwhile, it started to get a huge jump to improve the human life quantities (money, food, life expectancy, etc), of course, mostly ignoring the qualities, particularly after industrialization. However, the eastern culture is mostly based on heavenly school of thoughts, where other things than human matters, yet for improving human life. Despite huge success of east, many years ago, east does not have much success, nowadays. Partly, due to changing the nature of “values”.

As you can see the nature of these two school of thoughts are directly opposing each other. Unfortunately, during last two centuries, not much efforts have been made to settle the differences. This lag in the updating eastern philosophy with the new ideas such as democracy, liberalization, human rights, feminism, etc have led to huge clash as we can see in the middle east.

Just to be clear that, I do not believe that eastern world have to just get the values from the west and institutionalize it. What I believe is that, eastern philosopher should find the meaning of these values within their school of thoughts. As much as this task is postponed the effect of western philosophy on the east is more devastating.

I have found the work by Seyed Hossein Nasr in this direction pretty useful and I suggest everyone, particularly muslims,  to read his books.