<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\startenvironment doc-env
\usemodule[zhfonts]
\definefont[kaiti][name:kaiti]

\usecolors[svg]
%\showgrid
\setupinteraction[state=start,
  focus=standard,
  color=darkblue,
  title={ConTeXt è¹Šå¾„},
  author={æŽå»¶ç‘ž (lyr.m2@live.cn)},
  keyword={TeX, ConTeXt MkIV, ConTeXt LMTX, LuaTeX, LuaMetaTeX}]
% ä¹¦ç­¾
\setupinteractionscreen[option=bookmark]
\placebookmarks[title,chapter,section][chapter]
% ç‰ˆå¼
\setuppapersize[A4][A4]
\setuplayout[backspace=2.5cm,width=16.5cm,
             topspace=1.5cm,header=1.5cm,
             height=27.2cm,footer=1cm]
%\showframe
% æ®µè½é¦–è¡Œç¼©è¿›ã€è¡Œé—´è·
\setupindenting[first,always,2em]
\setupinterlinespace[line=3.7ex] 
% å…³é—­é¡µç&nbsp;ï¼ŒåŽé¢ä¼šåœ¨é¡µçœ‰è®¾ç½®é¡µç&nbsp;
\setuppagenumbering[location=]
% ä¸‘åº¦
%\setuptolerance[horizontal,stretch]
% å›¾ç‰‡ç›®å½•
\setupexternalfigures[directory={./figures}]
% æ&nbsp;‡é¢˜è®¾ç½®
\setupheads[indentnext=yes]
\setuphead[title][incrementnumber=list]
\setuphead
  [title,chapter]
  [style=\bfb,header=empty,footer=empty,before=,after={\blank[2*line]},align=center]
\setuphead[chapter][alternative=inmargin]
\setuphead[subject,section][style=\bfa,before={\blank},after={\blank}]
\setuphead[subsubject,subsection][style=\bf,before={\blank},after={\blank}]
\definehead[TOC][title]
\setuphead[TOC][before={\blank[quarterline]},after={\blank[quarterline]}]
% ç›®å½•åˆ—è¡¨
\setupcombinedlist[content][list={title,chapter,section},criterium=text]
\def\PageNumber#1{\underbars{#1}.}  % ç»™é¡µç&nbsp;å¢žåŠ&nbsp;ä¸‹åˆ’çº¿
\setuplist
  [title]
  [alternative=a,
   before={\blank[halfline]},
   after={\blank[halfline]},
   style=bold,
   pagecommand=\PageNumber,
   pagestyle=smallbold,
   width=fit]
\def\ChapterNumber#1{\doiftext{#1}{ç¬¬ #1 ç«&nbsp;\quad}}  % è‹¥ #1 æ˜¯å­˜åœ¨ï¼Œåˆ™å°†å…¶ä¸­æ–‡åŒ–
\setuplist
  [chapter]
  [alternative=a,
   before={\blank[halfline]},
   after={\blank[halfline]},
   style=bold,
   width=fit,
   pagenumber=no,
   numbercommand=\ChapterNumber]
\def\PageNumber#1{\underbars{#1}.}
\setuplist
  [section]
  [alternative=d,
   style=normal,
   numberstyle=bold, 
   pagecommand=\PageNumber,
   pagestyle=smallitalic]

% é¡µçœ‰ï¼šé€šç”¨
\startsetups HeaderFooter
\setupheadertexts[][pagenumber][pagenumber][]
\setupheader[style=\tfx]
\stopsetups
% é¡µçœ‰ï¼šbody éƒ¨åˆ†
\startsetups BodyHeaderFooter
\def\CurrentChapter{%
  ç¬¬ \headnumber[chapter]\ ç«&nbsp;\kern 1em\getmarking[chapter]%
}
\def\CurrentSection{%
  \headnumber[section]%
  \hbox to 2em{}%
  \getmarking[section]%
}
\setupheadertexts[\CurrentChapter][pagenumber][pagenumber][\CurrentSection]
\setupheader[style=\tfx]
\stopsetups

% è„šæ³¨é‡Œçš„ä¸­æ–‡æ–­è¡Œ
\startsetups footnote:hanzi
\setscript[hanzi]
\stopsetups
\setupnote[footnote][textstyle=\bold,setups={footnote:hanzi}]
\setupnotation[footnote][way=bypage] % æ¥è‡ª wolfgang çš„ tip

% æ±‰åŒ–
\setuplabeltext[en][chapter={ç¬¬ , ç«&nbsp;\kern.5em}]
\setuplabeltext[en][figure={å›¾ }]
\setuplabeltext[en][table={è¡¨ }]
\setupheadtext[en][pubs={\bfc å‚è€ƒæ–‡çŒ®}]
\setupheadtext[en][content={\bfc ç›®å½•}]
%---- åˆ—è¡¨ ----
\setupfloats[indentnext=yes] 
\setupcaptions[style=\tfx, headstyle=\normal, align=center]
%\setupitemize[each][packed,serried,inmargin][margin=2em]
\setupitemize[each][distance=.4em]
\setupinmargin[left,right][style=\tfx]
\definedescription
  [definition]
  [location=top,hang=20,width=broad,indenting=always,style=\ss,headstyle=\bf]
