繁体   English   中英

乳胶-是否可以将编号为一个制表符空间的方程式从右边缘移开(向左移动)?

[英]Latex — Is there a way to shift the equation numbering one tab space from the right margin (shift towards left)?

我一直在格式化我的论文,但有一个小问题困扰着我。 我使用以下代码对方程式进行排版

\begin{align}
& R=\frac{P^2}{P+S'} \label{eqn:SCS}\\
&\mbox {where} \quad \mbox R = \mbox {Watershed Runoff} \notag\\
&\hspace{0.63in} \mbox P = \mbox{Rainfall} \notag\\
&\hspace{0.63in} \mbox S' = \mbox{Storage in the watershed $=\frac{1000}{CN}-10$ }\notag
\end{align}

我的输出要求是:公式应从左边界开始一个制表符空间公式编号应从右边界开始一个制表符空间

使用上面的代码,我使方程式在正确的地方开始,但没有编号。

任何帮助将不胜感激。

谢谢议员

我能做的最好的。 注意fleqn选项和minipage环境。 如果您一直都需要这样做,则必须相应地重新定义align环境。

\usepackage{amsmath}
\begin{document}

Lorem Ipsum is simply dummy text of the printing and typesetting
industry. 

\begin{minipage}{0.8\textwidth}
\begin{align}
& R=\frac{P^2}{P+S'} \label{eqn:SCS}\\
&\mbox {where} \quad \mbox R = \mbox {Watershed Runoff} \notag\\
&\hspace{0.63in} \mbox P = \mbox{Rainfall} \notag\\
&\hspace{0.63in} \mbox S' = \mbox{Storage in the watershed $=\frac{1000}{CN}-10$ }\notag
\end{align}
\end{minipage}

Lorem Ipsum is simply dummy text of the printing and typesetting
industry. 
\end{document}

编辑

更加优雅和对称的版本:

\documentclass[fleqn]{article}
\usepackage{amsmath}
\makeatletter
\setlength\@mathmargin{0pt}
\makeatother

\begin{document}
\noindent Lorem Ipsum is simply dummy text of the printing and
typesetting
industry. The margins of the quotation environment are indented on the
left and the right. The text is justified at both margins and there is
paragraph indentation. Leaving a blank line between text produces a
new paragraph. 
\begin{quotation}
\begin{align}
& R=\frac{P^2}{P+S'} \label{eqn:SCS}\\
&\mbox {where} \quad \mbox R = \mbox {Watershed Runoff} \notag\\
&\hspace{0.63in} \mbox P = \mbox{Rainfall} \notag\\
&\hspace{0.63in} \mbox S' = \mbox{Storage in the watershed $=\frac{1000}{CN}-10$ }\notag
\end{align}
\end{quotation}
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. The margins of the quotation environment are indented on the
left and the right. The text is justified at both margins and there is
paragraph indentation. Leaving a blank line between text produces a
new paragraph. 
\end{document}

没关系,我一直在使用\\ setlength {\\ mathindent} {0.5in},使我的方程式从左边距开始为1in。 我在工作时按如下方式修改了代码!!! 甜...

\begin{minipage}{5.5in} 
\setlength{\mathindent}{0.0in}
\begin{align} 
& R=\frac{P^2}{P+S'} \label{eqn:SCS}\\ 
&\mbox {where} \quad \mbox R = \mbox {Watershed Runoff} \notag\\ 
&\hspace{0.63in} \mbox P = \mbox{Rainfall} \notag\\ 
&\hspace{0.63in} \mbox S' = \mbox{Storage in the watershed $=\frac{1000}{CN}-10$ }\notag 
\end{align} 
\end{minipage} 

你让我今天一整天都感觉很好!!!!

\\hspace{.63in} brrrr ....

以下代码解决了您的问题。

\newskip \tabspace \tabspace = 3em % Set tab space
\def\eq{\refstepcounter{equation}(\theequation)}% To insert the next number
{
\let\\\cr \tabskip 0pt
\halign to \hsize{\hskip\tabspace$\displaystyle#$\hfil&#\hfil
   \tabskip 0pt plus 1fil &\hfil#\hskip\tabspace\tabskip 0pt\crcr
%%%% Your code %%%%
R=\frac{P^2}{P+S'}\span\omit&\eq\cr
\hbox{where }&$R$  = Watershed Runoff\cr
             &$P$  = Rainfall\cr
             &$S'$ = Storage in the watershed $=\frac{1000}{CN}-10$\cr
%%%%           %%%%
}
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM