<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\chapter{ç›’å­}

åœ¨ \in[item-sym-diy] èŠ‚ä¸­ï¼Œä½&nbsp;å·²ç»è§è¿‡ç›’å­äº†ï¼Œåªæ˜¯é‚£æ—¶å¯èƒ½ä½&nbsp;è¿˜ä¸çŸ¥å…¶ç©¶ç«Ÿï¼Œæœ¬ç«&nbsp;å°†æ­å¼€å®ƒä»¬çš„ä¸€äº›ç«¯å€ªã€‚ä¹Ÿæœ‰å¯èƒ½ä½&nbsp;æ—©å·²é’»ç&nbsp;”è¿‡ Knuth çš„ã€ŠThe \TeX\ Bookã€‹ï¼Œå¯¹ç›’å­çš„ç&nbsp;”ç©¶ä¹‹æ·±å·²ç»è®©æˆ‘æœ›é£Žè€Œæ‹œï¼Œä½†æ˜¯æœªå¿…ç†Ÿæ‚‰ \ConTeXt\ çš„ç›’å­ï¼Œæ•…è€Œæœ¬ç«&nbsp;ä»æœ‰éƒ¨åˆ†å†…å®¹å€¼å¾—ä¸€ç¹ã€‚

\section{\TeX\ ç›’å­}

å‰é¢å·²ç»å¤šæ¬¡æš—ç¤ºå’Œæ˜Žç¤ºï¼Œ\TeX\ ç³»ç»Ÿæ˜¯ \ConTeXt\ çš„åº•å±‚ï¼ŒäºŒè€…çš„å…³ç³»çŠ¹å¦‚å¼•æ“Žï¼ˆå‘åŠ¨æœºï¼‰å’Œæ±½è½¦çš„å…³ç³»ã€‚å¯¹ \TeX\ å¼•æ“Žä¸æ¯«ä¸æ‡‚ï¼Œå¹¶ä¸å½±å“ä½&nbsp;å­¦ä¹&nbsp;å’Œä½¿ç”¨ \ConTeXt\ æŽ’ç‰ˆä¸€ä»½ç²¾è‡´çš„æ–‡æ¡£ï¼Œä½†æ˜¯æ‡‚ä¸€äº›å¼•æ“Žå±‚é¢å·¥ä½œåŽŸç†ï¼Œæœªå¿…ä¼šæœ‰ç”¨å¤„ï¼Œä½†æ˜¯ä½&nbsp;çŽ°åœ¨ä¹Ÿå¹¶ä¸èƒ½ç¡®å®šå°†æ¥ä¼šä¸ä¼šæˆä¸ºä¸€å \TeX\ é»‘å®¢ï¼Œå¦‚åŒä½&nbsp;ä»Žå‰ä¹Ÿä»Žæœªæƒ³è¿‡æœ‰ä¸€å¤©ä¼šå­¦ä¹&nbsp; \ConTeXtã€‚

åœ¨ \TeX\ ç³»ç»Ÿä¸­ï¼Œç›’å­æ˜¯å¾ˆé‡è¦çš„éƒ¨ä»¶ã€‚ä¾‹å¦‚ï¼Œåœ¨ \ConTeXt\ çš„æŽ’ç‰ˆçš„æ¯ä¸€ä¸ªæ®µè½ï¼Œæ˜¯ä¸€ä¸ªç«–å‘ç›’å­ï¼Œå³ \type{\vbox}ï¼Œè¯¥ç›’å­ä¹‹å†…åˆæœ‰ä¸€äº›æ¨ªå‘ç›’å­ï¼Œå³ \type{\hbox}ï¼Œå®ƒä»¬æ˜¯æ®µè½çš„æ¯ä¸€è¡Œã€‚æˆ‘ä»¬å¯ä»¥ç›´æŽ¥ç”¨è¿™ä¸¤ç§ç›’å­æž„é€&nbsp;ä¸€ä¸ªä¸ç”šè§„æ•´çš„æ®µè½ï¼š

\startsample
\vbox{
  \hbox{ç¦»ç¦»åŽŸä¸Šè‰}\hbox{ä¸€å²ä¸€æž¯è£}\hbox{é‡Žç«çƒ§ä¸å°½}\hbox{æ˜¥é£Žå¹åˆç”Ÿ}
}
\stopsample
\sample[option=TEX][todo-list]{ç«–å‘ç›’å­å’Œæ¨ªå‘ç›’å­}{\externalfigure[11/vbox-and-hbox.pdf]}

æ¨ªå‘ç›’å­å¯ä»¥æŒ‡å®šå®ƒçš„é•¿åº¦ï¼Œç«–å‘ç›’å­å¯ä»¥æŒ‡å®šå®ƒçš„é«˜åº¦ã€‚ä¾‹å¦‚ï¼Œ

\starttyping[option=TEX]
\hbox to 5cm {èµ‹å¾—å¤åŽŸè‰é€åˆ«}
\vbox to 3cm {
  \hbox{ç¦»ç¦»åŽŸä¸Šè‰}\hbox{ä¸€å²ä¸€æž¯è£}\hbox{é‡Žç«çƒ§ä¸å°½}\hbox{æ˜¥é£Žå¹åˆç”Ÿ}
}
\stoptyping

åœ¨ç¤ºä¾‹ \in[rsquare] ä¸­ï¼Œ\type{\hbox} ç”¨äºŽåŒ…å«ä¸€å‰¯ä½¿ç”¨ \METAPOST\ è¯­è¨€ç»˜åˆ¶çš„çŸ¢é‡æ’å›¾ï¼Œå…³é”®ä»£ç&nbsp;å¦‚ä¸‹ï¼š

\starttyping[option=TEX]
\startuseMPgraphic{foo}
... ... ...
\stopuseMPgraphic
\lower.2ex\hbox{\useMPgraphic{foo}}
\stoptyping

\noindent å…¶ä¸­ \type{useMPgraphic} çŽ¯å¢ƒä¸­çš„ \METAPOST\ ä»£ç&nbsp;ä¼šè¢« \type{\useMPgraphic{foo}} æäº¤ç»™ \TeX\ å¼•æ“Žã€‚\TeX\ å¼•æ“Žä¼šè°ƒç”¨ metapost ç¨‹åºå°† \METAPOST\ ä»£ç&nbsp;ç¼–è¯‘æˆ PDF æ&nbsp;¼å¼çš„å›¾ç‰‡ï¼Œç„¶åŽäº¤ç»™ \ConTeXtã€‚æœ€åŽç”± \ConTeXt\ å°†å›¾ç‰‡æ’å…¥åˆ° \type{\useMPgraphic{foo}} æ‰€åœ¨çš„æ¨ªå‘ç›’å­é‡Œã€‚\type{\lower .2ex} å¯ä»¤ä½äºŽå…¶åŽçš„æ¨ªå‘ç›’å­ä¸‹æ²‰ 0.2 exã€‚é•¿åº¦å•ä½ ex ç±»ä¼¼äºŽ emï¼Œä¹Ÿæ˜¯ä¸€ä¸ªç›¸å¯¹å°ºå¯¸ï¼Œå®ƒæ˜¯å½“å‰æ‰€ç”¨å­—ä½“ä¸­çš„å­—æ¯ x å¯¹åº”çš„å­—å½¢çš„é«˜åº¦ã€‚ä»ŽçŽ°åœ¨å¼€å§‹è¦è®°ä½ï¼Œæ¨ªå‘è·ç¦»ç”¨ emï¼Œç«–å‘è·ç¦»ç”¨ exï¼Œä¸è¿‡è¿™åªæ˜¯å»ºè®®ï¼Œå¹¶éž \TeX\ ä¸–ç•Œçš„æ³•å¾‹ã€‚

è¿˜æœ‰ä¸€ç§æ¨ªå‘ç›’å­ \type{\line}ï¼Œå®ƒçš„å®½åº¦æ˜¯å½“å‰æ®µè½çš„å®½åº¦ï¼Œå¯è®©å…¶ä¸­çš„æ–‡å­—å‘ä¸¤è¾¹ä¼¸å±•å¹¶ä¸Žè¾¹ç•Œå¯¹é½ï¼Œä¾‹å¦‚

\starttyping[option=TEX]
\line{\darkred\bf æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚}
\stoptyping
\line{\darkred\bf æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚}

çœ‹åˆ°ä¸Šè¿°ç¤ºä¾‹ï¼Œæƒ³å¿…ä½&nbsp;æƒ³èµ·äº†ä¹‹å‰æˆ‘ä»¬æ›¾åœ¨æ–‡ç«&nbsp;æ&nbsp;‡é¢˜çš„æ&nbsp;·å¼è®¾å®šæ—¶ï¼Œç”¨ \type{{middle,broad}} æŠ‘åˆ¶çš„ \ConTeXt\ è§¦å‘æ±‰å­—é—´éš™çš„ä¼¸é•¿ç‰¹æ€§ï¼Œè¯¥ç‰¹æ€§ä¸Ž\type{\line} çš„æ•ˆæžœéžå¸¸ç›¸ä¼¼ã€‚

ä½¿ç”¨ \type{\hfill} æˆ– \type{\hss} å¯å¯¹æ¨ªå‘ç›’å­é‡Œçš„å†…å®¹è¿›è¡ŒæŒ¤åŽ‹ã€‚ä¾‹å¦‚

\starttyping[option=TEX]
\line{\hfill æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚}
\line{æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚\hfill}
\line{\hfill æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚\hfill}
\line{\hss æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚}
\line{æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚\hss}
\line{\hss æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚\hss}
\stoptyping

\blueframed{
  \vbox{
  \line{\hfill æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚}
  \line{æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚\hfill}
  \line{\hfill æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚\hfill}
  \line{\hss æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚}
  \line{æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚\hss}
  \line{\hss æˆ‘èƒ½åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“ã€‚\hss}
  }
}

\type{\hfill} å’Œ \type{\hss}ï¼Œéƒ½æ˜¯å¯æ—&nbsp;é™ä¼¸ç¼©çš„ç²˜è¿žï¼Œè¿˜æœ‰ä¸€ä¸ªä¼¸ç¼©èƒ½åŠ›å¼±äºŽ \type{\hfill} çš„ \type{\hfil}ã€‚ç«–å‘çš„å¯æ—&nbsp;é™ä¼¸ç¼©çš„ç²˜è¿žæœ‰ \type{\vfil}ï¼Œ\type{\vfill} å’Œ \type{\vss}ã€‚

\section{\ConTeXt\ ç›’å­}

åœ¨ \ConTeXt\ å±‚é¢ï¼Œé€šå¸¸å¾ˆå°‘ä½¿ç”¨ \TeX\ ç›’å­ï¼Œè€Œæ˜¯ä½¿ç”¨ \type{\inframed} å’Œ \type{\framed}â€”â€”å‰è€…æ˜¯åŽè€…çš„ç‰¹ä¾‹ã€‚ä¸Ž \TeX\ ç›’å­ç›¸æ¯”ï¼Œ\ConTeXt\ å±‚é¢çš„ç›’å­å¯ä»¥æ˜¾ç¤ºè¾¹æ¡†ï¼Œä¸”æœ‰éžå¸¸å¤šçš„å‚æ•°å¯ä»¥å®šåˆ¶å®ƒä»¬çš„å¤–è§‚ã€‚

\type{\inframed} ç”¨äºŽæ­£æ–‡ï¼Œå¯ç”¨äºŽç»™ä¸€è¡Œæ–‡å­—å¢žåŠ&nbsp;è¾¹æ¡†ï¼Œä¾‹å¦‚

\starttyping[option=TEX]
\type{\inframed{\type{\inframed{...}}}}
\stoptyping

\noindent ç»“æžœä¸º \inframed{\type{\inframed{...}}}ã€‚å€˜è‹¥ä½¿ç”¨ \type{\framed}ï¼Œä¾‹å¦‚

\starttyping[option=TEX]
\type{\framed{\type{\framed{...}}}}
\stoptyping

\noindent ç»“æžœä¸º \framed{\type{\framed{...}}}ã€‚å¯ä»¥å‘çŽ°ï¼Œ\type{\inframed} æ›´é€‚åˆåœ¨æ­£æ–‡ä¸­ä½¿ç”¨ï¼Œå›&nbsp;ä¸ºå®ƒèƒ½ä¸Žæ–‡å­—åŸºçº¿å¯¹é½ã€‚äº‹å®žä¸Šï¼Œ\type{\inframed} ä¸Ž \type{\framed[location=low]} ç­‰æ•ˆï¼Œæ•…è€Œå‰è€…æ˜¯åŽè€…çš„ç‰¹ä¾‹ã€‚ä¾‹å¦‚

