Happy Hacking :) #Hacktoberfest

Last day, I registered for #Hacktoberfest coding competition organised by #Digital Ocean and #GitHub . And start contribution in project which is listed under #Hactoberfest projects. Let’s do fun in #Hactoberfest. Happy Hacking 🙂


Read math symbols from CSV

Today, I came to know about the new thing. Whenever I wanted (or tried) to print math symbol  (\leq, \sigma) through .CSV. It was giving an error. Because we can’t read LaTeX symbols directly from CSV. So, to read this, we will use \(math\) like this \(\leq\) in CSV to read any symbol.

Secondly, I did not know, how to define NULL values in the table using pgfplotstable? I was doing wrong. “I defined ‘nan’ for this, But it did not work”. If we want to define NULL values then leave it blank  and separated by commas.

JSON with LaTeX

Today, I used JSON data in LaTeX. To do this, Firstly, I load one file JSON.lua  in .tex file. When I did not download and load JSON.lua file in tex, it  was giving an error during compilation.  And when we are using JSON data inside .tex file then we use lualatex command to run latex code instead of pdflatex. 

Answer to june 9,2016

I got the reason behind the error described in june 9,2016. I had written comma separated values in LSDtable.csv file Which was placed in “input” folder. But there was another file of the same name as “LSDtable.csv” which was placed outside of “input” folder, whose values were not comma separated. So, whenever I run code, it was giving  an error of this wrong file. When I delete this wrong file. Then error removed :-).

Working with .cls file in LaTeX

Normally, LaTeX provide predefined class to work like article, report, Book, elsarticle etc. But sometimes we need special features in our document, I can say when we need sudo power on document then we can create our own .cls file. .cls file provide code reusability. It means that whenever  you need similar feature in future projects. Then you just need to put name of your .cls that you have created earlier. Just do following to create and use own .cls file.

Firstly create .cls file and save it with any name for example: Dhiman_article.cls


\ProvidesClass{Dhiman_article}[2016/05/3 Dhiman custom class]

%put your code and formatting that you want to reuse.

Note : Must ensure that if you are creating your own .cls file then you don’t have a need to include article or any \documentclass explicitly in .tex file. You just load required main class in your custom .cls file.

Now use your custom .cls in your .tex file


%%%%%% Content here%%%%%


Wedding Card in LaTeX

Today created  a   Wedding Card in LaTeX. It’s looking good and beautiful. Through it , I come to know new things about LaTeX. Normally, when we use \begin{center} environment , It keeps all  content in the center that I want  in wedding card. But at the end, i.e when I have to display venue, I don’t want that text in the center. But the table was showing  that data in the center because of the environment used. So, I changed c|c to l|l. It gives me desire result that I want.

Secondly, we can’t put more newline  space using “\ \”. For example: I put 2 line space after “on April 30.2016”. when I used “\\” 2 times, it was giving error. So, to remove this error I just put  extra”\+space” before “\\”. It solved my problem and I gave 2 line space at desired location.

Review my Wedding Card 🙂

Screenshot from 2016-04-24 22:48:39

Newspaper’s style article using LaTeX

LaTeX support various styles of article which are used for  different purpose such as journal article, Newspaper article and simple article etc. Each has its own rule and style. Before this, I just written simple article. But today, I created article in LaTeX, which seems very good. It’s style is similar to article that are published in Newspapers.

My article name is Second Life. Means life, that we live on internet by creating accounts on various websites. I take it from Newspaper and convert it into  LaTeX. I convert this article into LaTeX, because I am creating my LaTeX portfolio.

Here is article :   Second-life