Skip to main content


Showing posts from September, 2013

LaTeX: Itemize and Enumerate

Previously, we talk about paragraph, spacing, and indentation. What about listing in $\mathrm{\LaTeX}$?

Just like MS Word, $\mathrm{\LaTeX}$ has both bullet and alphanumeric environment for listing. Bullet listing is constructed inside the itemize domain. For example,

The codes above generate list with sublists. The outer list uses bullet for entries (Line 5 and Line 14) while the sublists (Line 7-12 and Line 16-20) use hyphen. The itemize domain can have up to three nested lists, each with a particular character for entries. Here is something worth to explore,

This returns Output 1, the first list with entries Line 5-6 uses bullets, then a sublist under Line 6 with two entries (Line 8-9) uses hyphen, another subsublist uses asterisk, and further down to subsubsublist, dot or period is utilize. If we go further to the fourth nested list we get error that says, "Too deeply nested".

LaTeX: Paragraph, Spacing, and Indentation

Let us visit the history of Statistics (source here), and utilize this for demonstrations of paragraph, spacing, and indentation in $\mathrm{\LaTeX}$. Consider the following:

Executing these, we will have Output 1. This is the simplest way we can do to separate multiple paragraphs in $\mathrm{\LaTeX}$. That is, by allotting single white space between them (paragraph), or that is two white spaces from the last line of the preceding paragraph.

To extend the distance between passages, say into double line spacing, just put \\ at every end of it and you will have Output 2. Hence from the above codes, the first paragraph will end with Ibrahim Al-Kadi.\\, second with element in history.\\, and so on. There is option for the magnitude of space, say 0.5 centimeter, or 0.2 inch spacing is achieve by \\[0.5cm] and \\[0.2in], respectively. Now what happen when white spaces are omitted on the above codes, and leave \\ at the end of every paragraphs? I want you to explore that.

I have shown you …

LaTeX: Introduction - First Document

Let us start with a simple $\mathrm{\LaTeX}$ document. Open your text editor (Texmaker, TeXnicCenter, TeXworks, etc.), then go to File>New, and paste the following:

Save this and make sure the file has .tex extension. You should have something like this
In Texmaker: Press F1 to compile and view the output (Mac users should manually click the blue right arrow next to the paste button, because F1 won't work). The output is in PDF format with text on the top-left corner of the page that says the statement in Output 1. Now let us investigate these line by line. $\mathrm{\LaTeX}$ document always starts with \documentclass which sets the document you are to create. In this case the document class is article, {article}, with font size option set to 12 point, [12pt].

All $\mathrm{\LaTeX}$ tag always start with backslash (\), use braces ({}) to enclose arguments, and brackets ([]) to enclose options of the arguments.
Click here for list of document classes and options. Proceeding to the…

LaTeX: Download and Installation

Are you using MS Word for your paper works? And MS PowerPoint for your presentations? Why not try something that is FREE, powerful than those commercial products? Something that is quite challenging but FUN to use. Introducing $\mathrm{\LaTeX}$, a document markup language similar to HTML but outputs in PDF format.

I prefer $\mathrm{\LaTeX}$ because it produces beautiful mathematical equations that MS Word cannot. $\mathrm{\LaTeX}$ is used by publishers like O'Reilly and Springer for books that involve mathematics and statistics.

Now let me guide you on getting started with $\mathrm{\LaTeX}$ on Windows, Mac and Ubuntu.

For Windows users:
Go to this site, download what is recommended for your system;follow the instructions in installation; after that,download the TeXMaker here, and install. (TeXMaker is a $\mathrm{\LaTeX}$ text-editor with many features including syntax highlighting) For Mac users:
Go to this site, download the MacTeX.pkg;follow the instructions in installation; af…

C/C++: Frequency Distribution

The first 40 raw data of Systolic Blood pressure (in mmHg) of Simplified Biostatistics by Abubakar S. Asaad is utilize in the demonstration below.

Output: C Codes:

C++ Codes:

C/C++: Variance, Standard Deviation and Coefficient of Variation

Output: C Codes:

C++ Codes: