gpt4 book ai didi

latex - 如何在双列 latex 中的括号方程中拟合很长的线

转载 作者:行者123 更新时间:2023-12-04 01:02:59 27 4
gpt4 key购买 nike

我有一张双栏纸,我想用以下代码在括号等式中放入长文本:

\begin{equation}
\small
M =\begin{cases*}
1, & some text is in here some text is in here some text is in here some text is in here some text is in here some text is in here \\
0, & otherwise\\
\end{cases*}
\end{equation}

案例一的文本越过该列。我想在列宽的多行中适合案例一的所有文本。

最佳答案

您可以添加 \parbox文本周围合适的宽度:

\documentclass[twocolumn]{article}

\usepackage{mathtools}
\usepackage{lipsum}

\begin{document}

\lipsum[2]

{
\small
\begin{equation}
M =\begin{cases*}
1, & \parbox[t]{5.5cm}{some text is in here some text is in here some text is in here some text is in here some text is in here some text is in here} \\
0, & otherwise\\
\end{cases*}
\end{equation}}

\lipsum[2]


\end{document}

enter image description here

(请注意,最好在 equation 环境之外更改字体大小)

关于latex - 如何在双列 latex 中的括号方程中拟合很长的线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57820567/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com