\starttyping[option=TEX]
\framed[location=low]{\type{\framed[location=low]{...}}}
\stoptyping

\noindent ç»“æžœä¸º \framed[location=low]{\type{\framed[location=low]{...}}}ã€‚

å¦‚æžœä¸å¸Œæœ› \type{\framed} æ˜¾ç¤ºè¾¹æ¡†ï¼Œåªéœ€ \type{\framed[frame=off]{...}}ï¼Œä¹Ÿå¯ä»¥å•ç‹¬æ˜¾ç¤ºæŸæ¡è¾¹çº¿ï¼Œå¹¶è®¾å®šè¾¹çº¿ç²—åº¦å’Œé¢œè‰²ï¼š

\starttyping[option=TEX]
\line{
  \framed[frame=off,leftframe=on,rulethickness=4pt,framecolor=red]{foo}
  \framed[frame=off,topframe=on,rulethickness=4pt,framecolor=green]{foo}
  \framed[frame=off,rightframe=on,rulethickness=4pt,framecolor=blue]{foo}
  \framed[frame=off,bottomframe=on,rulethickness=4pt,framecolor=magenta]{foo}
}
\stoptyping
\line{
  \framed[frame=off,leftframe=on,rulethickness=4pt,framecolor=red]{foo}
  \framed[frame=off,topframe=on,rulethickness=4pt,framecolor=green]{foo}
  \framed[frame=off,rightframe=on,rulethickness=4pt,framecolor=blue]{foo}
  \framed[frame=off,bottomframe=on,rulethickness=4pt,framecolor=magenta]{foo}
}

\blank

å¯ä»¥è®¾å®šç›’å­çš„å®½åº¦å’Œé«˜åº¦ï¼Œä¾‹å¦‚å®½ 10cmï¼Œé«˜ 2 cm çš„ç›’å­ï¼š

\starttyping[option=TEX]
\hbox to \textwidth{\hfill\framed[width=10cm,height=2cm]{foo}\hfill}
\stoptyping
\hbox to \textwidth{\hfill\framed[width=10cm,height=2cm]{foo}\hfill}

\section{å¯¹é½}

\ConTeXt\ ç›’å­çš„å†…å®¹é»˜è®¤å±…ä¸­ï¼Œå³ \type{align=center}ï¼Œæ­¤å¤–è¿˜æœ‰ 8 ç§å¯¹é½æ–¹å¼ï¼š

\starttyping[option=TEX]
\line{
  \setupframed[width=1.95cm,height=1.95cm]
  \framed[align={flushleft,high}]{A}
  \framed[align={middle,high}]{A}
  \framed[align={flushright,high}]{A}
  \framed[align={flushright,lohi}]{A}
  \framed[align={flushright,low}]{A}
  \framed[align={middle,low}]{A}
  \framed[align={flushleft,low}]{A}
  \framed[align={flushleft,lohi}]{A}
}
\stoptyping
\line{
  \setupframed[width=1.95cm,height=1.95cm]
  \framed[align={flushleft,high}]{A}
  \framed[align={middle,high}]{A}
  \framed[align={flushright,high}]{A}
  \framed[align={flushright,lohi}]{A}
  \framed[align={flushright,low}]{A}
  \framed[align={middle,low}]{A}
  \framed[align={flushleft,low}]{A}
  \framed[align={flushleft,lohi}]{A}
}

\type{\setupframed} æ‰€ä½œçš„è®¾å®šä¼šå½±å“åˆ°å…¶åŽçš„æ‰€æœ‰ \type{\framed}ï¼Œä½†æ˜¯ä¸ä¼šå½±å“åˆ°å…¶æ‰€å¤„ç¼–ç»„\footnote{è¿˜è®°å¾— \TeX\ ç¼–ç»„å—ï¼Ÿå³ \type[escape=no]{{...}}ã€‚}ä¹‹å¤–çš„ \type{\framed}ã€‚

\section{èƒŒæ™¯}

å¯å°†é¢œè‰²ä½œä¸º \type{\framed} çš„èƒŒæ™¯ã€‚ä¾‹å¦‚

