
我有以下方程碼:
\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
.