2

error info:

Illegal parameter number in definition of \reserved@a. ...t{2+\cdots+\sqrt{2}}}}_{n项} , \cdots 收敛.$}

this line's content:

\section{$证明极限:x_{1}=\sqrt{2}, x_{2}=\sqrt{2+\sqrt{2}}, \cdots x_{n}=\underbrace{\sqrt{2+\sqrt{2+\cdots+\sqrt{2}}}}_{n项} , \cdots 收敛.$}

how to understand the error info?

what is "Illegal parameter number" refers to ?

I put it in \section because I want it show in contents.

I think that the Chinese characters is OK in math mode, and math mode in \section is OK too, because I did this many times only this one has error.

3
  • 1
    Just out of idle curiosity: Why do you place a long equation inside a \section instruction?
    – Mico
    Jul 30, 2019 at 20:36
  • 1
    Are you sure about the Chinese characters in math mode?
    – egreg
    Jul 30, 2019 at 20:36
  • Equation in section seems very uncommon :) Jul 30, 2019 at 21:25

2 Answers 2

4

Whatever is the system you're using for Chinese (here I use xeCJK), you need to \protect the fragile command \underbrace.

Anyway, I find it a bad idea to have such a complicated set of formulas in a title. And no, don't use Chinese characters in math mode.

\documentclass{article}
\usepackage[hmargin=1cm]{geometry}
\usepackage{amsmath}
\usepackage{xeCJK}

\begin{document}

\tableofcontents

\section{证明极限: $x_{1}=\sqrt{2}$, $x_{2}=\sqrt{2+\sqrt{2}}$,\ldots\ 
  $x_{n}=\protect\underbrace{\sqrt{2+\sqrt{2+\dots+\sqrt{2}}}}_{n\text{项}}$,\ldots 收敛.}

\end{document}

enter image description here

3

Something like this?

enter image description here

\documentclass{article}
\usepackage{amsmath,geometry}
\begin{document}
$x_{1}=\sqrt{2}$, 
$x_{2}=\sqrt{2+\sqrt{2}}$, \dots, 
$x_{n}=\underbrace{\sqrt{2+\sqrt{2+\dots+\sqrt{2}}}}_{\text{$n$ times}}$, \dots 

{\Large
$x_{1}=\sqrt{2}$, 
$x_{2}=\sqrt{2+\sqrt{2}}$, \dots, 
$x_{n}=\underbrace{\sqrt{2+\sqrt{2+\dots+\sqrt{2}}}}_{\text{$n$ \mdseries times}}$, \dots}
\end{document}


\documentclass{article}
\usepackage{amsmath,geometry}
\begin{document}
$x_{1}=\sqrt{2}$, 
$x_{2}=\sqrt{2+\sqrt{2}}$, \dots, 
$x_{n}=\underbrace{\sqrt{2+\sqrt{2+\dots+\sqrt{2}}}}_{\text{$n$ times}}$, \dots 

{\Large % in lieu of '\section*'
$x_{1}=\sqrt{2}$, 
$x_{2}=\sqrt{2+\sqrt{2}}$, \dots, 
$x_{n}=\underbrace{\sqrt{2+\sqrt{2+\dots+\sqrt{2}}}}_{\text{$n$ \mdseries times}}$, \dots}
\end{document}
1
  • I put it in \section because I want it show in contents Jul 30, 2019 at 20:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .