jueves, 19 de noviembre de 2009

Tips with latex

I am going to post a few tips with latex so those of you who are learning how to use it dont have to break their heads trying to figure out something.

Putting an image on the first page on a report.

Firstly you need to import this package. Just download it from here and just extract the titlepic.sty where you have your .tex file.

\usepackage{titlepic}

Then you just have to put the image you want like this.

\titlepic{\includegraphics{image.png}}

You may modify the size of the pic too if you want but to do that you have to add the options between [] exactly after the includegraphics command and before the {image.png}.

You could write something like

\titlepic{\includegraphics[width=0.5\textwidth]{image.png}}

and thats it.

On to the next point do you want to customize the margins of your documents and dont know how? Well if you did it normally you would have to mess around with 11 different measures. Quite crazy isnt it?

Well thank goodness someone made a package for that. Just put the following command to change the margins.

\usepackage[left=A,top=B,right=C,bottom=D]{geometry}

You may omit the margins that you do not care about its size. So if you want you can do this:

\usepackage[left=A]{geometry}

Geometry is much more powerful than that so if you want to read more you only have to go here.



Another little thing if you want to change the size of your default font just add this to your \documentclass

\documentclass[12pt]{report, book, etc}

Finally to end today's post I will tell you about one last command to make your life easier.

\setcounter{secnumdepth}{-1}

What this little beauty does is to remove the numbering from the chapters, sections, etc. Your document only has the different sections and still appears in the table of contents.


I hope this little tips may be of some help to someone.

No hay comentarios: