Home » Archive

Articles in the LaTeX Category

LaTeX »

[2 Dec 2015 | No Comment]

The default font displayed in LaTeX document is good but if you want a better font which looks better in display and while printing then you can try Charter package. This package use the charter font.
You can simply use the charter package and your LaTeX document font will change automatically.

LaTeX »

[23 Nov 2015 | No Comment]

In the enumerate list, the numbering by default is in arabic form (1, 2, 3, 4, 5, etc.). You might need to show these numbering in romanized form (i, ii, iii, iv, v, etc.). To do so, you need to use enumitem package. This package pro­vides user con­trol over the lay­out of the three ba­sic list en­vi­ron­ments: enu­mer­ate, item­ize and de­scrip­tion.
In the below example code, I have displayed five different forms of enumerate list: a) the default enumerate list, b) enumerate list with roman numerals, c) list with roman numbers …

LaTeX »

[3 Nov 2015 | No Comment]

The default report document generated by LaTeX is good. However, it looks a bit compact with not much space between lines and paragraphs. You might want to make it more readable by adding some spacing between lines and some spacing between paragraphs.
You can do so with the following lines of code in your LaTeX code’s preamble:

LaTeX »

[27 Oct 2015 | No Comment]

I had to display JSON data on my report.
I had problem while writing it as a plain text.
– I need to make the json data distinguished from other report text.
– I also had problems with the underscores used in my json data. LaTeX will throw an error for underscores in text.

LaTeX »

[21 Sep 2015 | No Comment]

In LaTeX, if you write quotation (punctuation) mark in normal way then you will get into problem. Normally we write word with quotation as: “Your words”. This is displayed as ”Your words” in LaTeX (both opening and closing quote facing the same side).
The proper way of writing quotation in LaTeX is:

LaTeX »

[14 Sep 2015 | No Comment]

By default, the “\subsubsection” heading has no numbering and it is also not shown in “Table of Contents”. To put numbering and to show the subsubsection in table of contents, we need to define the counter value of “tocdepth” and “secnumdepth” in the preamble of your LaTeX document using “\setcounter“.
Here is the sample LaTeX document code:

LaTeX »

[7 Sep 2015 | No Comment]

By default, your LaTeX document has Chapter name (Chapter 1, Chapter 2, etc.) for each chapter. If you want to remove such chapter name from your document, then you can use titlesec package and define the titleformat in order to hide the chapter title.
Below are two code samples: one which shows chapter name and the other which removes the chapter name using titlesec package.

LaTeX »

[24 Aug 2015 | No Comment]

You might need to print the list of symbols or list of abbreviations for your LaTeX document. nomencl package can be used for this purpose.
You need to load the nomencl package in the preamble of your document. The command \makenomenclature will instruct LaTeX to open the nomenclature file filename.nlo corresponding to your LaTeX file filename.tex and to write the information from your \nomenclature commands to this file.

LaTeX »

[27 Jul 2015 | No Comment]

Here is a step-by-step guide on including and scaling SVG image on LaTeX.
1) Download and install Inkscape: https://inkscape.org/en/download/
2) Suppose, I have an svg image named “image.svg“.
Run the following command that exports your svg image to PDF and LaTeX format.

LaTeX »

[16 Jun 2015 | No Comment]

You can use APA reference style in LaTeX using biblatex and babel packages.
You have to add the following code in the preamble of your tex file:

LaTeX »

[9 Jun 2015 | No Comment]

There are two ways to add bibliography (references) to your document. One is for small document with few bibliography items using thebibliography environment. The other is for large documents where there are many bibliography items using packages like biblatex.
1) BIBLIOGRAPHY ON SMALL DOCUMENTS

LaTeX »

[2 Jun 2015 | No Comment]

If we want dummy text in our document then we generally search for lorem ipsum text generators and copy-paste those texts/paragraphs in our document.
In LaTeX, we don’t need to do such copy and paste thing. LaTeX has different packages which automatically generates dummy text in our document. You can generate them with just a few lines of code.

LaTeX »

[26 May 2015 | 2 Comments]

There are different packages that help writing algorithms on LaTeX. I will be using algorithm2e package for writing algorithm in LaTeX. This package should work fine if you have installed ‘TeX Live Full‘. Otherwise, you may get error while using algorithm2e package. If you get an error then you need to install the package ‘texlive-science‘ which includes algorithm2e package.
On Ubuntu, you can install texlive-science package with the following command: