缺失 } 错误

缺失 } 错误

为什么这段代码不能编译?

\usepackage{tikz}
\begin{document}

We will let $P_2\textit{n}+1 = v_0v_1v_2…v_2\textit{n}$ be a path of 
length $2\textit{n}+1$. We will plant an end vertex of a path $P_a$ 
of length \textit{a} to $v_4\textit{i}-3$ and an end vertex of a path 
$P_\textit{a}+2$ of length $\textit{a}+2$ to $v_4\textit{i}-1$ for 
$\textit{i}$ = $1,2,…,\textit{n}$. 

\end{document}

答案1

\documentclass{article}

\begin{document}

We will let $P_{2n+1} = v_0v_1v_2 \dots v_{2n}$ be a path of length
$2n+1$. We will plant an end vertex of a path $P_a$ of length $a$ to
$v_{4i-3}$ and an end vertex of a path $P_{a+2}$ of length $a+2$ to
$v_{4i-1}$ for $i = 1, 2, \dots, n$.

\end{document}

在此处输入图片描述

答案2

这个很好用:

\documentclass{article}

    \begin{document}

    We will let $P_2 n+1 = v_0v_1v_2…v_2 n$ be a path of 
    length $2n+1$. We will plant an end vertex of a path $P_a$ 
    of length $a$ to $v_4i-3$ and an end vertex of a path 
    $P_a+2$ of length $a+2$ to $v_4i-1$ for 
    $i$ = $1,2,\ldots,n$. 

    \end{document}

通过在数学方程式中放置$..$将采用斜体模式。所以你不需要\textit{}

相关内容