Skip to main content

Posts

Showing posts from February, 2012

Writing basic math in LaTeX - inline math and math environment

Internet abounds with LaTex tutorials on how to write mathematics equations and simple symbols in LaTeX. It is sometimes not clear as to how the math environment works in general and how to differntiate between inline math equations and how to write them on a line of their own. I earlier did a tutorial on how to write mathematical equations using Latex  which covered the "equation" environment in LaTeX. Math environment is equally important and in this tutorial I am going to talk about how to use basic math environment in LaTeX. Specifically, I am going to discuss how to do the following in LaTeX: How to initiate Math environment Writing inline math equations and writing equations in a separate line How to use frac for equations How to use paranthesis and brackets to enclose mathematical symbols and equations How to type powers and indices How to write matrices Following video illustrates the step by step instructions to use math in LaTeX   The code used in

How to create table in Latex from MS Excel files or other external databases

Latex can be used to create tables from external files such as MS-Excel files saved as comma separated values or similarly many other formats. Recently, I received a comment where a reader suggested that I should post a tutorial on how to create tables in Latex from external files. I searched around and found multiple ways to achieve this. I am going to talk about two of the most popular ways of doing it. First one is using pgfplotstable and the second one is using datatool package. Specifiacally, we are going to learn the following in this tutorial: Using datatool package to load external files Usng MS-Excel files to create tables in Latex Using \DTLloaddb to set keys and use external files Using \DTLforeach to iterate the external file Using \pgfplotstable package Using \booktabs package Using pgfplotstabletypeset Styling each column of table Using style rules from booktabs package The following video tutorial explains both metho