文字上方重疊對齊並插入空格

文字上方重疊對齊並插入空格

我想在方程式上方插入註釋而不破壞該方程式的間距。註釋應左對齊,並以指向第一個符號的箭頭開始。

程式碼

\newcommand{\hookdownleft}{\rotatebox[origin=b]{90}{$\Lsh$}}
\begin{dfn}
$\overset{\hookdownleft \text{family of sets from } \Omega \: 
\rightarrow \: \text{one set from } \Omega}{op} \in \mathcal{O} = 
\set{\text{set operations}}}$
\end{dfn}

輸出

目前的

期望的

想要的

答案1

正如 Barbara Beeton 所指出的,最簡單的解決方案是\mathrlap使用mathtools 裡面\overset 的第一個參數。我\mathstrut在第二個參數中添加了 a ,以確保重疊的東西和方程式主線之間的垂直間距正確:

\documentclass{article}

\usepackage{mathtools, amsthm, amssymb}
\DeclarePairedDelimiter{\set}\{\}
\usepackage{rotating, bigstrut}
    \newcommand{\hookdownleft}{\rotatebox[origin=b]{90}{$\Lsh$}}
\theoremstyle{definition}
\newtheorem{dfn}{Definition}

\begin{document}

\begin{dfn}
$\overset{\mathrlap{\hookdownleft \text{family of sets from } \Omega \:
\rightarrow \: \text{one set from } \Omega}}{op\mathstrut} \in \mathcal{O} =
\set{\text{set operations}}$
\end{dfn}

\end{document} 

在此輸入影像描述

相關內容