LaTeX Techniques

I often use \(\LaTeX\) to compose academic documents, for it provides powerful supply for equation display, entity numbering and bibliography. The layout of the output will always be better than usual WYSIWYG editors. However, the grammar of \LaTeX is very complicated, and there are some obscure usages when achieving certain purposes. Here I write down some practical techniques and experiences that I have gained from using $\LaTeX$ for all these years. I hope that it can be helpful.

WikiBooks is the ultimate \(\LaTeX\) knowledge base for beginners. Its URL is as follows.

Internationalizing LaTeX

LaTeX with Chinese Support

A special $\LaTeX$ distribution, namely XeLaTeX is needed to compose Chinese documents effectively. To enable Chinese support, one needs to install the XeCJK package and load the fonts from the operating system. The code is as follows.


% select fonts
\setCJKmainfont[ItalicFont={楷体}, BoldFont={黑体}]{宋体}
\setCJKmonofont{Adobe Fangsong Std}

It is necessary to change the English prefix in captions into Chinese as well, which can be done using the following code.

% using the caption package to change the name of figures and tables
\usepackage[figurename=图, tablename=表]{caption}

% use the following command to change the title of bibliography

% use the following command to change the caption of code listings

% use the following command to change the name of chapters

Beamer Techniques

Beamer is a powerful tool when creating academic slides. It is a bit tricky to use, though.

Toggle Numbered Captions and Bibliography Items

\setbeamertemplate{bibliography item}{\insertbiblabel}

Disable Buttons in PDF Files

\setbeamertemplate{navigation symbols}{}

Allowing Contents to Span Multiple Pages

Using the allowframebreaks option will allow beamer to do so.


Overlay Control

The following article offers detailed description on overlay control of beamer. It is worth noticing that if the allowframebreaks option of a frame is turned on, then overlay control is disabled on that frame.

Automatically Create a Slide Before Sections