KTUGFaq
KTUG FAQ
FrontPage › Box
[ÆíÁý]
1 ¹Ú½º ¶
TeXÀº ¸ðµç °ÍÀ» ¹Ú½º·Î ó¸®ÇÑ´Ù. ¹Ú½ºÀÇ ±âº»ÀûÀÎ ¸ð¾çÀº ´ÙÀ½°ú °°´Ù.
±×¸²¹Ú½º´Â depth=0ÀÌ´Ù. Áï baseline°ú bottom lineÀÌ µ¿ÀÏÇÏ´Ù.
¿µ¹®ÀÚÀÇ °æ¿ì p, g, y µîÀº baseline ¾Æ·¡·Î ³»·Á°£´Ù. ±×¸®°í ¼Ò¹®ÀÚ aÀÇ °æ¿ì ±ÛÀÚÀÇ ³ôÀÌ°¡ topline¿¡ ¹ÌÄ¡Áö ¾Ê´Âµ¥, ÀÌ ³ôÀÌ´Â ÆùÆ®ÀÇ µðÀÚÀο¡ µû¶ó ´Þ¶óÁö¸ç xheight¶ó°í ºÎ¸¥´Ù. ±ÛÀÚ xÀÇ ³ôÀ̶ó´Â ¶æÀÌ´Ù.
ÇÑ±Û ±Û²ÃÀº bottom lineÀ» ±âÁØÀ¸·Î µðÀÚÀÎµÈ ±Û²Ã°ú ¿µ¹®ÀÚ baselineÀ» ±âÁØÀ¸·Î µðÀÚÀÎµÈ ±Û²ÃÀÌ ÀÖ´Ù. bottom lineÀ» ±âÁØÀ¸·Î µðÀÚÀÎµÈ ±Û²ÃÀ» ¿µ¹®ÀÚ¿Í ÇÔ²² ¾²¸é ±ÛÀÚÀÇ ¹Ù´ÚÀÌ ¿µ¹®ÀÚ ¹Ù´Úº¸´Ù ¾Æ·¡·Î ³»·Á°£´Ù. ´ëºÎºÐÀÇ ÇÑ±Û ±Û²ÃÀº ¿µ¹®ÀÇ baselineº¸´Ù´Â ¾Æ·¡ÂÊ¿¡ µðÀÚÀλóÀÇ baselineÀ» Àâ¾ÒÁö¸¸ bottom line±îÁö´Â ³»·Á°¡Áö ¾Ê´Â °ÍÀÌ ¸¹´Ù.
reference point´Â ¿©·¯ °¡Áö ¸é¿¡¼ Áß¿äÇÏÁö¸¸ ƯÈ÷ ¹Ú½º¸¦ ȸÀü½Ãų ¶§ Áß¿äÇÏ´Ù. ÇϳªÀÇ ¹Ú½º°¡ ȸÀüÇÒ ¶§ÀÇ °¢µµ´Â reference point(ÂüÁ¶Á¡)¸¦ ±âÁØÀ¸·Î ȸÀüÇÑ´Ù.
TeXÀº ÆùÆ®ÀÇ ÀÌ µðÀÚÀÎ ¼³°è¿¡ °üÇÑ Á¤º¸¸¦ ÀÌ¿ëÇؼ °¢°¢ÀÇ ¹®ÀÚ¸¦ ¸ðµÎ box·Î »ý°¢ÇÏ¿© ÀÌ°ÍÀ» ºÙ¿© ´Ü¾î¸¦ ¸¸µé°í ´Ü¾î ¹Ú½º¸¦ ´Ù½Ã ºÙ¿© ÇàÀ» ¸¸µé°í Çà ¹Ú½º¸¦ ºÙ¿© ÆäÀÌÁö¸¦ ¸¸µå´Â ¹æ½ÄÀ¸·Î ½ÄÀڵȴÙ. ¹Ú½º¿Í ¹Ú½º¸¦ ºÙÀÏ ¶§´Â Ç®(glue)À» »ç¿ëÇϴµ¥ ÀÌ Ç® ÀÚüµµ ±æÀÌ°¡ ÀÖ´Â(¹®ÀÚ¹Ú½º »çÀÌ¿¡¼´Â ´ëºÎºÐ 0, ´Ü¾î¹Ú½º »çÀÌ¿¡¼´Â °¡º¯±æÀ̸¦ °¡Áö´Â rubber glue. vertical mode¿¡¼´Â glue¶ó°í ÇÏÁö ¾Ê°í lineskip µî skipÀ̶ó°í ÇÑ´Ù.) ÇϳªÀÇ ¹Ú½ºÀÌ´Ù.
¹®ÀÚ ¹Ú½º¸¦ ºÙ¿© ´Ü¾î¿Í ÇàÀ» ¸¸µå´Â °úÁ¤À» horizontal mode¶ó°í ÇÏ°í, ÇàÀ» ¸ð¾Æ¼ ´Ü¶ô°ú ÆäÀÌÁö¸¦ ¸¸µå´Â °úÁ¤À» vertical mode¶ó°í ÇÑ´Ù.
ÇϳªÀÇ ÆäÀÌÁö¿¡´Â text body vertical mode box ÀÌ¿Ü¿¡ header ¹Ú½º¿Í footer ¹Ú½º°¡ ´õ ÀÖ°í, °æ¿ì¿¡ µû¶ó¼ MarginalNote ¹Ú½º¸¦ µ¡ºÙÀ̱⵵ ÇÑ´Ù.
[ÆíÁý]
1.1 hbox to¿Í hbox spread ¶
\hbox¿¡ to ¶Ç´Â spread Áö½ÃÀÚ¸¦ ¾µ ¼ö ÀÖ´Ù. ±× ´ÙÀ½¿¡´Â ÀûÀýÇÑ ±æÀÌ°¡ ¿Í¾ß ÇÑ´Ù.
\hbox{Find out what it means to spread the box.} \hbox to .5\hsize{Find out what it means to spread the box.} \hbox spread 20pt{Make your days.}
[ÆíÁý]
1.2 hbox¿Í vbox ¶
12284
\hbox´Â ÁÙ³ª´®ÀÌ ÀϾÁö ¾Ê½À´Ï´Ù. ³ôÀÌ´Â ÇÑ ÁÙ·Î °íÁ¤µÇ°í horizontal ÂÊÀ¸·Î ±æ¾îÁöÁö¿ä.
\vbox´Â °¡·Î¸¦ °íÁ¤½ÃÄѳõ°í(\hsize¸¦ ÁÙ ¼ö ÀÖ½À´Ï´Ù.) ¼¼·Î·Î ±æ¾îÁö´Â °ÍÀε¥, ±× ¾È¿¡ ¿À´Â ÅؽºÆ®´Â ÁÙ³ª´®ÀÌ µË´Ï´Ù. ÆäÀÌÁö³ª´®Àº ÀϾÁö ¾Ê½À´Ï´Ù. TeX¿¡¼ "ÆäÀÌÁö"¶ó´Â °ÍÀº \hsize°¡ \textwidthÀÎ \vbox¸¦ °¡¸®Åµ´Ï´Ù.
[ÆíÁý]
1.3 vbox¿Í vtop ¶
\vtop \vtop to \vtop spread \vbox \vbox to \vbox spread
- ´Ü¼øÈ÷ \vbox¸¸À» Áö½ÃÇϸé natural height¸¦ °®´Â´Ù.
- \vbox to <dimen>À» Áö½ÃÇϸé vboxÀÇ height°¡ <dimen>ÀÌ µÈ´Ù.
- \vbox spread <dimen>À» Áö½ÃÇϸé vboxÀÇ height´Â natural height + <dimen>ÀÌ µÈ´Ù.
\TeX\ assembles boxes % \vtop{\hsize=70pt\noindent\it of different sizes and shapes} % \vbox{\hsize=78pt\noindent\bf having as many words as you wish} % \newline into paragraphs and pages---as this example clearly shows.
[ÆíÁý]
2.1 Box Register ¶
PlainTeX¿¡¼´Â Box Register°¡ \box0 ¿¡¼ \box255±îÁö 256°³°¡ ÁغñµÇ¾î ÀÖ´Ù.
»ç¿ëÀÚ´Â \box0ºÎÅÍ \box9±îÁö ¿ °³¸¸ »ç¿ëÇÒ °ÍÀ» ±ÇÀåÇÑ´Ù.(scratch boxes)
´Ù¸¥ box registerµéÀº ´ëºÎºÐ PlainTeX ½Ã½ºÅÛ¿¡ ÀÇÇÏ¿© »ç¿ëµÇ´Â °ÍµéÀÌ´Ù.
\box255´Â Ưº°ÇÑ ¿ëµµ·Î »ç¿ëµÇ´Â °ÍÀ̹ǷΠÂüÁ¶µÇÁö ¾Ê´Â´Ù.
\setbox0\hbox{This is My New Box.}ÀÌÁ¦ºÎÅÍ ÀÌ ¹Ú½º´Â \box0À̶ó´Â register ¹øÈ£·Î ÂüÁ¶µÈ´Ù.
[ÆíÁý]
2.2 »ç¿ëÀÚ ¹Ú½º ¸¸µé±â ¶
box register¸¦ Á÷Á¢ Á¦¾îÇÏ´Â °ÍÀº ½±Áö ¾ÊÀº ÀÏÀ̹ǷÎ, PlainTeXÀº ¹Ú½º¸¦ register number°¡ ¾Æ´Ï¶ó unique nameÀ¸·Î ÂüÁ¶ÇÒ ¼ö ÀÖµµ·Ï ÇÏ°í ÀÖ´Ù.
»õ·Î¿î ¹Ú½º¸¦ À̸§À¸·Î ¼±¾ðÇÑ´Ù.
\newbox\mynewbox
ÀÌÁ¦ºÎÅÍ ÀÌ ¹Ú½º´Â \mynewbox¶ó´Â ¸íĪÀ¸·Î ÂüÁ¶µÈ´Ù. box register´Â ÀÚµ¿ ÇÒ´çµÈ´Ù.
ÀÌ ¹Ú½ºÀÇ ³»¿ëÀ» ä¿öÁÖ¾î¾ß ÇÑ´Ù. ±×·¸Áö ¾ÊÀ¸¸é void box·Î ´Ù·ç¾îÁú °ÍÀÌ´Ù.
\setbox\mynewbox\hbox{This is My Newly Defined Box.}
¿©±â±îÁö¸¦ ¹Ú½º ÇÒ´çÀ̶ó ÇÑ´Ù.
[ÆíÁý]
2.3 \lastbox ¶
Á÷Àü ¾ÆÀÌÅÛÀÌ ¹Ú½ºÀÌ¸é ±× ¹Ú½º´Â Áö¿öÁö°í \lastbox°¡ À̸¦ ¹Þ´Â´Ù. Á÷Àü ¾ÆÀÌÅÛÀÌ ¹Ú½º°¡ ¾Æ´Ï¸é \lastbox´Â void°¡ µÈ´Ù. µû¶ó¼ {\setbox0=\lastbox}´Â Á÷Àü ¹Ú½º¸¦ ¸®½ºÆ®¿¡¼ Áö¿ì´Â ¸í·ÉÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ´Ù. ÀÌ°ÍÀ» ÀÌ¿ëÇÑ ¿¹: 11742
[ÆíÁý]
2.4 ¹Ú½º »óÅ üũ ¶
\mynewboxÀÇ width, depth, height´Â ´ÙÀ½°ú °°ÀÌ ÇÏ¿© ¾òÀ» ¼ö ÀÖ´Ù.
\wd\mynewbox \dp\mynewbox \ht\mynewbox
»õ·Î¿î dimension \MyTestDimenÀ» Çϳª Á¤ÀÇÇؼ ÀÌ °¢°¢ÀÇ °ªÀ» µð½ºÇ÷¹ÀÌÇغ¸ÀÚ.
\newdimen\MyTestDimen \MyTestDimen=\wd\mynewbox the width of mynewbox : \the\MyTestDimen \\ \MyTestDimen=\dp\mynewbox the width of mynewbox : \the\MyTestDimen \\ \MyTestDimen=\ht\mynewbox the width of mynewbox : \the\MyTestDimen
[ÆíÁý]
2.5 box ¹èÄ¡ ¶
ÀÌÁ¦, \mynewbox¸¦ ¹èÄ¡ÇÑ´Ù.
¸¸¾à register number·Î ÂüÁ¶µÇ´Â ¹Ú½º°¡ ÀÖ´Ù¸é ÀÌ°ÍÀº \box<register number>¸¦ È£ÃâÇÏ¸é µÈ´Ù.
\setbox0\hbox{this is My Box.} \box0
À̸§À¸·Î ÂüÁ¶µÇ´Â ¹Ú½º´Â register number ´ë½Å À̸§À» ¾´´Ù.
\newbox\mynewbox \setbox\mynewbox\hbox{This is My Newly Defined Box.} \box\mynewbox
[ÆíÁý]
2.6 \copy, \unhbox, \unhcopy etc. ¶
\boxn ÇüÅÂÀÇ È£ÃâÀÌ ÀÌ·ç¾îÁö°í ³ª¸é ±× ¹Ú½º register´Â ºñ¿öÁø´Ù. ±×·¯¹Ç·Î ¹Ú½ºÀÇ ³»¿ëÀ» À¯ÁöÇÏ¸é¼ ¹Ú½º¸¦ ¹èÄ¡ÇÏ·Á¸é \copy ¸í·ÉÀ» ½á¾ß ÇÑ´Ù.
\setbox0= \hbox{good } Have a \copy0 \box0 \box0 day!
\unhbox´Â ÁÖ¾îÁø hbox registerÀÇ ³»¿ëÀ» listÇÏ°í ¹Ú½º register¸¦ ºñ¿î´Ù. \unvbox´Â vbox¿¡ ´ëÇؼ °°´Ù.
\unhcopy´Â ÁÖ¾îÁø hbox registerÀÇ ³»¿ëÀ» listÇÏ°í ¹Ú½º register¸¦ ±×´ë·Î À¯ÁöÇÑ´Ù. \unvcopy´Â vbox¿¡ ´ëÇؼ °°´Ù.
[ÆíÁý]
2.7.1 moveleft, moveright ¶
ÀÌ ¸í·ÉµéÀº ¹Ú½º¸¦ ÁÖ¾îÁø ±æÀÌ(dimen)¸¸Å ¿ÞÂÊ ¶Ç´Â ¿À¸¥ÂÊÀ¸·Î À̵¿½ÃÄÑ ½ÄÀÚÇÑ´Ù.
\vbox{\vbox{Phoebe}\vbox{walked} \moveleft 20pt\vbox{a}\moveright 20pt\vbox{crooked}% \vbox{mile.}}
[ÆíÁý]
2.7.2 lower, raise ¶
\raise¿Í \lower ¸í·É ´ÙÀ½¿¡´Â box°¡ ¿Â´Ù. Áö½ÃµÈ ±æÀ̸¸Å ¹Ú½º¸¦ ¼öÁ÷À¸·Î ¿Ã¸®°Å³ª ³»¸°´Ù.
¿¹ÄÁ´ë TeXÀÇ ·Î°í´Â ´ÙÀ½°ú °°ÀÌ Á¤ÀǵȴÙ.
\def\TeX{% T\kern-0.1667em \lower0.7ex\hbox{E}\kern-0.125emX}
\lower.7ex´Â \raise-.7ex¿Í °°´Ù.
[ÆíÁý]
3.2 mathstrut ¶
\mathstrut´Â ÆøÀÌ 0ÀÎ ´«¿¡ º¸ÀÌÁö ¾Ê´Â ¹Ú½ºÀÔ´Ï´Ù. \mathstrutÀÇ ³ôÀÌ¿Í ±íÀÌ´Â °ýÈ£ `('ÀÇ ³ôÀÌ¿Í ±íÀÌ¿Í
°°½À´Ï´Ù. µû¶ó¼ \mathstrut¸¦ Æ÷ÇÔÇÏ´Â ¼ö½ÄµéÀº ¾ðÁ¦³ª °°Àº ³ôÀÌ¿Í ±íÀ̸¦ °¡Áö°Ô µË´Ï´Ù.
\mathstrut¸¦ »ç¿ëÇÏ´Â ÇÑ°¡Áö ¿¹´Â
${\sqrt{a}+\sqrt{d}+\sqrt{y}$´Â ó·³ ·çÆ®±âÈ£°¡ À§¾Æ·¡·Î µé¾¦³¯¾¦Çϴµ¥, ÀÌ·¯ÇÑ °æ¿ì¿¡ \sqrt¾È¿¡ \mathstrut¸¦ »ç¿ëÇؼ,
${\sqrt{\mathstrut a}+\sqrt{\mathstrut d}+\sqrt{\mathstrut y}$ó·³ ·çÆ®±âÈ£ÀÇ Å©±â¸¦ ±ÕÀÏÇÏ°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù.
[ÆíÁý]
3.4 hphantom, vphantom ¶
phantom°ú °°À¸³ª, Àμö¸¸ÅÀÇ °¡·Î±æÀÌ¿Í ¼¼·Î±æÀ̸¸À» °®´Â ¹Ú½º¸¦ ¹èÄ¡ÇÑ´Ù´Â Á¡ÀÌ ´Ù¸£´Ù. ¿¹¸¦ µé¾î \hphantom{a}´Â ÇöÀç ±âº» ÆùÆ®ÀÇ aÀÚÀÇ \wd¸¸ÅÀÇ \wd¸¦ °®Áö¸¸ height¿Í depth°¡ 0ÀÎ ¹Ú½º¸¦ ¸¸µé¾î¼ ½ÄÀÚÇÑ´Ù.
[ÆíÁý]
3.5 smash ¶
Àμö·Î ÁÖ¾îÁø ¹®ÀÚ¸¦ typesetÇÏÁö¸¸ ±× ¹®ÀÚ°¡ µé¾î°£ ¹Ú½ºÀÇ height¿Í depth¸¦ 0À¸·Î ¸¸µç´Ù.
$${\smash{r_m \brace r_n}\vphantom{r}} \Longrightarrow r$$
[ÆíÁý]
4.1 hrule ¶
\hrule \hrule height <dimen> width <dimen> depth <dimen> \vrule \vrule width <dimen> height <dimen> depth <dimen>
\hruleÀÇ ±âº»°ªÀº height 0.4pt, depth 0.0ptÀÌ´Ù. width¸¦ º°µµ·Î ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é ÇöÀç ruleÀÌ µé¾î ÀÖ´Â ¹Ú½ºÀÇ °æ°è±îÁöÀÌ´Ù.
\vruleÀÇ ±âº»°ªÀº width 0.4ptÀÌ´Ù. height¿Í depth¸¦ º°µµ·Î ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é ÇöÀç ruleÀÌ µé¾î ÀÖ´Â ¹Ú½ºÀÇ ¾Æ·§ÂÊ °æ°è±îÁö ¿¬ÀåµÈ´Ù.
´ÙÀ½ Äڵ带 ½ÇÇàÇغ¸¶ó.
\hrule\smallskip \hrule width 2in \smallskip \hrule width 3in height 2pt \smallskip \hrule width 3in depth 2pt
\hbox{( {\vrule} {\vrule width 8pt} )} \hbox {(\vrule height 13pt depth 0pt} {\vrule height 13pt depth 7pt} x)}
[ÆíÁý]
4.2 leaders ¶
\leaders´Â ¼öÆò¸ðµå(hofizontal mode)³»¿¡¼ `\leaders<box or rule>\hskip<glue>'¿Í °°Àº Çü½ÄÀ¸·Î »ç¿ëµÇ´Âµ¥, ÀÌ´Â ÁÖ¾îÁø box ¶Ç´Â ruleÀ» ÁÖ¾îÁø °ø°£(°£°Ý) ¾È¿¡ °¡´ÉÇÑÇÑ ¸¹ÀÌ ¹Ýº¹Çؼ ä¿ö³Ö´Â °ÍÀÔ´Ï´Ù. ¿©±â¼ box ¶Ç´Â ruleÀ» ÀÓÀÇÀÇ ÆÐÅÏÀ̶ó°í »ý°¢ÇÏ¸é µË´Ï´Ù. Áï ÁÖ¾îÁø °£°Ý ¾È¿¡ ÀÏÁ¤ÇÑ ÆÐÅÏÀÌ °è¼ÓÇؼ ¹Ýº¹µÇ´Â °ÍÀ» ÀǹÌÇÕ´Ï´Ù. \learders´Â ¾Æ·¡ÀÇ ¿¹¿Í °°Àº "¸ñÂ÷"¿¡¼ ÁÖ·Î »ç¿ëµË´Ï´Ù. (¾Æ·¡ÀÇ ¿¹Á¦´Â TeXbookÀÇ 223ÂÊ¿¡¼ ¹ßÃéÇÏ¿´½À´Ï´Ù.)
\def\leaderfill{\leaders\hbox to 1em{\hss.\hss}\hfill} \line{Alpha\leaderfill Omega} \line{The Beginning\leaderfill The Ending}
[ÆíÁý]
4.3 dotfill, hrulefill ¶
\hbox to 3in{Start {\dotfill} Finish} \hbox to 3in{Swedish {\hrulefill} Finnish}