Skip to main content

Learning Latek

I've been trying to learn LaTeX for a while now but learning it from scratch without a template is very very hard. Especially for a person who insists on going through atleast a couple of manuals before he goes hands-on (that's me btw). 

I've finally been able to get a grip on writing documents in LaTeX because i've been writing something in TeX for a while now. And i know quite a few people who are putting off using LaTeX for the same reason that i did. So, i thought that if i could write a good template which would encompass every basic functionality necessary for a student to write a report, i thought it'd help in getting people to start working on LaTeX. 

So, here's what i've been able to come up with in one afternoon... 

% each of these can be considered as commands and each command has different outputs depending on arguments which are given in {}. Look for the different arguments each of these functions have. some have one. quite a few have many.

\documentclass[a4paper, 12pt]{article}
% the type of article, paper and font size to be used.
\pagestyle {headings}
% to show the name of the chapter being read and the current page number.\usepackage{url}
% there are many packages which needed to be loaded. lateksym is one of the more important ones to write equations on latek. you can look up other relevant packages for you.

\author{Whomsoever this may concern to}
\title{A Template}
% will make the title and the authors name.
% the date at which the document is also printed.% i am yet ot figure out a way to remove this because the prof shouldn't know when you wrote the report, all that matters is that there is a report.

\makeindex% necessary for the table of contents to display subsections.

% begin and end document are the arguments which will create the document.

\maketitle% command to print the title of the document\section*{Preface}
The preface should not be enlisted in the table of contents. hence the use of section* instead of section.

\newpage% command for page break\tableofcontents% will print the table of contents from the current article.

This will corresponds to sections which will not be mentioned in the table of contents

This corresponds to section which will be enlisted in the table of contents
% a subsection in the current section. As the command suggests.
This corresponds to paragraphs
and so does this.\\ % \\ creates a line break.
I don't quite know what the difference b/w them is as of now.

this is to write subsections in sections. you know why.
Now refer to the section \ref{subsecB} on page \pageref{subsecB}
% how to label things and invoke them later on.
% \label{arg} will give the current section or subsection or paragraph a label.
% now this argument can be invoked to obtain the section using \ref{arg} and obtain the page number using \pageref{arg}

Actually i don't need to worry about writing text in paragraphs.
I can just write text after the sections or subsections headings without the paragraph and it'll work fine.

% to start lists without enumerating them.
\item One
\item Two
% to start lists with numbering\item A
\item B

% the use of subsection* was to change the alignment of the following text and the list.
% without the subsection* command, the following text will be in line with list.% with it, the text looks like something that the list is based upon.
Things that i intend to add in this template.

\item adding links in the document - partially done.
\item adding an appendix
\item adding references - partially done.
\item citing articles and providing links at the bottom of the page - done.
\item typesetting things to the right of the page - done.
\item creating tables - done.
\item writing quotations.

This is just for example.
the table of contents page looks stupid otherwise with just one section.

\newpage% making tables.
% \begin{tabular}{|exp|exp|} is the command to create tables% exp and exp correspond to the alignment of the two columns.
% we can similarly write an n column table.
% \hline corresponds to a horizontal line% '&' is used to move b/w different columns.
\section{Creating Tables}
% \begin {center/flush left/flush right} accompanied by the corresponding end command will determine the placement of the text in the page.

\newpage\section{Fonts and font styles}
how \emph{Wonderful} is this huhh..
% the argument for the function \emph{} will be emphasised.
moving on there's \textit{wonderful}\footnote{Italic}, \textsf{wonderful}\footnote{Sans Serif} and \texttt{wonderful}\footnote{type Writer}.
There are several other fonts which can be used. you can refer to them in the references.
% \footnote{arg} after a certain word will be given a footnote and the argument is what the footnote is.

