Linux
My Personal LaTeX Template
Last Updated on Saturday, 17 July 2010 14:56 Written by Mehmet Ali ANIL Monday, 17 May 2010 12:34
Since I use LaTeX in order to prepare my documants for a while, I want to share those who are newcomers into the field, the cluster of code that grew sporadically for couple of years, because of my bad copy - paste habit while working with documents. I will at some time create my own functions, but I don't think that would be anytime soon, since I have other works to do.
Before I begin bombarding you with codes, I use Kile in order to write and compile my code. It is sufficent enough and very user-friendly with its shortcuts and symbol lists. This is only application I could't part within the whole KDE application list. I use Zotero and Mendeley in order to manage my souorces, and I extract BibTex citations from there.
First of all, I have a bunch of packages I load everytime I start a document, regardless of the fact that If I use it or not. This is indeed bad habnit, since, packages tend to create conflicts, but to be frankly, who's going to memorize which package is used for what reason? So this is my header:
Those are pretty self explanatory. I know some may clash, or the ordering might be wrong, but It works anyway.
Then I define two functions:
The first 2 lines is there in order to change the definition that is set for \vec which in reality produces:
in such a way that when \vec is used, it emboldens the symbol used. This bold vector notation can be seen in many books, it is preferred by many modern textbooks.
The other definition, \citemali is a citation style I saw in Reed College's latex standards page, It creates a superscript number, and adds a footnote to the page, printing a non parenthetical citation.
Until the bug is resolved, the ones that load Turkish Babel must add \shorthandoff{=} after \begin{document} since there is a conflict between graphicx, and babel, I suppose.
For formulae, I use align, which gives me more freedom in order to present mathematical relations. The & symbol lets you how these formulas are to be aligned. Latex compiler will try to align all those invisible & characters in a line.
In order to present a figure, I use this codelet, that generates the figure scaled, rotated if necessary, captiones, centered, and positioned rigth in the place it is in the code.
In order to generate a bibliography, I use these commands:
In order to generate a table, I use this code:
Though it is not that latex-worthy in looks, but I have still not found a better one.
And also, I use the savetrees package if I am sure that there will be no constructive criticism, which shrinks the margins. In other words, I also add \usepackage{savetrees} to the header.
The last, and probably the least in importance, for reports, I use this scaled titlepage rather than the minimal titlepage latex generates:
In my opinion, it is worthy to learn about latex, at least try it. Though you lose time at first, you get to find it handy ans much more beautiful, after getting hang of it. It is a better choice for large documents, like theses, since it gives you much freedom about your style and it does not mess up if a correction is made to the document in the middle afterwards.
Good luck to those who get started with LaTeX, and don't hesitate to comment if you would like to reply to this text.


Linux
