Friday, March 09, 2007

Using LaTeX in Your Blog

Here is an interesting tool to input LaTaX in your blog: LINK

Wednesday, February 28, 2007

Gmail keyboard Shortcut

Firefox + Gmail is a good solution to mail, better than Windows Mail, Outlook, and Mozilla Thunderbird. Mac Mail is the best but I lost my mac.

With those shortcut, you can mange Gmail efficiently. (Sorted by my usage.)
  • g i go to inbox
  • x select conversation
  • s star
  • y archive
  • c compose
  • / search
  • g a go to all mail
  • g s go to starred mail
  • o open
  • u return conversation list
  • m mute
  • ! report spam
  • r reply
  • a reply all
  • f forward
  • k move to newer conversation
  • j move to older converstation
  • n next message
  • p previous message

EMacs+AUCTex

This is the best solution for writing Latex. There is a fundamental question for all latex editors: how to jump between latex source file and output dvi/pdf file? In Mac, TexShop provides a simple and good solution: Apple + CLICK will try to match locations of source file and pdf file. Lyx and Texmacs are WYSIWYM editors. The price you pay is the slow typing speed (the desirable typing speed will simulate your thinking) and difficulty of collaboration. Preview-latex, a built-in package of AUCtex, strikes a balance. Let me copy the following paragraph from preview-latex manual:

WYSIWYG (what you see is what you get) sometimes is considered all
the rage, sometimes frowned upon. Do we really want it? Wrong
question. The right question is _what_ we want from it. Except when
finetuning the layout, we don't want to use printer fonts for on-screen
text editing. The low resolution and contrast of a computer screen
render all but the coarsest printer fonts (those for low-quality
newsprint) unappealing, and the margins and pagination of the print are
not wanted on the screen, either. On the other hand, more complex
visual compositions like math formulas and tables can't easily be taken
in when seen only in the source. preview-latex strikes a balance: it
only uses graphic renditions of the output for certain, configurable
constructs, does this only when told, and then right in the source code.
Switching back and forth between the source and preview is easy and
natural and can be done for each image independently. Behind the scenes
of preview-latex, a sophisticated framework of other programs like
`dvipng', Dvips and Ghostscript are employed together with a special
LaTeX style file for extracting the material of interest in the
background and providing fast interactive response.

Wednesday, November 15, 2006

A New Version of AFEM@matlab released!

In this new version:

1. Many not so efficient commands are replaced by more efficient ones.

2. More comments are added.

3. A new test example Lbig is added. In this example, the maximal degree of freedom is about 110,000. It costs only 60 sec on a Pentium IV 1.4GHz desktop PC.

4. Corrections made according to the M-Lint suggestions.


To download the package, go to:

Matlab Central File Exchange

M-files Database.

Friday, October 20, 2006

AFEM@matlab

AFEM@matlab is a MATLAB package of adaptive finite element methods (AFEMs) for stationary and evolution partial differential equations in two spatial dimensions. It contains robust, efficient, and easy-following codes for the main building blocks of adaptive finite element methods. This will benefit not only finite element method education but also future research and
method development.

The aim of AFEM@matlab is to implement main blocks of AFEMs using MATLAB. It is in the sprit to the ``Ten digit, five seconds, and one page" For the easy of communication and education, our main algorithm will be written in one page long using compact data structures with useful and well laid-out comments. It is good for the academics and it opens the doors wider to non-academics. In spite of its brevity, the package is by no means a ``toy" software. All the codes are written and optimized using MATLAB's vectored addressing and built-in functions. Preliminary numerical tests show that our program can solve a middle size problem (about 10,000 unknowns) in seconds on a desktop PC.

We are still working on this project to extend the package for other problems. To download the package, go to:

Matlab Central File Exchange

M-files Database.

Here is the bib term if you need to cite:

@techreport{Chen.L;Zhang.C2006,
Author = {Long Chen and Chen-Song Zhang},
Institution = {University of Maryland at College Park},
Title = {AFEM@matlab: a Matlab package of adaptive finite element methods},
Year = {2006}}

Monday, September 11, 2006

BibTeX

Introduction

BibTeX
is a tool for formatting lists of references used by the LaTeX document preparation system. BibTeX was created by Oren Patashnik and Leslie Lamport in 1985.


Why BibTeX

BibTeX makes it easy to cite sources in a consistent manner, by separating bibliographic information from the presentation of this information. This same principle of separation of content and presentation/style is used by LaTeX itself, by XHTML and CSS, etc.

References and citations are best handled in a consistent way by using BibTeX. In this method, you supply all the relevant information about references in a ``.bib file'' without regard to ordering or style. Then you let BibTeX format all citations and reference entries according to the chosen bibliographic style, and you don't have to sweat all the font and punctuation and ordering details yourself.


Standard Entry Types


@article
An article from a journal or magazine
@book
A book with an explicit publisher
@booklet
A work that is printed and bound, but without a named publisher or sponsoring institution
@conference
The same as inproceedings
@inbook
A part of a book, which may be a chapter (or section or whatever) and/or a range of pages
@incollection
A part of a book having its own title
@inproceedings
An article in a conference proceedings
@manual
Technical documentation
@mastersthesis
A Master's thesis
@misc
Use this type when nothing else fits
@phdthesis
A PhD thesis
@proceedings
The proceedings of a conference
@techreport
A report published by a school or other institution, usually numbered within a series
@unpublished
A document having an author and title, but not formally published

Standard Fields
address
Usually the address of the publisher or other type of institution. For major publishing houses, van Leunen recommends omitting the information entirely. For small publishers, on the other hand, you can help the reader by giving the complete address.
annote
An annotation. It is not used by the standard bibliography styles, but may be used by others that produce an annotated bibliography.
author
The name(s) of the author(s), in the format described in the LaTeX book.
booktitle
Title of a book, part of which is being cited. See the LaTeX book for how to type titles. For book entries, use the title field instead.
chapter
A chapter (or section or whatever) number.
crossref
The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced.
edition
The edition of a book---for example, ``Second''. This should be an ordinal, and should have the first letter capitalized, as shown here; the standard styles convert to lower case when necessary.
editor
Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the book or collection in which the reference appears.
howpublished
How something strange has been published. The first word should be capitalized.
institution
The sponsoring institution of a technical report.
journal
A journal name. Abbreviations are provided for many journals.
key
Used for alphabetizing, cross referencing, and creating a label when the ``author'' information is missing. This field should not be confused with the key that appears in the cite command and at the beginning of the database entry.
month
The month in which the work was published or, for an unpublished work, in which it was written. You should use the standard three-letter abbreviation, as described in Appendix B.1.3 of the LaTeX book.
note
Any additional information that can help the reader. The first word should be capitalized.
number
The number of a journal, magazine, technical report, or of a work in a series. An issue of a journal or magazine is usually identified by its volume and number; the organization that issues a technical report usually gives it a number; and sometimes books are given numbers in a named series.
organization
The organization that sponsors a conference or that publishes a manual.
pages
One or more page numbers or range of numbers, such as 42--111 or 7,41,73--97 or 43++' in this last example indicates pages following that don't form a simple range). To make it easier to maintain Scribe-compatible databases, the standard styles convert a single dash (as in 7-33) to the double dash used in TeX to denote number ranges (as in 7--33). (the `
publisher
The publisher's name.
school
The name of the school where a thesis was written.
series
The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.
title
The work's title, typed as explained in the LaTeX book.
type
The type of a technical report---for example, ``Research Note''.
volume
The volume of a journal or multi-volume book.
year
The year of publication or, for an unpublished work, the year it was written. Generally it should consist of four numerals, such as 1984, although the standard styles can handle any year whose last four nonpunctuation characters are numerals, such as `\hbox{(about 1984)}'.

A Simple Example

Suppose we have a bib database mybib.bib generated with the following item:

@Book{hicks2001,
author = "Michael {von Hicks III} ",
title = "Design of a Carbon Fiber Composite Grid Structure for the
GLAST
Spacecraft Using a Novel Manufacturing Technique",
publisher = "Stanford Press",
year = 2001,
address = "Palo Alto",
edition = "1st",
isbn = "0-69-697269-4"
}


Then we write this simple test test.tex file:

\documentstyle{article}
\begin{document}
\bibliographystyle{abbrv}
\section{Introduction}

Test my bibliography database: \cite{hicks2001}.

\bibliography{mybib}
\end{document}

With these two files ready, we just need to run in a terminal:
latex test
bibtex test
latex test
latex test

For WinEdt users, you just need texify your test.tex file and
.dvi will be generated automatically.



Bibliography Styles


In the last example, \bibliographystyle{abbrv} specify the style used for this document.
There are many other choices in the standard LaTeX distribution. For more examples, see
http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html.