\starttyping[option=TEX]
\inframed
  [background=color,
   backgroundcolor=lightgray,
   width=2cm,
   frame=off]{\bf foo}
\stoptyping

\noindent ç»“æžœä¸º \inframed[background=color,backgroundcolor=lightgray,width=2cm,frame=off]{\bf foo}ã€‚

é€šè¿‡ overlayï¼Œå¯å°†ä¸€äº›ä»£ç&nbsp;ç‰‡æ®µçš„æŽ’ç‰ˆç»“æžœä½œä¸º \type{\framed} çš„èƒŒæ™¯ã€‚ä¾‹å¦‚

\starttyping[option=TEX]
\defineoverlay
  [foo]
  [{\framed[width=3cm,frame=off,bottomframe=on]{}}]
\midaligned{\inframed[background=foo,frame=off]{ä½&nbsp;å¥½å•Šï¼}}
\stoptyping

\defineoverlay
  [foo]
  [{\framed[width=3cm,frame=off,bottomframe=on]{}}]
\midaligned{\inframed[background=foo,frame=off]{ä½&nbsp;å¥½å•Šï¼}}
\blank

é€šè¿‡ä¸Šè¿°ç¤ºä¾‹ï¼ŒçŽ°åœ¨ä½&nbsp;åº”è¯¥èƒ½æœ‰æœ‰ä¸ƒå…«åˆ†æ˜Žç™½ \in[item-sym-diy] èŠ‚ä¸­å¸¦åœˆæ•°å­—æ˜¯å¦‚ä½•å®žçŽ°çš„äº†ï¼Œå…¶å…³é”®ä»£ç&nbsp;å¦‚ä¸‹ï¼š

\starttyping[option=TEX]
\startuseMPgraphic{foo}
  path p;
  p := fullcircle scaled 12pt;
  draw p withpen pencircle scaled .4pt
         withcolor darkred;
\stopuseMPgraphic
\defineoverlay[rsquare][\useMPgraphic{foo}]
\def\fooframe#1{%
  \inframed[frame=off,background=rsquare]{#1}%
}
\stoptyping
\startuseMPgraphic{foo}
  path p;
  p := fullcircle scaled 12pt;
  draw p withpen pencircle scaled .4pt
         withcolor darkred;
\stopuseMPgraphic
\defineoverlay[rsquare][\useMPgraphic{foo}]
\def\fooframe#1{%
  \inframed[frame=off,background=rsquare]{#1}%
}
\noindent æ—&nbsp;éžæ˜¯å°†ä¸€ä¸ªåœ†åœˆå›¾å½¢ä½œä¸º \type{\inframed} çš„èƒŒæ™¯ç½¢äº†ï¼Œè€Œä¸”å¯¹åœˆå†…çš„æ–‡å­—çš„é•¿åº¦æœ‰é™åˆ¶ï¼Œå­—æ•°ç•¥å¤šä¸€äº›ï¼Œä¾¿å‡ºåœˆäº†ï¼Œä¾‹å¦‚ \type{\fooframe{123}}ï¼Œç»“æžœä¸º \fooframe{123}ã€‚ä¸è¿‡ï¼Œåªéœ€å¯¹ä¸Šè¿°ä»£ç&nbsp;ç•¥åŠ&nbsp;ä¿®æ”¹ï¼Œ

\starttyping[option=TEX]
  p := fullcircle scaled \overlaywidth;
\stoptyping
\startuseMPgraphic{foo}
  path p;
  p := fullcircle scaled \overlaywidth;
  draw p withpen pencircle scaled .4pt
         withcolor darkred;
\stopuseMPgraphic
\defineoverlay[rsquare][\useMPgraphic{foo}]
\def\fooframe#1{%
  \inframed[frame=off,background=rsquare]{#1}%
}

\noindent ä¾¿å¯è§£é™¤è¯¥é™åˆ¶ã€‚æŠ€å·§æ˜¯ï¼Œç”¨ overlay çš„å®žé™…å®½åº¦ä½œä¸ºå•ä½åœ†çš„æ”¾å¤§å€æ•°ï¼Œæ•…è€Œå¯ä¿è¯åœ†åœˆçš„ç›´å¾„å³åœˆå†…æ–‡å­—çš„é•¿åº¦ï¼Œä¾‹å¦‚ \type{\fooframe{æˆ‘æœ‰ä¸€ä¸ªå¤§æˆ¿å­}}ï¼Œç»“æžœä¸º \fooframe{æˆ‘æœ‰ä¸€ä¸ªå¤§æˆ¿å­}ã€‚

