<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\chapter{ć•°ĺ­¦çŽŻĺ˘}

\TeX\ ĺŽźćś¬ćŻ Knuth ä¸“ä¸şćŽ’ç‰ć•°ĺ­¦ç±»äą¦ç±Ťč€ŚĺĽ€ĺŹ‘çš„ďĽŚäş¦ĺŤłćŽ’ç‰ć•°ĺ­¦ĺ…¬ĺĽŹćŻ \TeX\ ćś€ć“…é•żçš„ä»»ĺŠˇďĽŚčż™äąźćŻć‘ĺŻąć•°ĺ­¦çš„ĺ”Żä¸€ĺ…´č¶Łäş†ă€‚ĺ¸Śćś›ä˝&nbsp;ćŻĺ›&nbsp;ä¸şĺ–ść¬˘ć•°ĺ­¦č€Śĺ–ść¬˘ \TeXă€‚

\section{ä¸¤ç§Ťć¨ˇĺĽŹ}

\TeX\ ć•°ĺ­¦ĺ…¬ĺĽŹćś‰ä¸¤ç§Ťć¨ˇĺĽŹďĽŚä¸€ç§ŤćŻć­Łć–‡ć¨ˇĺĽŹďĽtext modeďĽ‰ďĽŚä¸€ç§ŤćŻćľć‘†ć¨ˇĺĽŹďĽdisplay modeďĽ‰ďĽŚĺś¨ \ConTeXt\ ä¸­ďĽŚč‡Şç„¶äąźćŻĺ¦‚ć­¤ă€‚ĺ˝“ç„¶ďĽŚĺŹŻč˝ä˝&nbsp;č§‰ĺľ—ćľć‘†ć¨ˇĺĽŹčż™ä¸Şç§°č°“ä¸Ťĺ¤źä¸Ąč‚ďĽŚäşŽćŻéšŹäş†ĺ®çš„äż—ç§°ă€ŚčˇŚé—´ć¨ˇĺĽŹă€ŤďĽŚĺą¶ć—&nbsp;ä¸ŤĺŹŻďĽŚč€Śä¸”ĺŽć–‡ć‘äąźĺ¦‚ć­¤ç§°č°“ĺ®ă€‚

ć­Łć–‡ć¨ˇĺĽŹé‡Śçš„ć•°ĺ­¦ĺ…¬ĺĽŹć”ľĺś¨ä¸€ĺŻąçľŽĺ…ç¬¦ĺŹ·äą‹é—´ďĽŚć„Źć€ťćŻćś‰é’±äşşé˝ç˛ľé€šć•°ĺ­¦ă€‚äľ‹ĺ¦‚ \type{$a^2 + b^2 = c^2$} äľżćŻć­Łć–‡ć¨ˇĺĽŹçš„ć•°ĺ­¦ĺ…¬ĺĽŹďĽŚĺ…¶ćŽ’ç‰ç»“ćžśä¸ş $a^2 + b^2 = c^2$ă€‚\TeX\ ć•°ĺ­¦ĺ…¬ĺĽŹçš„čˇŚé—´ć¨ˇĺĽŹćŻć”ľĺś¨ä¸€ĺŻąĺŹŚçľŽĺ…ç¬¦ĺŹ·äą‹é—´ďĽŚäľ‹ĺ¦‚

\starttyping[option=TEX]
$$
\int_0^{+\infty}f(x) {\rm d}x
$$
\stoptyping

\noindent ĺ…¶ćŽ’ç‰ç»“ćžśä¸ş

$$
\int_0^{+\infty}f(x) {\rm d}x
$$

\noindent ä˝†ćŻďĽŚĺś¨ \ConTeXt\ é‡ŚďĽŚčˇŚé—´ć¨ˇĺĽŹĺ»şč®®ç”¨ä»Ąä¸‹ĺ˝˘ĺĽŹçš„čŻ­ćł•

\starttyping[option=TEX]
\startformula
\int_0^{+\infty}f(x) {\rm d}x
\stopformula
\stoptyping
\startformula
\int_0^{+\infty}f(x) {\rm d}x
\stopformula

\noindent č‡łäşŽĺŽźĺ›&nbsp;ä¸şä˝•ďĽŚćłĺż…ä˝&nbsp;ĺ·˛ç»ŹçźĄé“äş†ďĽŚ\ConTeXt\ ĺŻą \type{\startformula ... \stopformula} çŽŻĺ˘çš„čˇŚé—´ĺ…¬ĺĽŹé»č®¤ćŹäľ›äş†ĺ±…ä¸­ĺŻąé˝ä»ĄĺŹŠĺ‰ŤĺŽç©şç™˝ć”ŻćŚă€‚ä¸şä»€äą \ConTeXt\ ä¸ŤĺŻą \type{$$...$$} ćŹäľ›ç±»äĽĽçš„ć”ŻćŚĺ‘˘ďĽźĺ›&nbsp;ä¸ş \ConTeXt\ éś€č¦ä»Ąä¸€ç§Ťç»źä¸€çš„ć–ąĺĽŹćŽ§ĺ¶čˇŚé—´ĺ…¬ĺĽŹĺ‰ŤĺŽçš„ç©şç™˝ĺ¤§ĺ°ŹďĽŚäľ‹ĺ¦‚ć¶é™¤čˇŚé—´ĺ…¬ĺĽŹĺ‰ŤĺŽç©şç™˝ďĽŚĺŹŞéś€

\starttyping[option=TEX]
\setupformulas[spacebefore=0pt,spaceafter=0pt]
\startformula
\int_0^{+\infty}f(x) {\rm d}x
\stopformula
\stoptyping
\setupformulas[spacebefore=0pt,spaceafter=0pt]
\startformula
\int_0^{+\infty}f(x) {\rm d}x
\stopformula

\noindent č‹ĄĺźşäşŽ \type{$$...$$} ć&nbsp;‡č®°ĺ™ĺľéšľĺ®žçŽ°čŻĄć–ąĺĽŹă€‚

\section{ĺ…¬ĺĽŹçĽ–ĺŹ·}

ĺ¦‚ĺŚćŹ’ĺ›ľĺ’Śčˇ¨ć&nbsp;ĽďĽŚčˇŚé—´ć•°ĺ­¦ĺ…¬ĺĽŹäąźćś‰ä¸€ä¸Şć”ľç˝®ĺ‘˝ä»¤ \type{\placeformula}ă€‚äľ‹ĺ¦‚

\starttyping[option=TEX]
\placeformula
\startformula
\int_0^{+\infty}f(x) {\rm d}x
\stopformula
\stoptyping

\placeformula[math-example]
\startformula
\int_0^{+\infty}f(x) {\rm d}x
\stopformula

\ConTeXt\ čˇŚé—´ĺ…¬ĺĽŹć”ŻćŚĺĽ•ç”¨ďĽŚäľ‹ĺ¦‚

\starttyping[option=TEX]
\placeformula[math-example]
\startformula
\int_0^{+\infty}f(x) {\rm d}x
\stopformula
\stoptyping

\noindent ç±»äĽĽćŹ’ĺ›ľĺ’Śčˇ¨ć&nbsp;ĽďĽŚä˝żç”¨ \type{\in[...]} čż›čˇŚĺĽ•ç”¨ă€‚äľ‹ĺ¦‚ \type{\in[math-example]}ďĽŚç»“ćžśä¸şă€Ś\in[math-example]ă€Ťă€‚

\section{ĺ®šç†ĺ’ŚčŻćŽ}

\ConTeXt\ ćśŞćŹäľ›ĺŹŻç›´ćŽĄç”¨äşŽćŽ’ç‰ć•°ĺ­¦ĺ®šç†ĺ’ŚčŻćŽçš„ĺ‘˝ä»¤ďĽŚä˝†ćŻć‘ä»¬ĺŹŻä»Ąĺ€źĺŠ©ćžšä¸ľçŽŻĺ˘ĺ®šäą‰ĺ®ä»¬ă€‚ć‘ä»¬ĺŻąćžšä¸ľçŽŻĺ˘äş‹ĺ®žä¸Šĺą¶ä¸Ťé™Śç”źďĽŚĺ›&nbsp;ä¸şć—©ĺ·˛č§čŻ†čż‡ĺ®çš„ä¸€ä¸Şç‰ąäľ‹ďĽšĺ—čˇ¨ă€‚

ä˝żç”¨ \type{\defineenumeration} ĺŹŻä»Ąĺ®šäą‰ä¸€ç§Ťć–°çš„ćžšä¸ľç‰ąäľ‹ă€‚äľ‹ĺ¦‚

\starttyping[option=TEX]
\defineenumeration[theorem][text=ĺ®šç†]
\stoptyping

ç„¶ĺŽäľżĺŹŻä˝żç”¨čŻĄç‰ąäľ‹ďĽš

\starttyping[option=TEX]
\starttheorem
ĺ‡ˇäşşçš†ćś‰ä¸€ć­»ďĽŚĺ‡ˇäşşçš†éˇ»äľŤĺĄ‰ă€‚
\stoptheorem
\stoptyping

\noindent ç»“ćžśä¸ş

\startblueframedtext
\defineenumeration[theorem][text=ĺ®šç†]
\starttheorem
ĺ‡ˇäşşçš†ćś‰ä¸€ć­»ďĽŚĺ‡ˇäşşçš†éˇ»äľŤĺĄ‰ă€‚
\stoptheorem
\stopblueframedtext

ćŽĄä¸‹ćťĄďĽŚč®©ĺ®šç†ĺşŹĺŹ·ä¸Žĺ®šç†ĺ†…ĺ®ąçš„ç¬¬ä¸€čˇŚĺ¤„äşŽĺŚä¸€čˇŚďĽŚč®©ç‰éť˘ć›´ĺŠ&nbsp;ç´§ĺ‡‘ďĽserriedďĽ‰ďĽš

\starttyping[option=TEX]
\defineenumeration[theorem][text=ĺ®šç†,alternative=serried]
\starttheorem
ĺ‡ˇäşşçš†ćś‰ä¸€ć­»ďĽŚĺ‡ˇäşşçš†éˇ»äľŤĺĄ‰ă€‚
\stoptheorem
\stoptyping

\startblueframedtext
\defineenumeration[theorem][text=ĺ®šç†,alternative=serried]
\starttheorem
ĺ‡ˇäşşçš†ćś‰ä¸€ć­»ďĽŚĺ‡ˇäşşçš†éˇ»äľŤĺĄ‰ă€‚
\stoptheorem
\stopblueframedtext

çŽ°ĺś¨ďĽŚĺŹŞéś€ĺ°†ĺ®šç†çš„ĺ®˝ĺş¦č®ľä¸ş \type{broad} ć– \type{\textwidth}ďĽŚäľżĺŹŻč®©ĺ®šç†çĽ–ĺŹ·ĺ’Śĺ®šç†ĺ†…ĺ®ąä¸Ťč‡łäşŽĺ¦‚ć­¤éš”é‚ďĽŚéˇşäľżĺ°†ĺ®šç†ĺ†…ĺ®ąçš„ĺ­—ä˝“ĺ‡ćŤ˘ä¸şç˛—ä˝“ďĽš

\starttyping[option=TEX]
\defineenumeration[theorem][text=ĺ®šç†,alternative=serried,width=broad,style=\bf]
\starttheorem
ĺ‡ˇäşşçš†ćś‰ä¸€ć­»ďĽŚĺ‡ˇäşşçš†éˇ»äľŤĺĄ‰ă€‚
\stoptheorem
\stoptyping

\noindent ç»“ćžśä¸ş

\startblueframedtext
\defineenumeration[theorem][text=ĺ®šç†,alternative=serried,width=broad,style=\bf]
\starttheorem
ĺ‡ˇäşşçš†ćś‰ä¸€ć­»ďĽŚĺ‡ˇäşşçš†éˇ»äľŤĺĄ‰ă€‚
\stoptheorem
\stopblueframedtext

ç”±äşŽćžšä¸ľçŽŻĺ˘çš†ć”ŻćŚĺĽ•ç”¨ďĽŚĺ›&nbsp;ć­¤ä¸Ščż°ĺ®šäą‰çš„ĺ®šç†ĺŹŻĺ…Ťč´ąç»§ć‰żčŻĄĺŠźč˝ă€‚äľ‹ĺ¦‚

