3

在一个 LaTeX 文件中,我有几个verbatim部分分散在各处。

当我想重新格式化整个文档时,我通常使用gq. 问题是该命令还收集逐字部分的连续行。我不想gq重新格式化我的逐字部分!

重新格式化之前:

This is the
line I want to reformat because is spans on two lines and the
first does not fill to the right.

\begin{verbatim}
$ command1
$ command2
\end{verbatim}

重新格式化后:

This is the line I want to reformat because is spans
on two lines and the first does not fill to the right.

\begin{verbatim} $ command1 $ command2 \end{verbatim}

在 vim 中是否有另一个用于智能TeX 重新格式化的命令?

4

1 回答 1

1

我通常gq}用来重新格式化段落的其余部分。我怀疑如果不编写/使用脚本就不可能做你想做的事。

LaTeX Box不宣传此功能,但如果有人实现它,该脚本将成为此功能的自然归宿。

于 2012-03-27T21:02:05.420 回答