\section{ç›’å­çš„æ·±åº¦}

å¦‚æžœä½&nbsp;ä»”ç»†è§‚å¯Ÿï¼Œ\ConTeXt\ ç›’å­é‡Œçš„å†…å®¹åœ¨æ°´å¹³æ–¹å‘æ˜¯ç²¾ç¡®å±…ä¸­çš„ï¼Œä½†æ˜¯åœ¨å¹¶éžå¦‚æ­¤ã€‚ä¾‹å¦‚

\starttyping[option=TEX]
\inframed{ajk\framed{æˆ‘çœ‹åˆ°ä¸€æ£µæ¨±æ¡ƒæ&nbsp;‘}}ã€‚
\stoptyping

\noindent ç»“æžœä¸º \inframed{\framed{æˆ‘çœ‹åˆ°ä¸€æ£µæ¨±æ¡ƒæ&nbsp;‘}}ã€‚å¯è§ \type{\inframed} å†…éƒ¨çš„ \type{\framed} çš„åº•éƒ¨æœ‰ç€çœ‹ä¼¼å¤šä½™çš„ç©ºç™½ã€‚ä½¿ç”¨ç›’å­çš„å‚æ•° \type{depth} å¯ä»¥æ¶ˆé™¤è¿™äº›ç©ºç™½ï¼Œä½†é—®é¢˜åœ¨äºŽè¿™å¤„ç©ºç™½ä»Žä½•è€Œæ¥åŠå…¶é«˜åº¦æ˜¯å¤šå°‘ã€‚è¯¥é—®é¢˜ä¸Žåº•å±‚ \TeX\ çš„è¥¿æ–‡æŽ’ç‰ˆæœºåˆ¶æœ‰å…³ã€‚

é¦–å…ˆï¼Œæˆ‘ä»¬éœ€è¦æ˜Žç™½ï¼Œè¥¿æ–‡æŽ’ç‰ˆï¼Œä¸€è¡Œæ–‡å­—æ˜¯æœ‰åŸºçº¿çš„ï¼Œä½†åŸºçº¿å¹¶éžä½äºŽè¯¥è¡Œæ–‡å­—çš„æœ€åº•ç«¯ï¼Œè€Œæ˜¯è·æœ€åº•ç«¯æœ‰ä¸€æ®µè¾ƒå°çš„è·ç¦»ï¼Œå¦åˆ™æ‰€æœ‰è¥¿æ–‡å­—æ¯éƒ½åœ¨åŒä¸€æ¡çº¿ä¸Šäº†ã€‚åœ¨ä¸Šè¿°ç¤ºä¾‹ä¸­ï¼Œ\type{\framed} çš„åº•çº¿ä¾¿æ˜¯å…¶å¤–å›´çš„ \type{\inframed} æ‰€åœ¨è¡Œçš„åŸºçº¿ã€‚è¥¿æ–‡å­—ä½“åœ¨è®¾è®¡æ—¶ï¼Œæ¯ä¸ªå­—å½¢ï¼ˆGlyphï¼‰æ˜¯æœ‰åŸºçº¿ä½ç½®ï¼Œå›&nbsp;æ­¤åœ¨æŽ’ç‰ˆæ—¶å¯æ&nbsp;¹æ®å®žé™…çš„åŸºçº¿ä½ç½®å¯¹å­—å½¢è¿›è¡Œå¯¹é½ã€‚ä¸€è¡Œæ–‡å­—çš„åŸºçº¿åˆ°è¯¥è¡Œçš„æœ€åº•ç«¯çš„è¿™æ®µè·ç¦»ç§°ä¸ºæ·±åº¦ã€‚ä¸€è¡Œæ–‡å­—çš„åŸºçº¿åˆ°è¯¥è¡Œæœ€é¡¶ç«¯çš„è¿™æ®µè·ç¦»ç§°ä¸ºé«˜åº¦ã€‚å›&nbsp;æ­¤ï¼Œä¸€è¡Œæ–‡å­—çš„çœŸæ­£é«˜åº¦ç­‰äºŽæ·±åº¦ + é«˜åº¦ï¼›åœ¨ \ConTeXt\ ä¸­ï¼Œå®ƒç­‰äºŽæˆ‘ä»¬ä½¿ç”¨ \type{\setupinterlinespace} è®¾å®šçš„å°ºå¯¸ã€‚

