多语言展示
当前在线:1982今日阅读:26今日分享:39

LaTex排版技巧:[20]如何跨两栏写长公式

LaTeX作为一个功能强大国际通用的排版软件,它特别适合于数理科学中科技论文、专业书籍排版, LaTeX尤其适合于各种符号公式的编排,其公式排版效果是目前常用的mathtype所不能比拟的。这里将latex的排版技巧按照系列经验的方式与大家分享下,希望对大家有所帮助。本小节关于双栏文章中如何跨两栏写长公式。
工具/原料
1

电脑

2

latex排版软件

方法/步骤
1

第一种方法,由IEEE提供的解决方法,但是这个方式会使得公式浮动到下一页置顶显示。\newcounter{mytempeqncnt}\begin{figure*}[!t]\normalsize\setcounter{mytempeqncnt}{\value{equation}}\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}\setcounter{equation}{\value{mytempeqncnt}}\hrulefill\vspace*{4pt}\end{figure*}

2

第二种方法,使用multicol 来实现,这个方法较贴近平时的使用习惯。\begin{multicols}{2}Bla bla...\end{multicols}\begin{equation}very long equation\end{equation}\begin{multicols}{2}Bla bla...\end{multicols}

3

对于以下显示格式,LATEX里应该如何实现呢?

4

对于上图,其实现代码如下:\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}\begin{cases}\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{cases}\end{equation*}\rightsep%\begin{multicols}{2}Bla bla...\end{multicols}

注意事项

本文是作者根据自己的经验总结

推荐信息