You are on page 1of 26

MY LATEX FAQ()

(wanggyu@student.dlut.edu.cn)

LATEX

1 . . . . . . . . . . . . . . . . . . .

3
3

2 . . . . . . . . . . . . . . . . . . . .
3 . . . . . . . . . . . . . . . . . . .
4 . . . . . . . . . . . . . . . . .

4
4
4
4

5 . . . . . . . . . . . . . . . . . .
6 . . . . . . . . . . . . . . . . .
7 ? . . . . . . . . . . . . . .

4
4
5
5

8
9
10
11

.
.
.
.

5
5
6
6
6

.
.
.
.

7
7
7
7
8

12
13
14
15

. .
. . . .
. . . . . . . .
.
. . . . . . . . . . .
. . . . .
. .
.
1

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

16 :? . . . . .
17 . . . . .
18 .
19 . . . . . . . . . .
20 . . . . . .
21 ? . . . . . . . . . .
22 . . . . . . . .
23 . . . . . . .

.
.
.
.
.
.
.
.

8
8
8
10
13
13
14
14
15

.
.
.
.
.

15
15
15
15
15
16

.
.
.
.
.
.
.

.
.
.
.
.
.
.

16
16
17
18
18
18
19
19

LATEX LATEX 2 CTEX . . . . . . . . . . .


. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
Winedt. . . . . . . . . . . . .
Winedt. . . . . . . . . . . . . . . .
pdf pdf .
matlab eps . . . . . . .
CTEX . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.

19
19
19
20
21
21
21
21
22
22
22
22

24 .
25 . . . . .
26 LATEX .
26.1 . . . . . . . . . .
27 . . . .

.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

. . . .
. . . .
. . . .
. . . . .
. . . .

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

. . .
. . .
. . .
. . . .
. . .

28 . . . . . . . . . . . . . . . .
29 bst
30 . . . . . . . . . . .
31 . . . . . . . . . . . . .
32 . . . . . . . . . .
33 . . . . . . . . . . . .
34 . . . . . .

35
36
37
38
39
40
41
42
43
44
45

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

46 . . . . 22
47 . . . . . . . . . . . . . . . . . . . 23
48 . . . . . . . . . . 24
J

24
49 . . . . . . . . . . . . . . . . . . . . . . . 24

24
50 ppower4p . . . . . . . . . . . . . . . . . . . . 24
51 pdfscreen. . . . . . . . . . . . . . . 25
52 . . . . . . . . . . . . . . 25

26

A
1

LATEX bookreport article

book

partchaptersectionsubsection


report

partchaptersectionsubsection

article

partsectionsebsection chapter

LATEX
article book
report book report
dlut report
powerpoint slider
slider environment

B
2

\tableofcontents

titletoc

titletoc titlesec
\ titlecontents {chapter}[2.8em]{\color{blue}\sihao\CJKfamily{hei}
\addvspace{1.5ex}}
{\contentslabel{2em}\hspace{1.0em}}{\hspace{2.3em}}
{\color{black}\ titlerule [0.8pc]{.}\contentspage}[\addvspace{0.5ex}]
\ titlecontents {section }[1.5em] {\color{blue}\normalsize\addvspace{1.0ex}}
{\contentslabel{2em}\hspace{0.0em}} {\hspace{3.3em}}
{\color{black}\ titlerule [0.8pc]{}\contentspage}
\ titlecontents {subsection}[2.8em] {\color{blue}\normalsize}
{\contentslabel{0.5em}\hspace{1.0em}} {\hspace{3.3em}}
{\color{black}\ titlerule [0.8pc]{.}\contentspage}

tableofcontents chapter section


subsection subsubsection
chapter section subsection subsubsection
setcounter
\setcounter{tocdepth}{2}

C
5

section

\renewcommand{\thesection}{\Alph{section}}

section
format.tex
6

titlesec titleformat
\ titleformat {\chapter}[hang]{\sanhao\filcenter\CJKfamily{hei}\Large}
{\Large \chaptertitlename}{10em}{}{}
\ titlespacing {\chapter}{0pt}{3ex plus .1ex minus .2ex}
{2.5ex plus .1 ex minus .2ex}
%
\ titleformat {\section}[hang]{\sihao\CJKfamily{hei}}
{\sihao\thesection}{1em}{}{}
\ titlespacing {\section}
{0pt}{1.5ex plus .1ex minus .2ex}{\wordsep}
\ titleformat {\subsection}[hang]{\sihao\CJKfamily{hei}}
{\sihao\thesubsection}{1em}{}{}
\ titlespacing {\subsection}%
{0pt}{1.5ex plus .1ex minus .2ex}{\wordsep}
\ titleformat {\subsubsection}[hang]{\CJKfamily{hei}}
{\thesubsubsection }{1em}{}{}
\ titlespacing {\subsubsection}%
{0pt}{1.2ex plus .1ex minus .2ex}{\wordsep}

format.tex article
chapter
7

\subsection[the title of chapter(section et .)]


{the title of chapter(section et .)\ protect\upcite{keywords}}

D
8

\setlength{\baselineskip}{1.5\baselineskip}

\renewcommand{\baselinestretch}{1.5}

A1A2...

page
\setcounter{page}{1}
\renewcommand{\thepage}{A\arabic{page}}

A1A2...
10

geometry
\usepackage[top=1.7cm,bottom=2cm,left=2.5cm,right=2.1cm,
includehead,includefoot]{geometry}
%

package.tex
LATEX

11

fancyhdr
LATEX


fandyhdr.pdf
F:\ftp\pub\software\officetools\ctex\guide package Chinese version

E
12

\newcommand{\song}{\CJKfamily{song}} %
\newcommand{\fs}{\CJKfamily{fs}} %
\newcommand{\kai}{\CJKfamily{kai}} %
\newcommand{\hei}{\CJKfamily{hei}} %
\newcommand{\li}{\CJKfamily{li}}
%
\newcommand{\you}{\CJKfamily{you}} %
\newcommand{\chuhao}{\fontsize{42pt}{\baselineskip}\selectfont}
\newcommand{\xiaochuhao}{\fontsize{36pt}{\baselineskip}\selectfont}
\newcommand{\yihao}{\fontsize{28pt}{\baselineskip}\selectfont}
\newcommand{\erhao}{\fontsize{21pt}{\baselineskip}\selectfont}
\newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}\selectfont}
\newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}\selectfont}
\newcommand{\sihao}{\fontsize{14pt}{\baselineskip}\selectfont}
\newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}\selectfont}
\newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}\selectfont}
\newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}\selectfont}
\newcommand{\liuhao}{\fontsize{7.875pt}{\baselineskip}\selectfont}
\newcommand{\qihao}{\fontsize{5.25pt}{\baselineskip}\selectfont}

format.tex foramt.tex
13

color
\textcolor [rgb ]{1.0,0.0,0.0}{ It is very important...}

It is very important...
14

listings

\ definecolor {gray}{rgb}{0.8,0.8,0.8}
\ lstset {language=Matlab,basicstyle=\small,frame=none,
backgroundcolor=\color{gray},columns=flexible}

frame none single


format.tex
15

marginpar

hello , where is the marginpar? \marginpar{this is the marginpar}

hello, where is the marginpar?

F
16 :?

:,


caption2:
caption2 :

\renewcommand{\captionlabeldelim}{\ }

:
captinon2

\makeatletter
\def\fnum@figure#1{\figurename\nobreakspace\thefigure
\hspace{1em}}%1em
\def\fnum@table#1{\tablename\nobreakspace\thetable
\hspace{1em}}%1em
\makeatother

caption2
17

this is the
marginpar

9
2.0
Ks
1.5
1.0
0.5
0.0
0

kd 3

1


caption

figure 1
figure
\begin{figure}[h]
\centering
\includegraphics[ scale=0.4]{fig}
\caption{Title in Chinese}
\addtocounter{figure}{1}
\vspace{11pt}
%\SetEnglishCaption
\renewcommand\figurename{Fig}
\caption{English title} \label{f2 1}
\renewcommand\figurename{}
\end{figure}

ccaption

ccaption
\begin{figure}[h]
\centering
\includegraphics[ scale=0.4]{fig}

10
2.0
Ks
1.5
1.0
0.5
0.0
0

kd 3

2
Fig 2 English title
j
1
2

bj
9.00
1.75

cj
0.00875
0.03500

qjmin (M W )
0
0

qjmax M W
60
70

1
Tab 1 English title
\bicaption{Fig(in Chinese)}{Title in Chinese}{Fig}{English title}
\end{figure}

18

1
\begin{figure}[h]
\centering
\hspace{\fill}{\includegraphics[ scale=0.2]{fig}}
\hspace{\fill}{\includegraphics[ scale=0.2]{fig}}
\hspace{\fill}{\includegraphics[ scale=0.2]{fig}}
\hspace{\fill}
\bicaption{Fig(in Chinese)}{Title in Chinese}{Fig}{Multifigures}\label{fig:21}
\end{figure}

2 minipage

11
2.0
Ks
1.5
1.0
0.5
0.0
0

kd 3

3
Fig 3 English title
2.0
Ks

2.0
Ks

2.0
Ks

1.5

1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

0.0
0

kd 3

0.0
0

kd 3

0.0
0

4
Fig 4 Multi-figures
\begin{figure}[h]
\centering
\begin{minipage}{0.4\textwidth}
\centering
\includegraphics[ scale=0.2]{fig}
\bicaption{}{1}{Fig}{Two figures1}\label{fig:21}
\end{minipage}
\ hfill
\begin{minipage}{0.4\textwidth}
\centering
\includegraphics[ scale=0.2]{fig}
\bicaption{}{2}{Fig}{Two figures2}\label{fig:22}
\end{minipage}
\end{figure}

kd 3

12

2.0
Ks

2.0
Ks

1.5

1.5

1.0

1.0

0.5

0.5

0.0
0

0.0
0

kd 3

5 1
Fig 5 Two figures1

kd 3

6 2
Fig 6 Two figures2

3 caption caption
figure figure 1
\begin{figure}[h]
\centering
\subfigure [This is figure a]{\label{ fig :a}
\includegraphics[ scale=0.2]{fig}}
% \ hfill
\hspace{1.5cm}
\subfigure [This is figure b]{\label{ fig :b}
\includegraphics[ scale=0.2]{fig}}
\bicaption{}{}{Fig}{subfigures}\label{fig:sub}
\end{figure}

2.0
Ks

2.0
Ks

1.5

1.5

1.0

1.0

0.5

0.5

0.0
0

kd 3

0.0
0

(a) This is figure a

kd 3

(b) This is figure b

7
Fig 7 subfigures

figure

13

19

\graphicspath{{figures/}}

figures
figures

20

newsgroup
figure
\newcounter{totalfig}

figure chapter
chapter figure chapter figure

