问题
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:
- \; - a thick space.
- : - a medium space.
- \, - a thin space.
- ! - 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