% è¡¨æ&nbsp;¼æ&nbsp;‡é¢˜
\setupcaption
  [table]
  [headstyle=normal,style=small,location=top]

% æŠ„å½•
\setuplinenumbering[style=small]
%\setuptyping[option=color,palet=graypretty,
%	     before={\blank[.5em]\setupinterlinespace[line=1.2em]},
%             after={\blank[.5em]}]
\startuniqueMPgraphic{blue box}
path p, q;
w := \overlaywidth; h := \overlayheight;
p := (3mm, 0) -- (0, 0) -- (0, h) -- (3mm, h);
q := (w - 3mm, 0) -- (w, 0) -- (w, h) -- (w - 3mm, h);
pickup pencircle scaled 2pt;
draw p withcolor \MPcolor{lightsteelblue};
draw q withcolor \MPcolor{lightsteelblue};
\stopuniqueMPgraphic
\defineoverlay[blue box][\uniqueMPgraphic{blue box}]
\defineframedtext
  [blueframe]
  [frame=off,background={blue box},
    offset=0pt,loffset=.5em,roffset=.5em,before={\blank},after={\blank[.95em]}]
\setuptyping
  [before={\startblueframe[width=\textwidth]},after={\stopblueframe},escape=yes]

\startuniqueMPgraphic{blue box2}
path p;
numeric s;
w := \overlaywidth; h := \overlayheight;
p := (0, 0) -- (0, h) -- (w, h) -- (w, 0) -- cycle;
pickup pencircle scaled 2pt;
s := .1 * h;
if s &lt; 2mm:
  s := 2mm;
fi
draw p randomized s withcolor \MPcolor{lightsteelblue};
\stopuniqueMPgraphic
\defineoverlay[blue box2][\uniqueMPgraphic{blue box2}]
\def\bluebox#1{%
  \kern.25em%
  \inframed[frame=off,background={blue box2},offset=0pt,loffset=.25em,roffset=.25em]{#1}%
  \kern.25em%
}
\def\blueframed#1{%
  \kern.25em%
  \framed[frame=off,background={blue box2},offset=0pt,loffset=.25em,roffset=.25em]{#1}%
  \kern.25em%
}
\defineframedtext[blueframedtext][offset=0pt,frame=off,background={blue box2},width=\textwidth]

% çº¢è‰²èƒŒæ™¯æ¡†
\def\redbox#1{%
  \inframed[frame=off,background=color,backgroundcolor=indianred,offset=4pt]{#1}%
}

% ---------- sample ----------------------
\definebuffer[sample]
\definefloat[Sample][Samples]
\setuplabeltext[en][Sample={ç¤ºä¾‹ }]

% å‚æ•°ä¸ºä¸€ä¸ªæ”¾åœ¨é¡µé¢å³ä¾§çš„ç›’å­ï¼ŒåŸºäºŽè¯¥ç›’å­çš„å®½åº¦ï¼Œè®¡ç®—å…¶å·¦ä¾§ç©ºé—´å®½åº¦
\def\defineLeftWidth#1{%
  \newdimen\LeftWidth
  \LeftWidth=\textwidth
  \newdimen\RightObjectWidth
  \RightObjectWidth=\wd#1
  \ifdim\RightObjectWidth&gt;0pt
    \advance\LeftWidth by -\RightObjectWidth
    \advance\LeftWidth by -1em
  \fi
}
\def\sample[#1][#2]#3#4{%
  \setbox\scratchbox\hbox{#4}%
  \defineLeftWidth{\scratchbox}%
  \placeSample[here][#2]{#3}{%
    \hbox to \textwidth{%
      \hbox{\typesample[#1,
                        before={\startblueframe[width=\LeftWidth]},
                        after={\stopblueframe}]}\hss\unhbox\scratchbox}%
  }%
}
\def\simplesample[#1]#2{%
  \setbox\scratchbox\hbox{#2}%
  \defineLeftWidth{\scratchbox}%
  \placeSample[here,none][]{}{%
    \hbox to \textwidth{%
      \hbox{\typesample[#1,
                        before={\startblueframe[width=\LeftWidth]},
                        after={\stopblueframe}]}\hss\unhbox\scratchbox}%
  }%
  \blank[back]
}

% ä¿®æ”¹ MPcode ä»£ç&nbsp;éƒ¨åˆ†é«˜äº®é¢œè‰²
\definestartstop
    [MetapostSnippetName]
    [color=darkblue,
     style=boldface]
\definestartstop
    [MetapostSnippetNamePrimitive]
    [color=darkgreen,
      style=boldface]

\def\BibTeX{B\scale[height=.5em]{IB}\TeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% å‚è€ƒæ–‡çŒ® GB
\input bib-style
\stopenvironment
</pre></body></html>