æ—&nbsp;è®ºæ˜¯ \TeX\ è¿˜æ˜¯ \ConTeXt\ ç›’å­ï¼Œå®ƒä»¬æœ¬èº«æ˜¯æ²¡æœ‰æ·±åº¦çš„ï¼Œä½†æ˜¯å½“å®ƒä»¬é‡Œé¢çš„æ–‡å­—æˆ–ç›’å­æœ‰æ·±åº¦æ—¶ï¼Œå®ƒä»¬ä¾¿æœ‰äº†æ·±åº¦ã€‚è‡³äºŽæ·±åº¦å€¼å…·ä½“æ˜¯å¤šå¤§ï¼Œå¯ä»¥å€ŸåŠ© \TeX\ çš„ç›’å­å¯„å­˜å™¨è¿›è¡Œæµ‹é‡ã€‚ä¾‹å¦‚ï¼Œå®šä¹‰ä¸€ä¸ªç›’å­å¯„å­˜å™¨ box0ï¼š

\starttyping[option=TEX]
\setbox0\hbox{\inframed{\framed{æˆ‘çœ‹åˆ°ä¸€æ£µæ¨±æ¡ƒæ&nbsp;‘}}}
\stoptyping
\setbox0\hbox{\inframed{\framed{æˆ‘çœ‹åˆ°ä¸€æ£µæ¨±æ¡ƒæ&nbsp;‘}}}

\noindent çŽ°åœ¨æˆ‘ä»¬æœ‰äº†ä¸€ä¸ª 0 å·ç›’å­ï¼Œä½¿ç”¨ \type{\wd}ï¼Œ\type{\ht} å’Œ \type{\dp} å¯åˆ†åˆ«æµ‹é‡è¯¥ç›’å­çš„å®½åº¦ã€é«˜åº¦å’Œæ·±åº¦â€¦â€¦é¡ºä¾¿å¤ä¹&nbsp;ä¸€ä¸‹è¡¨æ&nbsp;¼çš„ç”¨æ³•ï¼š

\startsample
\starttabulate[|c|c|c|]
\HL
\NC å®½åº¦ \NC é«˜åº¦ \NC æ·±åº¦ \NC\NR
\HL
\NC \the\wd0 \NC \the\ht0 \NC \the\dp0 \NC\NR
\HL
\stoptabulate
\stopsample
\simplesample[option=TEX]{\getsample}

å°†ä¸Šè¿°æ‰€å¾—æ·±åº¦ä¿¡æ¯å–è´Ÿä½œä¸º \type{\inframed} çš„å‚æ•° \type{depth} çš„å€¼ï¼Œå³

\starttyping[option=TEX]
\inframed[depth=-\dp0]{\framed{æˆ‘çœ‹åˆ°ä¸€æ£µæ¨±æ¡ƒæ&nbsp;‘}}
\stoptyping

\noindent ä¾¿å¯æ¶ˆé™¤æ·±åº¦ï¼Œç»“æžœä¸º \inframed[depth=-\dp0]{\framed{æˆ‘çœ‹åˆ°ä¸€æ£µæ¨±æ¡ƒæ&nbsp;‘}}ã€‚

\section{å°ç»“}

\TeX\ ç›’å­æ˜¯æ—&nbsp;å½¢çš„ã€‚\ConTeXt\ ç›’å­æ˜¯æœ‰å½¢çš„ã€‚è€å­æ›¾è¯´è¿‡ï¼Œæ’æ—&nbsp;æ¬²ï¼Œä»¥è§‚å…¶å¦™ï¼›æ’æœ‰æ¬²ï¼Œä»¥è§‚å…¶æ‰€å¾¼ã€‚æ•…è€Œï¼Œ\TeX\ è¦æ‡‚ä¸€äº›ï¼Œ\ConTeXt\ ä¹Ÿè¦æ‡‚ä¸€äº›ã€‚
</pre></body></html>