インライン式の2行目の右揃え

インライン式の2行目の右揃え

アイテム環境内にインライン エクイテーションがあります。問題は、2 行目を右側に揃えることです。どうすればこれを実現できますか?

\documentclass[a4paper,twocolumn]{scrbook}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{enumerate}
\usepackage{amsmath}

\begin{document}

\begin{enumerate}
\item Theoretically, the calculated voltage should be
correspond to the measured voltage. But in practice it is
often \emph{not} the case. There are small deviations. Calculate first
the absolute deviations according to the rule:\\
\medskip{}\\
$\left\langle\text{absolute deviation}\right\rangle = \\ \left\langle\text{calc. value}\right\rangle - \left\langle\text{measured value}\right\rangle$\\
\medskip{}\\
The ,,measured value`` here is of course the ,,measured voltage``.\\
Calculate all absolute deviations and enter the results in the
table.
\item Further steps
\end{enumerate}

\end{document}

ここに画像の説明を入力してください

答え1

LaTeX はワードプロセッサではありません。の使用は、\\明示的に行を終了する必要がある場合に限定する必要があります。

\documentclass[a4paper,twocolumn]{scrbook}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{enumerate}
\usepackage{amsmath}

\setlength{\multlinegap}{0pt}

\begin{document}

\begin{enumerate}
\item Theoretically, the calculated voltage should be
correspond to the measured voltage. But in practice it is
often \emph{not} the case. There are small deviations. Calculate first
the absolute deviations according to the rule:
\begin{multline*}
\langle\text{absolute deviation}\rangle = \\ 
\langle\text{calc.\ value}\rangle - \langle\text{measured value}\rangle
\end{multline*}
The ,,measured value`` here is of course the ,,measured voltage``.

Calculate all absolute deviations and enter the results in the
table.

\item Further steps

\end{enumerate}

\end{document}

また\left\rightその式では役に立たない と も削除しました。

ここに画像の説明を入力してください

calc.\ value文末のピリオドを避けるためにを使用してください。 にすることもできますcalc.\@ value

答え2

コツは、\hfill2 行目の前で を使用することですが、\mbox{}その前に を付けることです。これは、\hfillが行の先頭では機能しないためです。

\documentclass[a4paper,twocolumn]{scrbook}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{enumerate}
\usepackage{amsmath}

\begin{document}

\begin{enumerate}
\item Theoretically, the calculated voltage should be
correspond to the measured voltage. But in practice it is
often \emph{not} the case. There are small deviations. Calculate first
the absolute deviations according to the rule:\\
\medskip{}\\
$\left\langle\text{absolute deviation}\right\rangle = \\ \mbox{}\hfill \left\langle\text{calc. value}\right\rangle - \left\langle\text{measured value}\right\rangle$\\
\medskip{}\\
The ,,measured value`` here is of course the ,,measured voltage``.\\
Calculate all absolute deviations and enter the results in the
table.
\item Further steps
\end{enumerate}

\end{document}

ここに画像の説明を入力してください

関連情報