\makeatletter
\def\@chapter[#1]#2{\addtocounter{totalfig}{\value{figure}}
\addtocounter{totaltab}{\value{table}}
\ifnum \c@secnumdepth >\m@ne
...
\makeatother

1
\AtEndDocument{\label{lastpage}
\addtocounter{totaltab}{1}
\refstepcounter{totaltab}
\label{totaltab}
\addtocounter{totalfig}{1}
\refstepcounter{ totalfig }
\label{ totalfig }
\clearpage\end{CJK}}

\ref{totaltab}

14

21 ?

slashbox
\usepackage{slashbox}
...
\begin{table}[h]
\centering
\caption {...}\ label{tab23}
\begin{tabular}{c|c|c|c}
% after \\: \ hline or \ cline {col1col2} \cline{col3col4 } ...
\hline
\backslashbox{\(H/L\)}{\(hd\)} & 0.75 & 1 & 1.25 \\\hline
0.03 & 1.0698 & 1.0035 & 0.9878 \\
0.04 & 2 & 3 & 4 \\
0.05 & 2 & 3 & 4 \\
0.067 & 2 & 3 & 4 \\
0.09 & 2 & 3 & 4 \\
\(\ left (\dfrac{H}{L}\right) {max}\) & 2 & 3 & 4 \\\hline
\end{tabular}
\end{table}

2 ...
hd
0.75
1
1.25
HH
H/L
H
0.03
1.0698 1.0035 0.9878
0.04
2
3
4
2
3
4
0.05
2
3
4
0.067
2
3
4
0.09

H
2
3
4
L max

HH
H

22

15

23

G
24

ref
eqref
a=b1
(1). . .

(1)

x dx

(2)

25

amsmath overset

\begin{equation}
a\overset{?}{=}b
\end{equation}

a=b

26 LATEX

26.1

multline
\begin{multline}\label{eqmult}
\dfrac{d\xi}{dt}=u(X 0,Z 0,t)\\
+\left(\dfrac{\partial{u}}{\partial X 0}\right) 0
\int\ left [u(X 0,Z 0,t)+\xi\left(\dfrac{\partial{u}}{\partial{X}}\right) 0
+\eta\left(\dfrac{\partial{u}}{\partial{Z}}\right) 0
+\cdots\right]dt\\
+\left(\dfrac{\partial{u}}{\partial Z 0}\right) 0
\int\ left [v(X 0,Z 0,t)+\xi\left(\dfrac{\partial{v}}{\partial{X}}\right) 0

16

+\eta\left(\dfrac{\partial{v}}{\partial{Z}}\right) 0
+\cdots\right]dt\\
+\cdots\cdots

d
= u(X0 , Z0 , t)
dt

u
u
u
+
u(X0 , Z0 , t) +
+
+ dt
X0 0
X 0
Z 0
Z

v
v
u
v(X0 , Z0 , t) +
+
+ dt
+
Z0 0
X 0
Z 0
+ (3)
27

\mbox{}

\[\mbox{}\quad
\dfrac{p{\left(2\right)} W}{p{\left(1\right)} W}&=&
1\dfrac{1}{4}\dfrac{kH}{kd\cdot\textrm{sh}2kd}
\ left (1+\textrm{ch}2kd\dfrac{3\textrm{ch}2kd}{\textrm{sh}2kd}\right)\]

(2)

pW

(1)

pW

kH
1
=1
4 kd sh2kd

3ch2kd
1 + ch2kd
sh2 kd

H
28

thebibliography
Partl\cite{pa} has proposed that \ldots
\begin{thebibliography}{99}
\bibitem{pa} H.Partl:\emph{German \TeX},TUGboat Volume9, Issue1 (1988)
\end{thebibliography}

Partl [1] has proposed that . . .

17

[1] H. Partl:German TEX,TUGboat Volume 9, Issue 1 (1988)


thebibliography

The followings are referrence ...


\begin{thebibliography}{99}
\bibitem{keyword1} referrence1(formatted)...
\bibitem{keyword2} referrence2(formatted)...
......
\end{thebibliography}

29 bst

bst
myformat.bst bst

1
latex makebst
dbj dbj
bst bst

dbj

[1, 2]
2 dbj
latex *.dbj
bst
[3]
3
bib chinese.bibenglish.bib

18

\bibliographystyle{myformat}
\bibliography{chinese, english}

30

overcite natbib
super cite

upcite
\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}}

format.tex