\starttyping[option=TEX]
\starttheorem[ĺŤéť˘çĄžĺ®šç†]
ĺ‡ˇäşşçš†ćś‰ä¸€ć­»ďĽŚĺ‡ˇäşşçš†éˇ»äľŤĺĄ‰ă€‚
\stoptheorem

ĺ¦‚ĺ®šç† \in[ĺŤéť˘çĄžĺ®šç†] ć‰€čż°â€¦â€¦
\stoptyping

\startblueframedtext
\defineenumeration[theorem][text=ĺ®šç†,alternative=serried,width=broad,style=\bf]
\starttheorem[ĺŤéť˘çĄžĺ®šç†]
ĺ‡ˇäşşçš†ćś‰ä¸€ć­»ďĽŚĺ‡ˇäşşçš†éˇ»äľŤĺĄ‰ă€‚
\stoptheorem

ĺ¦‚ĺ®šç† \in[ĺŤéť˘çĄžĺ®šç†] ć‰€čż°â€¦â€¦
\stopblueframedtext

ç±»äĽĽĺś°ďĽŚäąźĺźşäşŽćžšä¸ľçŽŻĺ˘ĺ®šäą‰čŻćŽďĽŚĺŹŞéś€ĺŽ»ćŽ‰ĺşŹĺŹ·ďĽŚĺą¶ĺś¨čŻćŽç»“ĺ°ľĺ±…ĺŹłć”ľç˝® $\square$ ç¬¦ĺŹ·ă€‚äľ‹ĺ¦‚

\starttyping[option=TEX]
\defineenumeration
  [proof]
  [text=čŻćŽ,alternative=serried,width=broad,
   number=no,closesymbol={$\square$}]
\startproof
ĺ›&nbsp;ä¸şäşşçš„ç”źĺ‘˝ćŻćś‰é™çš„ďĽŚä¸şäşşć°‘ćśŤĺŠˇćŻć—&nbsp;é™çš„ă€‚ć‘ä»¬ĺş”ĺ˝“ĺ°†ćś‰é™çš„ç”źĺ‘˝ćŠ•ĺ…Ąĺ°ć—&nbsp;é™çš„ä¸şäşşć°‘ćśŤĺŠˇä¸­ĺŽ»ă€‚
\stopproof
\stoptyping
\startblueframedtext
\defineenumeration
  [proof]
  [text=čŻćŽ,alternative=serried,width=broad,
   number=no,closesymbol={$\square$}]
\startproof
ĺ›&nbsp;ä¸şäşşçš„ç”źĺ‘˝ćŻćś‰é™çš„ďĽŚä¸şäşşć°‘ćśŤĺŠˇćŻć—&nbsp;é™çš„ă€‚ć‘ä»¬ĺş”ĺ˝“ĺ°†ćś‰é™çš„ç”źĺ‘˝ćŠ•ĺ…Ąĺ°ć—&nbsp;é™çš„ä¸şäşşć°‘ćśŤĺŠˇä¸­ĺŽ»ă€‚
\stopproof
\stopblueframedtext

\section{ĺ°Źç»“}

çŽ°ĺś¨ä˝&nbsp;ĺ·˛ç»Źĺźşćś¬ĺ­¦äĽšäş† \ConTeXt\ ć•°ĺ­¦ĺ…¬ĺĽŹćŽ’ç‰ă€‚ä¸Ž \ConTeXt\ ć•°ĺ­¦ćŽ’ç‰ä¸“ĺ®¶ç›¸ćŻ”ďĽŚä˝&nbsp;çĽşäąŹçš„ĺŹŻč˝ä¸»č¦ćŻĺ¦‚ä˝•ç†źç»ĺś°čľ“ĺ…Ąĺ…·ä˝“çš„ć•°ĺ­¦ĺ…¬ĺĽŹă€‚č‹Ąćłĺś¨čż™ć–ąéť˘č˝ćś‰ć‰€ç˛ľčż›ďĽŚĺŹŻĺŹ‚č€ \ConTeXt\ Wiki çš„ă€ŚMathă€Ťéˇµéť˘\cite[math]ă€‚</pre></body></html>