## Some Latex Templates

1.
IEEE
http://www.ieee.org/pubs/transactions/stylesheets.htm

IEEEtran
http://www.michaelshell.org/tex/ieeetran/
IEEEtran is a collection of software packages I develop and maintain for using the LaTeX typesetting system for IEEE research publications.

2.
Springer
http://www.springer.com/east/home/computer/lncs?SGWID=5-164-7-72376-0

3.
Wiley
http://www.wiley.com/legacy/authors/guidelines/stmguides.html

4.
World Scientific
http://www.worldscientific.com/style/books_style.shtml

5.
SIAM
http://www.siam.org/journals/auth-info.php
http://www.siam.org/books/authors.php

## Some Online Tex Tutorials

1.
LATEX2e 插图指南 (I rated it 4.5/5 stars)
http://www.ctex.org/documents/latex/graphics/

2.
LATEX for Complete Novices
Nicola Talbot

This document is available in Portable Document Format (PDF) either formatted for on-line viewing (341 Pages (6inx4in), 1.9M) or in A4 format for printing (145 Pages, 1.2M). This document is also available in PostScript (A4 paper) (145 Pages, 43M). This document was last modified on: September 6, 2004.

http://theoval.cmp.uea.ac.uk/~nlct/latex/novices/novices.html

3.
Getting Started with LaTeX
By David R. Wilkins
2nd Edition
Copyright David R. Wilkins 1995

http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/

4.
LaTeX for Beginners
http://www.ccrnp.ncifcrf.gov/~toms/latexforbeginners.html

5.

By Edward G.J. Lee 李果正
http://edt1023.sayya.org/tex/latex123/latex123.html

6.
TeX Resources
http://www.math.uiuc.edu/~hildebr/tex/

7.
Hypertext Help with LaTeX
http://www.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/

8.
Help on LaTeX and friends. Henrik Bengtsson, hb@maths.lth.se, 2003-2005
http://www.maths.lth.se/help/latex/

9.
LaTeX 科技排版
http://www.math.ecnu.edu.cn/~latex/

10.
LaTeX 编辑部
http://zzg34b.w3.c361.com/index.htm

11.
LaTeX Related Information
http://theoval.cmp.uea.ac.uk/~nlct/latex/index.html

## Some notes on Paper Size

1.
From http://zhidao.baidu.com/question/13034354.html

1965 年国家标准规定图书杂志的开本为 A 、 B 、 C 三组， A 组是用原整张纸张为 880 毫米× 1230 毫米裁切的， B 组原纸张为 787 毫米× 1092 毫米， C 组原纸张为 695 毫米× 960 毫米。 1982 年， GB788 — 87 强调采用国际标准，目前正在推广中。新标准保留了旧标准中的符合国际标准的 A 系列，同时采用了国际标准 B 系列，淘汰了原标准中的 B 、 C 组两种开本。其目的是为了促进对外贸易和国际交流。我们平时复印时所说的 A4 、 B5 等就是国际标准。

## Some Tips for Latex

1.

\if(0)

text

\fi

2.
Tips and tricks for LaTeX and friends

From http://fauskes.net/nb/latextips/

TeX, LaTeX, BibTeX and friends, are a constant source of joy and frustration. This growing collection of tips and tricks is an attempt to document some of the things I have learned working with these wonderful tools. This page is just one of many similar LaTeX tips and tricks pages on the net. Hopefully you'll find something useful here.

Numbering
Disabling section numbering without removing them from the table of contents
LaTeX enumerates by default all sections. It is possible to disable numbering of a specific section by adding an asterisk (*) after the section command like this:

\section*{Introduction}
\subsection*{Test}However, when you do this, the section is not added to the table of contents. Sometimes you want to disable section numbering but still need to generate a table of contents, or you want to have bookmarks in the generated PDF file. Add this code at the start of your document, and your problem is solved:

% disables chapter, section and subsection numbering
\setcounter{secnumdepth}{-1} Margins
Marginal notes
Notes in the page margins are easily created with the command

\marginpar{marginal note}
Putting stars in the margin
Here's a handy command for displaying a user-specified number of stars in the margin. Useful for ratings and such.