\newcommand{\upcite}[1]{${\mbox{\scriptsize \cite{#1}}}$}

upcite
cite
\makeatletter
\def\@cite#1#2{\textsuperscript{[{#1\if@tempswa , #2\fi}]}}
\makeatother

Partl

[1]

has proposed that . . .

[1] H. Partl:German TEX,TUGboat Volume 9, Issue 1 (1988)


31

bibliography

\setlength{\itemsep}{0.5mm}

32

19

%%%%%%,%%%%%%%
\makeatletter
\def\@biblabel#1{#1}
\makeatother

%%%%%%,%%%%%%%%
\makeatletter
\def\@biblabel#1{#1.}
\makeatother

33

chapter
titleformat
\ titleformat {\section}[hang]{\centering\sanhao\CJKfamily{hei}}
{\sanhao\CJKfamily{hei}{\chaptertitlename}}{15pt}{}

refs.tex

34

CTEX FAQ
62

I
35 LATEX LATEX 2 CTEX

\LaTeX
\LaTeXe
$\mathbb{C}$\TeX

CTEX amssymb
36

hyperref

20

\ifx\pdfoutput\undefined
\usepackage[dvips]{graphicx}
\usepackage[dvipdfm,
pdfstartview=FitH,
CJKbookmarks=true,
bookmarksnumbered=true,
bookmarksopen=true,
colorlinks =true, %
pdfborder=001, %
citecolor =blue,%
linkcolor =blue
]{hyperref}
\AtBeginDvi{\special{pdf:tounicode GBKEUCUCS2}} % GBK > Unicode
\else
\usepackage[dvipdf,
pdfstartview=FitH,
CJKbookmarks=true,
bookmarksnumbered=true,
bookmarksopen=true,
colorlinks =true, %
citecolor =blue,%
linkcolor =blue
]{hyperref}
\usepackage[pdftex]{graphicx}
\ fi

pdf
package.tex

\href \ref
37

autoref ref

\autoref{eqmult}

Equation 3

autoref

21

38

\url{http ://......}

39

\href{mailto:wanggyu@student.dlut.edu.cn}{wanggyu@student.dlut.edu.cn}

40 Winedt

Winedt tex equationfigure


table Winedt

5.4
Options->Menu Setup ->Popup Menus
ItemsEnvironment, enable, visible,title,
(Ctrl-Alt-E), Ok WinEdt CtrlAlt-E,


http://www.winedt.org
Command Complte Wizard
( install
winedt eq Ctrl-Shitf-Y,
Ctrl-Y Ctrl-Shift-Y.
41 Winedt

Winedt tex
Winedt Tools
Enumerated Lines
tex code
Winedt5.4 Ctrl+

22

42 pdf pdf

adobe arobat
pdf

43 matlab eps

matlab
overpic
zf
matlab overpictxt
epstool.exe matlab work overpictxt
eps
D:\users\xue.dy\BOOKS\MATLAB\math\epsfiles\

eps overpictxt (,0) 0

44 CTEX

\CTeX\texmf\miktex\bin\mo.exe

45

...\ footnote{description of the footnote}


...
...\ footnote[the number of the footnote that used again]

46

author

23

maketitle
123..
\makeatletter
\renewcommand\maketitle{\par
\begingroup
\renewcommand\thefootnote{\@arabic\c@footnote}%
\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
\long\def\@makefntext##1{\parindent 1em\noindent
\hb@xt@1.8em{%
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
\if@twocolumn
\ifnum \col@number=\@ne
\@maketitle
\else
\twocolumn[\@maketitle]%
\ fi
\else
\newpage
\global\@topnum\z@ %
\@maketitle
\ fi
\thispagestyle{plain}\@thanks
\endgroup
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@maketitle\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
}
\makeatother

47
1
2

lineno

\usepackage[pagewise]{lineno}

\linenumbers

\nolinenumbers

24

48

\renewcommand{\thetable}{\arabic{chapter}\arabic{table}}
\renewcommand{\theequation}{\arabic{chapter}\arabic{equation}}
\renewcommand{\thefigure}{\arabic{chapter}\arabic{figure}}

J
49

pdf LATEX
36

K
MS powerpoint
TEX
TEX pdfscreenpdfslidefoilprosper
50 ppower4p

ppower4pJavaJava Runtime Environmenthttp://java.sun.com/Operal


ppoer4p
1ppower4p.edtwinedt
document>new document>WinEdt Macro

Run(ppower4.bat %p\%n.pdf %p\%n1.pdf,%p);

25

ppower4p.edt
C:\CTeX\WinEdt\Exec\MiKTeX

2ppower4p.bat
C:\CTeX\WinEdt\Bin\TeX

@ECHO OFF
set basedir=c:\ctex\texmf\source\latex\ppower4
set javacommand=C:\Program Files\Java\j2re1.4.1 01\bin\java
%javacommand% jar %basedir%\pp4p.jar %1.pdf temp.pdf
call copy temp.pdf %1.pdf
call del temp.pdf

3WinEdt
Menu Setup > Accessories >

LATEX Macro
Exe(%B\Exec\MiKTeX\ppower4p.edt);

pdflatex ppower4p
51 pdfscreen
52

\film [ label=wavetc,width=9cm,height=9cm,poster]{}{Films/wavetc.avi}

multimedia.sty

26

[1] . CTEX
[2] .

FAQ(), 2003

EX 2 . : , 2004

LAT

[3] , , . LATEX 2 . : , 2001

You might also like