2

vim でラテックス コードを編集するときgwap、現在の段落を再調整するために入力することがよくあります。残念ながら、段落に数式やその他の同様のラテックス制御コードが含まれている場合、書式設定がすべて混同されます。

たとえば、きれいに正当化された段落を再調整しようとすると

Our network model follows that of Nakajima et
al.~\\cite{nakajima_robustness_2010} which is in turn based on the model of Li
et al.~\\cite{li_yeast_2004}. We define the dynamics of a network through the
following recurrence relation
\\[
X_i^{t+1} = \\left\\{ \\begin{array}{cl}
  1 & \\textrm{if $\\sum_j J_{ij} X_j^t > 0$} \\\\
  0 & \\textrm{if $\\sum_j J_{ij} X_j^t < 0$} \\\\
  \\theta_i & \\textrm{if $\\sum_j J_{ij} X_j^t = 0$}
\\end{array} \\right.
\\]
$X_i^t \\in \\{0, 1\\}$ is the expression state of gene $i$ at time point $t$.
$J_{ij}$ represents the regulatory effect of gene $j$ on gene $i$. $J_{ij} >
0$, $J_{ij} < 0$ and $J_{ij} = 0$  imply activation, repression and the absence
of regulation respectively. $\\theta_i$ is the constitutive expression state of
gene $i$.

その後、私はこの混乱で終わります:

Our network model follows that of Nakajima et
al.~\\cite{nakajima_robustness_2010} which is in turn based on the model of Li
et al.~\\cite{li_yeast_2004}. We define the dynamics of a network through the
following recurrence relation \\[ X_i^{t+1} = \\left\\{ \\begin{array}{cl} 1 &
                              \\textrm{if $\\sum_j J_{ij} X_j^t > 0$} \\\\ 0 &
                       \\textrm{if $\\sum_j J_{ij} X_j^t < 0$} \\\\ \\theta_i &
                       \\textrm{if $\\sum_j J_{ij} X_j^t = 0$} \\end{array}
                   \\right.  \\] $X_i^t \\in \\{0, 1\\}$ is the expression state of
                   gene $i$ at time point $t$.  $J_{ij}$ represents the
                   regulatory effect of gene $j$ on gene $i$. $J_{ij} > 0$,
                   $J_{ij} < 0$ and $J_{ij} = 0$  imply activation, repression
                   and the absence of regulation respectively. $\\theta_i$ is
                   the constitutive expression state of gene $i$.

段落が のようなコードにまたがってはならないことを vim に伝えるにはどうすればよい\[ \] \begin{} \end{}ですか?

ありがとう、ジョン。

4

1 に答える 1

0

段落の概念は、 nroff マクロの古いvi遺産から来ています(それが何であれ :-); 大幅に変更することはできません。最近、正規表現によるカスタム定義をサポートするためのパッチがvim_dev メーリング リストで公開されました。

これまでのところ、代わりに視覚的な選択を使用して問題を回避する必要があります: Vjjjgw. または、 Tex段落用に独自のテキスト オブジェクトを作成することもできます。

于 2013-02-27T16:06:41.603 に答える