Thursday, April 9, 2009

latex bibtex name format

For formatting of author names, let’s locate the FUNCTION format.names. You will see inside the function there is something like

"{ff~}{vv~}{ll}{, jj}"$

This governs how a name is formatted. ff stands for first name, vv for von part, ll for last name, and jj for suffix, such as Sr. and Jr. This format says that the first name is followed immediately (separated by only a space but not a line-break) by the von part, which in turn is immediately followed by last name. After the last name comes a comma and a space, then the suffix. As another example, see the acm style:

"{vv~}{ll}{, jj}{, f.}"$

This format indicates that the von part is presented in the front, immediately followed by last name, then a comma, a space and the suffix. First name goes in the very last, followed by a period. Note that ff means to display the first name fully, while f means that only the initial letter of the first name is displayed.

You will notice that in the acm style, all the letters of a name, except the initial letter, are typeset in smallcaps. This is because in the FUNCTION format.authors, there is a line of code

author format.names scapify

where scapify is another function that small-capifies the lower case letters.


Friday, February 27, 2009


One of my last posts was on how to define the width of a column in a table (see here).

The parbox (p), which is used by Latex when you define the column width, will by default align its content on the left. This can be changed, but is a bit tricky.

The keyword is:

\centering or

Raggedleft will align text on the right-hand side, leaving whatever white space is remaining (ragged) on the left.
For a better understanding, let’s define right alignment of the text as a new column type “x”, which can than be used in the very same way as pre-defined column types.
Defining a new column type needs the following package:


and than:


The argument is the width of the column.

Now simply use “x{2cm}” instead of “p{2cm}”, for columns which align text on the right. By changing \raggedleft to \centering, you can align text in the centre.


Nb. & Advantage & Disadvantage\tabularnewline\hline
1 & a & b \tabularnewline\hline
2 & b & a \tabularnewline\hline

An important last thing to mention, you cannot end lines with “\\”, as you defined your own column type. Therefore, I am using \tabularnewline in the example. If you want to save time, you might define your own command as follows:


Or even:


Monday, January 12, 2009

links for latex

Space in LaTeX

pt point (1 in = 72.27 pt)
pc pica (1 pc = 12 pt)
in inch (1 in = 25.4 mm)
bp big point (1 in = 72 bp)
cm centimetre (1 cm = 10 mm)
mm millimetre
dd didot point (1157 dd = 1238 pt)
cc cicero (1 cc = 12 dd)
sp scaled point (65536 sp = 1 pt)

LaTeX will automatically indent paragraphs (with the exception of the first paragraph of a new section). One can prevent LaTeX from indenting a paragraph though by beginning the paragraph with the control sequence \noindent.

Conversely, the control sequence \indent forces LaTeX to indent the paragraph.

%%%%%%% others in MATH mode %%%%%%%%%%%
  • \- LaTeX may hyphenate the word at that point.
  • \; Include a thick space in math mode.
  • \: Include a medium space in math mode.
  • \, Include a thin space in math mode.
  • \! Include a negative thin space in math mode

Saturday, July 26, 2008

USC thesis template

Ask me for the passwd:

Download Link


Tuesday, July 8, 2008

Insert Figures

{\epsfig{figure=pics/TIF/, height=18cm, angle=270}}