我需要使用perl在latex文件中插入textit命令

时间:2017-06-17 07:01:41

标签: perl latex tex

我需要在textit文件中插入LaTeX命令

我的输入文件:

\begin{theorem}
Let $(H_{0})$ and $(H_{1})$ hold. Then, for given $0 \gt r_{1}\gt r_{2}$ and $T \lt 0$, system (1.1) is finite-time stable with respect to $(r_{1}, r_{2}, T)$ if there exist two constants $M\geq \max\{1, \ \max_{i\in J}K_{i}\}$, $\gamma \geq 0$ and a vector $\xi \in \mathbb{R}^{ n },\xi \succ 0$, satisfy the following conditions:

\begin{enumerate}
\item[(i)] $(\mu(t)-\gamma I)\xi\prec 0$, where $\mu(t) = K|W_{a}(t)|F + K(|W_{\alpha}(t)| + |W_{\beta}(t)|)G - \tilde{D}(t), t\geq0$,

\item[(ii)] $MC(\xi)\gt\frac{r_{2}}{r_{1}}e^{-\gamma T}$, where $C(\xi) = \xi^{u}\xi_{l}^{-1}$ denotes the condition number of $\xi$.
\end{enumerate}
\end{theorem}

在上面的内容中,我需要将\textit{}括在正常文本中(非内联Equations\\item文字)

我的输出文件:

\begin{theorem}
`\textit{Let}` $(H_{0})$ `\textit{and}` $(H_{1})$ `\textit{hold. Then, for given}` $0 \gt r_{1}\gt r_{2}$ `\textit{and}` $T \lt 0$, `\textit{system (1.1) is finite-time stable with respect to}` $(r_{1}, r_{2}, T)$ `\textit{if there exist two constants}` $M\geq \max\{1, \ \max_{i\in J}K_{i}\}$, $\gamma \geq 0$ `\textit{and a vector}` $\xi \in \mathbb{R}^{ n },\xi \succ 0$, `\textit{satisfy the following conditions:}`

\begin{enumerate}
\item[(i)] $(\mu(t)-\gamma I)\xi\prec 0$, `\textit{where}` $\mu(t) = K|W_{a}(t)|F + K(|W_{\alpha}(t)| + |W_{\beta}(t)|)G - \tilde{D}(t), t\geq0$,

\item[(ii)] $MC(\xi)\gt\frac{r_{2}}{r_{1}}e^{-\gamma T}$, `\textit{where}` $C(\xi) = \xi^{u}\xi_{l}^{-1}$ `\textit{denotes the condition number of}` $\xi$.
\end{enumerate}
\end{theorem}

首先尝试使用类似的逻辑:

无论我在哪里找到结束的美元$,然后插入文字\textit{的标签 无论我在哪里找到开头的美元$,然后我插入}

第二个逻辑:(拆分$到$和\ begin到\ end equation' s)我们需要考虑的其他事项,因为已经编码的普通文本有\textit{}

 @splitcontent = split /(\$((?:(?!\$).)*)\$|\\begin\{([^\{\}])\}((?:(?!\\end\{\1\}).)*)\\end\{\1\})/, $str;

运行输出:

\begin{corollary}\label{3.4}
Let
$1\leq l\leq n$
1\leq l\leq n


 and
$r, r'\in{\mathbb Z}_{n}$
r, r'\in{\mathbb Z}_{n}


. Then
$V(1, r)\times P(l, r')\cong P(l, r + r')$
V(1, r)\times P(l, r')\cong P(l, r + r')

有人能指导我获得预期的输出,我们将不胜感激。

0 个答案:

没有答案