LaTex: 当公式长度超出文本宽度

解决方案:
1. 断行
2. 适量缩小公式间距
3 变小字体

1. 断行:

http://blog.163.com/chen_dawn/blog/static/11250632013789459674/
2. 适量缩小公式间距  微调公式长度,调整空格

有时候,用LATEX 打出的公式,显示出来的长度是,一行还多,多出来的一点串到下一行还太少。很想浓缩成一行显示,简洁美观。这时候就利用微调来完成。

例如。某公式原式为:

% 公式-1

\begin{eqnarray}
\dot{x}(t)=\bar{A}_{i}x(t)+\bar{B}_{i_{1}}x(t)+\bar{B}_{i_{2}}x(t)+\bar{B}_{i_{3}}[a_{i}(t)+b_{i}(t)].
\end{eqnarray}

-----------------------------
LATEX 中空格的距离大致如下:

具体的间隔大小为:
\quad           1em,em代表一个字符宽度
\qquad          2em
\,              3/18em
\:              4/18em
\;              5/18em
\!             -3/18em ,这个比较特殊,不仅不会增加空格,还会把间距给减小1/6个字符,这个有时可以用到,比如输入模的时候||x||,可以用这个把两个|的间距缩写点,这样更加美观。

-----------------------------
我们利用上述的 \!命令加在公式-1中,如加在等号两侧,如加在某些 + 号两侧,来微调,缩短公式长度。

% 公式-2

\begin{eqnarray}
\dot{x}(t)\!=\!\bar{A}_{i}x(t)+\bar{B}_{i_{1}}x(t)+\bar{B}_{i_{2}}x(t)+\bar{B}_{i_{3}}[a_{i}(t)\!+\!b_{i}(t)].
\end{eqnarray}

运行完,是否会发现真的变短了呢?

扩展阅读:http://hi.baidu.com/mhyuycwnspbqswe/item/d8437616e661d1a7feded5d8
3 变小字体

第一种方法:用比较笨的方法,一个一个公式用
\begin{small}
\begin{equation}
\ldots
\end{equation}
\end{small}

第二种方法:
定义新的变量环境
在开始
\newenvironment{sequation}{\begin{equation}\small}{\end{equation}}
演示效果图:
LaTeX技巧156:如何让Latex公式字体变小
演示代码:
\documentclass{article}
\usepackage[includemp,body={398pt,550pt},footskip=30pt,%
            marginparwidth=60pt,marginparsep=10pt]{geometry}
\newenvironment{sequation}{\begin{equation}\small}{\end{equation}}
\newenvironment{tequation}{\begin{equation}\tiny}{\end{equation}}
\begin{document}
\begin{tequation}
  \int_a^b f(x) \mathrm{d}x=A
\end{tequation}
\begin{sequation}
  \int_a^b f(x) \mathrm{d}x=A
\end{sequation}
\begin{equation}
  \int_a^b f(x) \mathrm{d}x=A
\end{equation}
\end{document}
  • 6
    点赞
  • 39
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可以使用`\resizebox`命令将文本框缩放到与表格宽度相同的大小。具体操作步骤如下: 1. 在导言区添加`\usepackage{graphicx}`,调用该包。 2. 在文本框前后分别添加`\resizebox{\linewidth}{!}{...}`命令,其中`\linewidth`表示文本宽度为行宽,`!`表示高度按比例自适应。 例如,以下代码将文本宽度设置为表格宽度,并使文本框内容居中对齐: ```latex \documentclass{article} \usepackage{graphicx} \begin{document} \begin{tabular}{|c|c|} \hline Title 1 & Title 2 \\ \hline \resizebox{\linewidth}{!}{% \centering Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here. Some text here.% } \\ \hline \end{tabular} \end{document} ``` 注意,`\resizebox`命令会按比例缩放文本框的内容,因此可能会影响排版效果。如果需要保持原来的字号和行距,请考虑其他方法,例如自定义表格列格式或使用`\parbox`命令。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值