如何合并/统一/合并两个环境?

如何合并/统一/合并两个环境?

我有两个环境(方程式和表格),它们应该彼此靠近。

%!TEX TS-program = xelatex
\documentclass[14pt, a4paper]{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX},Renderer=Basic}
\setmainfont[Ligatures={TeX,Historic}]{Times New Roman}
\usepackage{indentfirst}
\frenchspacing

%%% Tables.
\usepackage{array, booktabs, longtable}
\usepackage{makecell, multirow}
%

%%% Page
\usepackage{extsizes}
\usepackage{geometry}
\geometry{top=20mm, bottom=20mm, left=20mm, right=15mm}

\usepackage{amsmath,amsfonts,amssymb,amsthm,mathtools}

\begin{document}

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

\begin{equation}
\overline{K_p} = \sqrt[n]{\prod K_\textup{chain}},
\end{equation}
%\setlength{\belowdisplayskip}{0pt}
\begin{table}[h]
    \begin{tabular}{llll}
        where & $\overline{K_p}$ & {---} & coefficient of growth; \\
        \addlinespace
        & $K_\textup{chain}$ & {---} & \begin{tabular}[t]{@{}l@{}}chain coefficients of growth;\end{tabular} \\
        \addlinespace
        & $n$ & {---} & \begin{tabular}[t]{@{}l@{}}number of chain coefficients.\end{tabular}
    \end{tabular}
\end{table}

\end{document}

但它们的位置如下 在此处输入图片描述

有时它们之间会出现文字“Lorem Ipsum”。

我需要这两个环境彼此靠近。这样它们之间就没有文本了。

也许存在一个用于结合这两个环境的容器?或者其他什么。

PS 字符串:

\setlength{\belowdisplayskip}{0pt}

我正在使用它来减少环境之间的距离。

答案1

使用gather

%!TEX TS-program = xelatex
\documentclass[14pt, a4paper]{article}
\usepackage{extsizes}
\usepackage{geometry}

\usepackage[english]{babel}
\usepackage{amsmath,amsthm,mathtools}
\usepackage{newtxmath}

\usepackage{fontspec}

\usepackage{array, booktabs, longtable}
\usepackage{makecell, multirow}
\usepackage{indentfirst}

\geometry{top=20mm, bottom=20mm, left=20mm, right=15mm}

\setmainfont{Times New Roman}

\frenchspacing

\begin{document}
Lorem Ipsum is simply dummy text of the printing and typesetting 
industry. Lorem Ipsum has been the industry's standard dummy 
text ever since the 1500s, when an unknown printer took a galley 
of type and scrambled it to make a type specimen book.
\begin{gather}
\overline{K_p} = \sqrt[n]{\prod K_\textup{chain}},
\\[\medskipamount]
\begin{tabular}{llll}
where & $\overline{K_p}$ & {---} & coefficient of growth; \\
\addlinespace
      & $K_\textup{chain}$ & {---} & chain coefficients of growth; \\
\addlinespace
      & $n$ & {---} & number of chain coefficients.
\end{tabular}
\notag
\end{gather}

\end{document}

我重新格式化了您的前言并添加了newtxmath以使数学符号与 Times New Roman 兼容。请注意,您不需要指定TeX默认启用的连字符,并且字体没有Historic连字符。

在此处输入图片描述

答案2

\begin{minipage}[h]{1\textwidth}
\begin{equation}
\overline{K_p} = \sqrt[n]{\prod K_\textup{chain}},
\end{equation}
\begin{tabular}{llll}
    where & $\overline{K_p}$ & {---} & coefficient of growth; \\
    \addlinespace
    & $K_\textup{chain}$ & {---} & \begin{tabular}[t]{@{}l@{}}chain coefficients of growth;\end{tabular} \\
    \addlinespace
    & $n$ & {---} & \begin{tabular}[t]{@{}l@{}}number of chain coefficients.\end{tabular}
\end{tabular}
\end{minipage} 

在此处输入图片描述

相关内容