![如何最小化两个并排示例之间的空间?](https://linux22.com/image/475534/%E5%A6%82%E4%BD%95%E6%9C%80%E5%B0%8F%E5%8C%96%E4%B8%A4%E4%B8%AA%E5%B9%B6%E6%8E%92%E7%A4%BA%E4%BE%8B%E4%B9%8B%E9%97%B4%E7%9A%84%E7%A9%BA%E9%97%B4%EF%BC%9F.png)
对于以下两个示例,我想首先减少 a/b 和示例之间的空格,然后让这两个示例出现在一行中(尽量为会议摘要节省更多空间)。有人能帮忙吗?
\documentclass[12pt]{article}
\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
\usepackage{times} %Times New Roman Font
\usepackage[utf8]{inputenc}
\usepackage{MnSymbol}
%denotation brackets for semantics
%packages for linguistic examples
\usepackage{expex}
\lingset{
aboveglftskip = -.08cm,
aboveexskip = 0 pt,
belowexskip = 0 pt,
belowpreambleskip = 3 pt,
extraglskip = 0 pt,
everygla=,
interpartskip= 2 pt
% numoffset=\parindent
}
\begin{document}
\ex[glhangstyle=none, glwidth=\textwidth]
\begin{minipage}[t]{0.4\linewidth} % Adjusted width
a. \quad
$\lsem \textit{\$} \rsem$\textsuperscript{$c$} = $\lambda$\textit{f}\textsubscript{$vt$}$\lambda$$\sigma$.$\sigma$ $\sqsubseteq$ \{S $\subseteq$ \textit{f} : $\exists$$s$ $\in$ $f$. ($S$ = $s$\textsuperscript{–$\zeta$})\}
\end{minipage}%
\begin{minipage}[t]{0.45\linewidth} % Adjusted width
b. \quad
$\lsem \textnormal{AP} \rsem$\textsuperscript{$c$} = $\lambda$$\sigma$.$\sigma$ $\sqsubseteq$ $Dom$($\langle$$D$\textsubscript{\textsuperscript{–}$H$}, $\succeq$\textsubscript{\textsuperscript{–}$H$} $\rangle$) \& $\nearrow$($\sigma$)
\end{minipage}
\xe
\end{document}
答案1
您明确地在a.
和b.
之后添加了空格\quad
。删除它会有所帮助,但实际上这些表达式太长了,无法按原样放在一行中。您可以使用包中的\resizebox
或调整表达式的大小,使它们适合。可以缩放其内容,使其占据指定的宽度,而应用固定的缩放因子。\scalebox
graphicx
\resizebox
\scalebox
以下是您的代码,添加了其他版本以演示上述所有内容。我还清理了表达式,这样它们就不会不必要地进入和退出数学模式。
\documentclass[12pt]{article}
\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
\usepackage{times} %Times New Roman Font
\usepackage[utf8]{inputenc}
\usepackage{MnSymbol}
%denotation brackets for semantics
%packages for linguistic examples
\usepackage{expex}
\lingset{
aboveglftskip = -.08cm,
aboveexskip = 0 pt,
belowexskip = 0 pt,
belowpreambleskip = 3 pt,
extraglskip = 0 pt,
everygla=,
interpartskip= 2 pt
% numoffset=\parindent
}
\usepackage{graphicx}
\begin{document}
\noindent
Original examples
\ex[glhangstyle=none, glwidth=\textwidth]
\begin{minipage}[t]{0.4\linewidth} % Adjusted width
a. \quad
$\lsem \textit{\$} \rsem$\textsuperscript{$c$} = $\lambda$\textit{f}\textsubscript{$vt$}$\lambda$$\sigma$.$\sigma$ $\sqsubseteq$ \{S $\subseteq$ \textit{f} : $\exists$$s$ $\in$ $f$. ($S$ = $s$\textsuperscript{–$\zeta$})\}
\end{minipage}%
\begin{minipage}[t]{0.45\linewidth} % Adjusted width
b. \quad
$\lsem \textnormal{AP} \rsem$\textsuperscript{$c$} = $\lambda$$\sigma$.$\sigma$ $\sqsubseteq$ $Dom$($\langle$$D$\textsubscript{\textsuperscript{–}$H$}, $\succeq$\textsubscript{\textsuperscript{–}$H$} $\rangle$) \& $\nearrow$($\sigma$)
\end{minipage}
\xe
\\
Stay in math mode, remove \texttt{\string\quad} space after a. and b.:
\ex[glhangstyle=none, glwidth=\textwidth]
\begin{minipage}[t]{0.4\linewidth} % Adjusted width
a.
$\lsem \textit{\$} \rsem^c = \lambda f_{vt} \lambda \sigma . \sigma \sqsubseteq \{\text{S} \subseteq f : \exists s \in f. (S = s^{-\zeta})\}$
\end{minipage}
\begin{minipage}[t]{0.45\linewidth} % Adjusted width
b.
$\lsem \text{AP} \rsem^c = \lambda \sigma . \sigma \sqsubseteq Dom(\langle D_{^{-}H}, \succeq_{^{-}H} \rangle) \text{\&} \nearrow (\sigma)$
\end{minipage}
\xe
\\
Use \texttt{\string\resizebox} so that each example fits within a specified width:
\ex[glhangstyle=none, glwidth=\textwidth]
a.
\resizebox{0.45\linewidth}{!}{
$\lsem \textit{\$} \rsem^c = \lambda f_{vt} \lambda \sigma . \sigma \sqsubseteq \{\text{S} \subseteq f : \exists s \in f. (S = s^{-\zeta})\}$
}
\, % add some separation between sub-examples
b.
\resizebox{0.43\linewidth}{!}{
$\lsem \text{AP} \rsem^c = \lambda \sigma . \sigma \sqsubseteq Dom(\langle D_{^{-}H}, \succeq_{^{-}H} \rangle) \text{\&} \nearrow (\sigma)$
}
\xe
\\
Use \texttt{\string\scalebox} so that the same scaling is applied to both examples:
\ex[glhangstyle=none, glwidth=\textwidth]
a.
\scalebox{0.94}{
$\lsem \textit{\$} \rsem^c = \lambda f_{vt} \lambda \sigma . \sigma \sqsubseteq \{\text{S} \subseteq f : \exists s \in f. (S = s^{-\zeta})\}$
}
\, % add some separation between sub-examples
b.
\scalebox{0.94}{
$\lsem \text{AP} \rsem^c = \lambda \sigma . \sigma \sqsubseteq Dom(\langle D_{^{-}H}, \succeq_{^{-}H} \rangle) \text{\&} \nearrow (\sigma)$
}
\xe
\end{document}
示例显示了来自
- 你的原始代码
- 删除
\quad
空格并清理表达式,如上所述 - (2)中的更改,并使用
\resizebox
指定每个子示例的宽度 - (2)中的改变,并使用
\scalebox
相同的缩放比例对两个子示例进行应用
示例 (2) 和 (3) 还在子示例之间添加了一个小空格,以使它们不会连在一起。