2012年5月29日星期二
关于latex的列举
在<一份不太简短的LATEX2" 介绍> Version 3.20, 09 August, 2001, 书中 2.11.1章节介绍了Itemize, Enumerate, and Description, in page 29. 这个在网上很容易就能下载到. 我不详细写了. 只是想想介绍一下我今天解决的一个小问题.
1, 关于 {itemize}里序号的形式 (这个在书里有介绍): latex默认生成的简单列表, 默认为一个小圆点,..... 而我们在写文章时可能想要一些不一样的列表符号, 比如 -, * 之类的. 我们可以这样写:
\begin{itemize}
\item[-] good morning...
\item[-] good morning....
\end{itemize}
生成的列表即为:
- good morning
- good morning
2, 关于{enumerate}, 这是用于带序号的列表. 默认生成 1,2,3..... 如果想要其他修饰, 如上面的(1) (2)... 或step-1, step2. 需要加载 \usepackage{enumerate} . 然后如下使用:
\begin{enumerate}[step 1]
\item good morning...
\item good morning....
\end{enumerate}
enumerate会自动识别 中括号里的数字标签, 生成的文件表示为
step 1 good morning
step 2 good morning
如果我们在中括号里输入[step i], 那么生成的列表是
step i good morning
step ii good morning
2011年10月5日星期三
LaTeX技巧404:双栏文章中如何跨两栏写长公式(通栏公式)
第一种方法:这是从IEEE摘选出来的输入方式,但是这个方式会使得公式移动到下一页浮动置顶。
\newcounter{mytempeqncnt}
\begin{figure*}[!t]
% ensure that we have normalsize text
\normalsize
% Store the current equation number.
\setcounter{mytempeqncnt}{\value{equation}}
% Set the equation number to one less than the one
% desired for the first equation here.
% The value here will have to changed if equations
% are added or removed prior to the place these
% equations are referenced in the main text.
\setcounter{equation}{5}
\begin{equation}
\label{eqn_dbl_x}
x = 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 + 21+ 23 + 25
+ 27 + 29 + 31
\end{equation}
\begin{equation}
\label{eqn_dbl_y}
y = 4 + 6 + 8 + 10 + 12 + 14 + 16 + 18 + 20+ 22 + 24
+ 26 + 28 + 30
\end{equation}
% Restore the current equation number.
\setcounter{equation}{\value{mytempeqncnt}}
% IEEE uses as a separator
\hrulefill
% The spacer can be tweaked to stop underfull vboxes.
\vspace*{4pt}
\end{figure*}
第二种方法:使用multicol来实现,这个方法较为贴近我们平时的习惯。
\begin{multicols}{2}
Bla bla...
\end{multicols}
%
\begin{equation}
very long equation
\end{equation}
%
\begin{multicols}{2}
Bla bla...
\end{multicols}
有时,我们看到一些论文有如下的显示方式,LaTeX里如何实现呢?

实现代码如下:
\newlength{\halfpagewidth}
\setlength{\halfpagewidth}{\linewidth}
\divide\halfpagewidth by 2
\newcommand{\leftsep}{%
\noindent\raisebox{4mm}[0ex][0ex]{%
\makebox[\halfpagewidth]{\hrulefill}\hbox{\vrule height 3pt}}%
\vspace*{-2mm}%
}
\newcommand{\rightsep}{%
\noindent\hspace*{\halfpagewidth}%
\rlap{\raisebox{-3pt}[0ex][0ex]{\hbox{\vrule height 3pt}}}%
\makebox[\halfpagewidth]{\hrulefill}%
}
使用方法:
\begin{multicols}{2}
Bla bla...
\end{multicols}
%
\leftsep
\begin{equation}
\label{eqn:planar:Hz02}
\left \{\begin{array}{l}
\delta A + \kappa B = 0 \\
(\kappa\sin\kappa d - \gamma\cos\kappa d)A + (\kappa\cos\kappa d + \gamma\sin\kappa d)B = 0
\end{array} \right.
\end{equation}
\rightsep
%
\begin{multicols}{2}
Bla bla...
\end{multicols}
以上几个方法,供大家参考使用。若是你有更好地办法,可以留言,或者发送至latestudio@hotmail.com
\newcounter{mytempeqncnt}
\begin{figure*}[!t]
% ensure that we have normalsize text
\normalsize
% Store the current equation number.
\setcounter{mytempeqncnt}{\value{equation}}
% Set the equation number to one less than the one
% desired for the first equation here.
% The value here will have to changed if equations
% are added or removed prior to the place these
% equations are referenced in the main text.
\setcounter{equation}{5}
\begin{equation}
\label{eqn_dbl_x}
x = 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 + 21+ 23 + 25
+ 27 + 29 + 31
\end{equation}
\begin{equation}
\label{eqn_dbl_y}
y = 4 + 6 + 8 + 10 + 12 + 14 + 16 + 18 + 20+ 22 + 24
+ 26 + 28 + 30
\end{equation}
% Restore the current equation number.
\setcounter{equation}{\value{mytempeqncnt}}
% IEEE uses as a separator
\hrulefill
% The spacer can be tweaked to stop underfull vboxes.
\vspace*{4pt}
\end{figure*}
第二种方法:使用multicol来实现,这个方法较为贴近我们平时的习惯。
\begin{multicols}{2}
Bla bla...
\end{multicols}
%
\begin{equation}
very long equation
\end{equation}
%
\begin{multicols}{2}
Bla bla...
\end{multicols}
有时,我们看到一些论文有如下的显示方式,LaTeX里如何实现呢?

实现代码如下:
\newlength{\halfpagewidth}
\setlength{\halfpagewidth}{\linewidth}
\divide\halfpagewidth by 2
\newcommand{\leftsep}{%
\noindent\raisebox{4mm}[0ex][0ex]{%
\makebox[\halfpagewidth]{\hrulefill}\hbox{\vrule height 3pt}}%
\vspace*{-2mm}%
}
\newcommand{\rightsep}{%
\noindent\hspace*{\halfpagewidth}%
\rlap{\raisebox{-3pt}[0ex][0ex]{\hbox{\vrule height 3pt}}}%
\makebox[\halfpagewidth]{\hrulefill}%
}
使用方法:
\begin{multicols}{2}
Bla bla...
\end{multicols}
%
\leftsep
\begin{equation}
\label{eqn:planar:Hz02}
\left \{\begin{array}{l}
\delta A + \kappa B = 0 \\
(\kappa\sin\kappa d - \gamma\cos\kappa d)A + (\kappa\cos\kappa d + \gamma\sin\kappa d)B = 0
\end{array} \right.
\end{equation}
\rightsep
%
\begin{multicols}{2}
Bla bla...
\end{multicols}
以上几个方法,供大家参考使用。若是你有更好地办法,可以留言,或者发送至latestudio@hotmail.com
2011年10月4日星期二
订阅:
博文 (Atom)