![在 tabularx 环境中将文本制表于方程式旁边](https://linux22.com/image/461046/%E5%9C%A8%20tabularx%20%E7%8E%AF%E5%A2%83%E4%B8%AD%E5%B0%86%E6%96%87%E6%9C%AC%E5%88%B6%E8%A1%A8%E4%BA%8E%E6%96%B9%E7%A8%8B%E5%BC%8F%E6%97%81%E8%BE%B9.png)
我想在 tabularx 环境中在公式后添加对齐文本。我找到了使用align
或的方法alignat
,但在表格中似乎不可能。
这是我目前的情况:
\documentclass{article}
\usepackage[english]{babel}
\usepackage[a4paper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]
{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{indentfirst}
\usepackage{tabularx}
\usepackage{bm}
\usepackage{nicematrix}
\usepackage[colorlinks=true, allcolors=teal]{hyperref}
\usepackage[T1]{fontenc}
\begin{document}
\makeatother
\renewcommand{\arraystretch}{1.5}
\begin{tabularx}{0.9\linewidth}{l@{}c@{}X}
\hypertarget{1.7.1}{\textbf{1.7.1}} & $\quad$ & For every matrix $A$ the matrix
transformation $T_{A} : \mathbb{R}^{n} \rightarrow \mathbb{R}^{m}$ has the following
properties for all vectors $\mathbf{u}$ and $\mathbf{v}$ and for every scalar $k$ :
\end{tabularx}
\begin{tabularx}{0.9\linewidth}{l@{}c@{}X}
$\qquad$ (a) $T_{A} (\mathbf{0}) = \mathbf{0}$ \\
$\qquad$ (b) $T_{A} (k \mathbf{u}) = k T_{A} (\mathbf{u})$ \null\hfill
$\bm{\text{[Homogeneity property]}}$ \\
$\qquad$ (c) $T_{A} (\mathbf{u} + \mathbf{v}) = T_{A} (\mathbf{u}) + T_{A} (\mathbf{v})$
\null\hfill $\bm{\text{[Additivity property]}}$ \\
$\qquad$ (d) $T_{A} (\mathbf{u} - \mathbf{v}) = T_{A} (\mathbf{u}) - T_{A} (\mathbf{v})$
\\
\end{tabularx}
\end{document}
我正在使用\null \hfill
,但看起来很糟糕。如何将文本左对齐,并在公式后留出足够的间距?
我想要的结果:
答案1
像这样吗?观察单一tabularx
环境和定制enumerate
环境的使用情况。
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[a4paper,vmargin=2cm,hmargin=3cm,
marginparwidth=1.75cm]{geometry}
\usepackage{amsmath,amssymb,amsthm}
%\usepackage{enumerate} % don't load both 'enumerate' and 'enumitem'
\usepackage{enumitem}
\newlist{myenum}{enumerate}{1}
\setlist[myenum]{label=(\textit{\alph*}), left=0pt,
align=left, topsep=0pt, itemsep=0pt}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{indentfirst}
\usepackage{tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{bm}
\usepackage{nicematrix}
\usepackage[colorlinks=true, allcolors=teal]{hyperref}
\begin{document}
\noindent
\begin{tabularx}{1\linewidth}{@{} lL @{}}
\hypertarget{1.7.1}{\textbf{1.7.1}} &
For every matrix $A$, the matrix transformation $T_{A}
\colon \mathbb{R}^{n} \rightarrow \mathbb{R}^{m}$ has
the following properties, for all vectors $\mathbf{u},
\mathbf{v}\in\mathbb{R}^n$ and for every scalar $k$:\\
& \begin{myenum}
\item $T_{A} (\mathbf{0}) = \mathbf{0}$
\item \parbox{0.3\textwidth}{$T_{A} (k\mathbf{u}) = kT_{A} (\mathbf{u})$}
\quad [\textbf{Homogeneity property}]
\item \parbox{0.3\textwidth}{$T_{A} (\mathbf{u} + \mathbf{v})
=T_{A} (\mathbf{u}) + T_{A} (\mathbf{v})$}
\quad [\textbf{Additivity property}]
\item $T_{A} (\mathbf{u} - \mathbf{v})
=T_{A} (\mathbf{u}) - T_{A} (\mathbf{v})$
\end{myenum}
\end{tabularx}
\end{document}