双美元环境下如何获取\hfill

双美元环境下如何获取\hfill

有人能告诉我如何在双美元环境中获得类似 \hfill 的间距吗?请查看图片以了解我到底想要什么。在此处输入图片描述

答案1

您不需要使用\hfilTeX 原语,而是使用\eqnoTeX 原语:

\def\n||#1||{\mathopen{\Vert}#1\mathclose{\Vert}}

\noindent{\bf Definition.} A normed linear space $A, \n||.||$ over $C$ is said
be a {\it normed algebra}, if $A$ is an algebra and
$$
  \n||xy|| \le \n||x|| \n||y|| \eqno (x, y \in A)
$$

\bye

答案2

这里有两种可能的基于 LaTeX 的解决方案。第一种解决方案使用指令\tag*放置(x,y\in A).在右侧边缘。这种表示法的一个可能的缺点是(x,y\in A).可能会被误解为某种方程式“数字”。因此,第二种解决方案将此元素放置在更靠近显示方程式的其他材料的位置。

在此处输入图片描述

请注意创建了一个名为 的“高级”宏\alg来表示代数。在定义中,\alg设置为使用\mathcal;根据您的偏好和您可能需要满足的符号约定,其他可能的选择是\mathscr\mathfrak\mathsf。(书写$A$可能不足以为应该表示代数的大写字母创建足够的视觉区别。)

\documentclass{report}
\usepackage{mathtools}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\usepackage{amssymb}
\newcommand{\alg}[1]{\mathcal{#1}} % or: \mathsf, \mathfrak, \mathscr
\usepackage{amsthm}
\theoremstyle{definition} % upright (non-italic) text in body of env.
\newtheorem{defn}{Definition}[section]

\begin{document}
\setcounter{chapter}{1} % just for this example
\setcounter{section}{1}
\setcounter{defn}{1}

%% first solution
\begin{defn}
A normed linear space $(\alg{A},\norm{\cdot})$ over $\mathbb{C}$ is said
to be a \emph{normed algebra} if $\alg{A}$ is an algebra and
\[
\norm{xy} \le \norm{x}\norm{y} \tag*{($x,y\in\alg{A}$).}
\]
\end{defn}

\refstepcounter{section} % optional

%% second solution
\begin{defn}
A normed linear space $(\alg{A},\norm{\cdot})$ over $\mathbb{C}$ is said
to be a \emph{normed algebra} if $\alg{A}$ is an algebra and
\[
\norm{xy} \le \norm{x}\norm{y} \quad \forall\ x,y\in\alg{A}\,.
\]
\end{defn}

\end{document} 

答案3

在正确编号的环境中使用\tag*{}是一种“黑客行为”,它会劫持方程编号机制(如果所有方程都在右侧编号,则可以正常工作)。

对于更通用的解决方案,在 LaTeX 中显示方程式的方法是使用flalign环境,它也适用于左数字方程:

在此处输入图片描述

列与通常一样用 分隔&,第一列与最左侧对齐,最后一列与最右侧对齐(与使用 效果相同\hfill)。

这是上图的代码

\documentclass[leqno]{article}
\usepackage{mathtools}
\usepackage{amsthm,amssymb}
\theoremstyle{definition}
\numberwithin{equation}{section}
\newtheorem{definition}[equation]{Definition}

\begin{document}

\section{Definitions}

\begin{definition}
A normed linear space $(A, \lVert {\cdot} \rVert)$ over $\mathbb{C}$ is said
to be a \emph{normed algebra} if $A$ is an algebra and
\begin{flalign*}
&& \lVert xy \rVert \leq \lVert x \rVert \lVert y \rVert && (x, y \in A).
\end{flalign*}
\end{definition}

You can also remove the asterisk to get a numbered equation.

\begin{definition}
A normed linear space $(A, \lVert {\cdot} \rVert)$ over $\mathbb{C}$ is said
to be a \emph{normed algebra} if $A$ is an algebra and
\begin{flalign}
\label{normedalgebra}
&& \lVert xy \rVert \leq \lVert x \rVert \lVert y \rVert && (x, y \in A).
\end{flalign}
\end{definition}

The condition (\ref{normedalgebra}) is called XYZ.

\end{document}

相关内容