% nstar is a command for drawing n stars in the margin. Useful for ratings.
% Requires the 'ifthen' package
\newcounter{scount} % create counter
\newcommand{\nstar}[1]{%
\setcounter{scount}{#1}% initialize counter
\marginpar{\hfill % move content closer to the main text
\whiledo{\value{scount}>0}
{{\Large{$\star$}}\addtocounter{scount}{-1}}
}
}The stars are not always placed where expected, so some experimentation may be necessary. Here's an example on how to use the \nstar command:

\paragraph{Item A} Regulari quam ti del coalescent \nstar{3}
\paragraph{Item B} Li nov lingua franca va \nstar{2}
\paragraph{Item C} A un Angleso it va \nstar{4}The final result will look like this:

Graphics
How to include graphics in a LaTeX document
Many newcomers to LaTeX find it difficult and confusing to include graphics in LaTeX documents. Common questions are: What format should I use? Why won't my graphics work with PDFLaTeX? What is EPS? Below are a few links to some excellent resources that will answer most of the common questions.

Strategies for including graphics in LaTeX documents
Using Imported Graphics in LaTeX and pdfLaTeX
Graphics for Inclusion in Electronic Documents
Using LaTeX in Matlab graphics
Matlab is a superb tool for advanced plotting of data. It can save graphics in the EPS format, which is perfect for inclusion in LaTeX documents. Matlab has some support for TeX syntax in annotations. However, the result does not look that good and the typography is different from LaTeX's. Fortunately there is a solution to this problem.

LaPrint is a neat Matlab script for saving figures in a LaTeX-friendly format. The script replaces all labels, text and annotations with LaTeX markup, which are subsequently processed by LaTeX. Read all about LaPrint's features in the documentation. Here's a small example of LaPrint in use:

theta = -pi:.1:pi;
y = sin(theta)./cos(theta);
plot(theta,y)
xlabel('$\theta$'); ylabel('$y$')
text(-1,20,'\LaTeX')
set(gca,'XTick',-pi:pi/2:pi)
set(gca,'XTickLabel',{'$-\pi$','$-\frac{\pi}{2}$','0', ...
'$\frac{\pi}{2}$','$\pi$'})
title('$y(\theta) = \frac{\sin \theta}{\cos \theta}$')
laprint(1, 'demofig') % Use LaPrint to save figureThe Matlab code above produces the following figure after some processing by LaTeX.

An interesting alternative to LaPrint is fig2tex. This Matlab script replicates Matlab figures using LaTeX and macros from the PSTricks package.

PDF
Hyperlinks and bookmarks with the hyperref package
One of the nice things about PDF documents is the ability to include hyperlinks and navigation in the document. Hyperref is a package for making documents with live links in PDF and HTML output formats. Here's an example on how to set up hyperref:

\usepackage{hyperref}
\hypersetup{%
pdftitle = {Document title},
pdfkeywords = {pdf, hyperref, bookmarks},
pdfauthor = {Kjell Propell}
}Hyperref has many features for manipulating the generated PDF document. My favourite is the ability to automatically generate tree structured bookmarks from the table of contents. It also inserts hyperlinks to figures, tables and references.

Hyperref defines several useful macros for inserting url's:

Take a look at my \href{http://fauskes.net}{web site}!
See \url{http://www.fauskes.net} for more information. An important thing to remember is that PDF bookmarks don't understand special LaTeX markup. If you use mathematics in for instance a section title, the hyperref will complain. A special macro \texorpdfstring is provided to solve the problem. Example:

else:
f.write("\$\n%s \n\$ \n \\newpage \n" % eq.text)
# delete LaTeX code from the document tree, and replace
# them by image urls.
del eq.text
imgname = "%seq%s%i.png" % (imgpath,sourcefn_base, counter)
et.SubElement(eq,'img',src=imgname, alt='')
counter += 1
# end LaTeX document
f.write('\end{document}')
f.close()
# compile LaTeX document. A DVI file is created
os.system('latex %s' % texfn)
# Run dvipng on the generated DVI file. Use tight bounding box.
# Magnification is set to 1200
cmd = "dvipng -T tight -x 1200 -z 9 -bg transparent " + "-o %seq%s%%d.png %s" % (imgpath , sourcefn_base, sourcefn_base)
os.system(cmd)
# Remove temporary files
os.remove(sourcefn_base+'.tex')
os.remove(sourcefn_base+'.log')
os.remove(sourcefn_base+'.aux')
os.remove(sourcefn_base+'.dvi')
os.chdir(cwd)
# Write processed source document to dest
xhtmltree.write(destfn)
print "Done."
Update: A.M. Kuchling has written a Movable Type plugin, called mt-math, for writing equations in weblog entries. The work is derived from my code. He has added som interesting features to it, such as storing the images in html using the data: URL scheme.
Display issues
A disadvantage with using bitmaps is that they don't scale with your document's text size. If you find the generated equations too large or too small, you can tweak the images with dvipng's -x magnification setting. The inline equations may also look a bit out of place. This issue can be fixed by adjusting the vertical-alignment property of the image with CSS. This is how I style my equations:/* Center block equations */
div.eq {text-align:center;}
/* Align inline equations with parents content area */
span.eq img{vertical-align:text-bottom;}
Concluding remarks
That's it. I can now have fancy equations in my web pages. The technique can also be extended to embed arbitrary LaTeX code, which allows to include EPS graphics and other (La)TeX goodies.

3.
MimeTeX
http://www.forkosh.com/mimetex.html

MimeTeX, licensed under the gpl, lets you easily embed LaTeX math in your html pages.

4.
TTH: the TEX to HTML translator
http://hutchinson.belmont.ma.us/tth/