Huge Spacing between text

人盡茶涼 提交于 2020-05-14 08:48:12

问题


In the given latex code below:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
\begin{equation*} N_{i}=\sum_{i\ne j} r_{i} \times F_{i}^{j}=\sum_{i\ne j} r_{j} \times F_{i}^{j} \text{()used dummy varialble concept} \end{equation*}
\end{document}

i want spacing between the equation and the text part on right hand side in the given code (as we normally see in any physics book) as am i comfortable on working them and also if the text on right side is more in text i want it to go just below of it and then to start writing other things normally.


回答1:


It sounds that you might be looking for the \tag command? This will push your text to the right-most position on the page.

\begin{equation*}
    N_{i}=\sum_{i\ne j} r_{i} \times F_{i}^{j}=\sum_{i\ne j} r_{j} \times F_{i}^{j} \tag*{()used dummy variable concept}
\end{equation*}

The flalign enviornment can be used to get a similar result:

\begin{flalign*}
   &&N_{i}=\sum_{i\ne j} r_{i} \times F_{i}^{j}=\sum_{i\ne j} r_{j} \times F_{i}^{j} && \text{()used dummy varialble concept}
\end{flalign*}

I'm sure there are lots of other ways to get at what you desire, but it seems that \tag might be closest to what you're looking for.




回答2:


If you want spacing between the equation you can use different spacing commands such as:

  1. \; - a thick space.
  2. : - a medium space.
  3. \, - a thin space.
  4. ! - a negative thin space.

Here is the code for spacing.

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
\begin{equation*} 
N_{i}=\sum_{i\ne j} r_{i} \times F_{i}^{j}=\sum_{i\ne j} r_{j} \times F_{i}^{j \; \; \; \; } \text{()used dummy varialble concept} 
\end{equation*}
\end{document}

If you want to add a linebreak between the equation and the text, then you can use \begin{split} and \end{split}

For example:

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
\begin{equation*} 
\begin{split} 
N_{i}=\sum_{i\ne j} r_{i} \times F_{i}^{j}=\sum_{i\ne j} r_{j} \times F_{i}^{j} \\ \text{()used dummy varialble concept} 
\end{split} 
\end{equation*}
\end{document}


来源:https://stackoverflow.com/questions/61498401/huge-spacing-between-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!