dmath 換行過多

dmath 換行過多

我有以下方程碼:

\begin{dmath}
    x \in A - B \leftrightarrow x \in A \textrm{ and } x \not\in B
\end{dmath}

它產生輸出:

在此輸入影像描述

這個方程式其實不需要那麼多換行符,整個方程式可以放在一行。然後我在它周圍放置一個框架以查看方程式的邊界:

在此輸入影像描述

有沒有一種方法可以定義方程式的邊界dmath,這樣它就不會被塞進一個非常小的盒子裡並給定大量的換行符?

答案1

我相信這breqn會帶來更多它解決的問題。預設情況下,每一個中的關係符號dmath標記用於對齊的換行點。那些你不想要的應該隱藏起來。選擇以下方法之一。

\documentclass{article}
\usepackage{amsmath}
\usepackage{breqn}

\begin{document}
\begin{dmath}
    x \in A - B \leftrightarrow x \in A \text{ and } x \notin B
\end{dmath}
\begin{dmath}
    x \hiderel{\in} A - B \leftrightarrow x \hiderel \in A \text{ and } x \hiderel{\notin} B
\end{dmath}
\begin{dmath}
    {x \in A - B} \leftrightarrow {x \in A \text{ and } x \notin B}
\end{dmath}
\end{document}

請注意,\not\in會產生錯誤的符號,\notin應使用;這不取決於breqn.

在此輸入影像描述

相關內容