I've learnt that having a template to start learning with greatly helps the learning curve of a person.
So, i am making this template for those who are interested in learning latek through practice and reuse and not by reading the documentation on tek or some lame tutorial. \\ Personally, i believe that learning by practice is the best way to learn. \\But i do realize that this template will only get you so far interms of use.
So, here are some of the places and documents that i've used to learn latek.

\item \TeX Cheat sheet no.1
% \LaTeX{} is what can be used to print LATEX.
\item \TeX Cheat sheet no.2 which has all of the symbols and characters \mbox{mentioned}
% \TeX is used to print TeX.
% \mbox{"argument"} will make sure that "argument" will not be split by line breaks.
% it will be in the same line.
\item a Not so short Intro to \TeX - this is a more serious look at latek and typesetting using latek.
this should be helpful after you get through the basics and need to get more out of latek.

Be aware, all of these except the link "LaTeX math symbols" are .pdf files and "the not so short intro to LaTeX" is a big on at that. Don't blame me later on for not telling you. Some of the interesting and very helpful things i referred to while learning how to write in LaTeX are - 

The not so short intro to LaTeX
the LaTeX cheat sheet and 
the LaTeX symbols cheat sheet 
Other interesting references are - 
LaTeX math symbols
another LaTeX cheat sheet

I still haven't been able to add links which will help people jump from the table on contents directly to the section, mathematical formulations and symbols and quite a few other ones. But i will keep working on this one because i have a hunch i will be using TeX extensively next sem :d... 

Here's the link for the tex file on my google drive. 
Do comment and tell me if you see anything wrong or if you think we can improve this further somehow. 

Here's the link if you want to look at the result of the tex template. 

More features coming up soon...
At a blog near you.. 

Popular posts from this blog

Animation using GNUPlot

Animation using GNUPlotI've been trying to create an animation depicting a quasar spectrum moving across the 5 SDSS pass bands with respect to redshift. It is important to visualise what emission lines are moving in and out of bands to be able to understand the color-redshift plots and the changes in it.
I've tried doing this using the animate function in matplotlib, python but i wasn't able to make it work - meaning i worked on it for a couple of days and then i gave up, not having found solutions for my problems on the internet.
And then i came across this site, where the gunn-peterson trough and the lyman alpha forest have been depicted - in a beautiful manner. And this got me interested in using js and d3 to do the animations and make it dynamic - using sliders etc.
In the meanwhile, i thought i'd look up and see if there was a way to create animations in gnuplot and whoopdedoo, what do i find but nirvana!

In the image, you see 5 static curves and one dynam…

on MOOCs.

For those of you who don't know, MOOC stands for Massively Open Online Course.

The internet is an awesome thing. It's making education free for all. Well, mostly free. But it's surprising at the width and depth of courses being offered online. And it looks like they are also having an impact on students, especially those from universities that are not top ranked. Students in all parts of the world can now get a first class education experience, thanks to courses offered by Stanford, MIT, Caltech, etc.

I'm talking about MOOCs because one of my new year resolutions is to take online courses, atleast 2 per semester (6 months). And I've chosen the following two courses on edX - Analyzing Big Data with Microsoft R Server and Data Science Essentials for now. I looked at courses on Coursera but I couldn't find any which was worthy and free. There are a lot more MOOC providers out there but let's start here. And I feel like the two courses are relevant to where I …

On programmers.

I just watched this brilliant keynote today. It's a commentary on Programmers and the software development industry/ecosystem as a whole.

I am not going to give you a tl;dr version of the talk because it is a talk that I believe everyone should watch, that everyone should learn from. Instead, I am going to give my own parallel-ish views on programmers and programming.
As pointed out in the talk, there are mythical creatures in the software development industry who are revered as gods. Guido Van Rossum, the creator of Python, was given the title Benevolent Dictator For Life (BDFL). People flock around the creators of popular languages or libraries. They are god-like to most programmers and are treated like gods. By which, I mean to say, we assume they don't have flaws. That they are infallible. That they are perfect.
And alongside this belief in the infallibility of these Gods, we believe that they were born programmers. That programming is something that people are born wit…