KTUGFaq

KTUG FAQ

·Î±×ÀÎ:
ºñ¹Ð¹øÈ£:
°¡ÀÔ
A plucked goose doesn't lay golden eggs.
FrontPage › LaTeXBoxes
TeX¿¡¼­ ¹Ú½º¸¦ Ãë±ÞÇÏ´Â ¹æ¹ý¿¡ ´ëÇؼ­´Â Box¸¦ º¸¶ó. ¿©±â¼­´Â LaTeX¿¡¼­ ¾²ÀÌ´Â ¹Ú½º ó¸® ¹æ¹ýÀ» ¿ä¾àÇÑ´Ù.

¸ñÂ÷

1 ±âº»ÀûÀÎ ¹Ú½ºµé
1.1 makebox, mbox
1.2 framebox, fbox
1.3 savebox, sbox, usebox
1.4 rule°ú strut
1.5 lrbox ȯ°æ
1.6 parbox
1.7 minipage ȯ°æ
2 Fancy Boxes (fancybox ÆÐÅ°Áö)
2.1 boxput
2.2 fancypage
2.3 flushleft, flushright, center, itemize, enumerate, description¿¡ Å׵θ®
2.4 verbatim box
3 Break Box
4 Áú¹®°ú ´äº¯, TIP
4.1 minipage¿¡ frameÀ» Ä¥ ¼ö´Â ¾ø´Â°¡?
4.2 °¡º¯Æø framebox¸¦ »ç¿ëÇÏ´Â ¹æ¹ý
5 ±×¸²(picture) ȯ°æÀÇ ¹Ú½º

1 ±âº»ÀûÀÎ ¹Ú½ºµé

1.1 makebox, mbox

\makebox[<width>][<pos>]{<obj>}

<width> °ªÀ» ÁÖÁö ¾ÊÀ¸¸é <pos>´Â ¾ø¾î¾ß ÇÑ´Ù. <pos>´Â ´ÙÀ½ ³× °¡Áö°¡ ÀÖ´Ù.
Áö½ÃÀÚ ÀǹÌ
l ¿ÞÂÊÁ¤·Ä
r ¿À¸¥ÂÊÁ¤·Ä
c °¡¿îµ¥Á¤·Ä
s stretched

\makebox[2\width][l]{That's all folks!}
\makebox[2\width][r]{That's all folks!}
\makebox[2\width][c]{That's all folks!}
\makebox[2\width][s]{That's all folks!}

  • \makebox ¸í·ÉÀÌ ºÒ¸®¸é ÀÚµ¿ÀûÀ¸·Î \width, \height, \depth, \totalheight °ªÀÌ ¼³Á¤µÈ´Ù.

makeboxtest.jpg

\mbox´Â \makeboxÀÇ ¾àÇüÀÌ´Ù. ¿É¼Ç¾øÀÌ \mbox{obj} Çü½ÄÀ¸·Î ¾²¸ç ÀÌ°ÍÀº \makebox{obj}ÀÇ ¾àÇü Ç¥±âÀÌ´Ù. \mbox´Â ¹®¼­ ±âº» ÆùÆ®·Î(Áï ÅؽºÆ® ¸ðµå·Î) Àç¼³Á¤µÇ¹Ç·Î, math mode¿¡¼­ ¾à°£ÀÇ ÅؽºÆ®¸¦ ¾²°í ½ÍÀ» ¶§ »ç¿ëÇÒ ¼ö ÀÖ´Ù.

1.2 framebox, fbox

\framebox´Â \makebox¿Í °°°í ¹Ú½º ÁÖº¯À» ÇÁ·¹ÀÓÀ¸·Î µÑ·¯½Î´Â °Í¸¸ ´Ù¸£´Ù. \fbox´Â \frameboxÀÇ ¾àÇüÀ¸·Î¼­ ¿É¼Ç¾øÀÌ \fbox{obj} Çü½ÄÀ¸·Î ¾²ÀδÙ.

  • frame lineÀÇ µÎ²²´Â \fboxrule
  • ÅؽºÆ®¿Í ÇÁ·¹ÀÓ »çÀÌÀÇ °£°ÝÀº \fboxsep
  • À§ÀÇ µÎ °ªÀº "±æÀÌ°ª"(see ±æÀ̺¯¼ö)À̹ǷΠ\setlength, \addtolength µîÀ¸·Î ¼³Á¤ÇÑ´Ù.

\framebox[2\width][l]{That's all folks!}
\framebox[2\width][r]{That's all folks!}
\framebox[2\width][c]{That's all folks!}
\framebox[2\width][s]{That's all folks!}

frameboxtest.jpg

1.3 savebox, sbox, usebox

¹Ú½º º¯¼ö´Â ´ÙÀ½°ú °°ÀÌ ¼±¾ðÇÑ´Ù.
\newsavebox{\cmd}

±× ´ÙÀ½ ÀÌ º¯¼ö¿¡ ¹Ú½ºÀÇ ³»¿ëÀ» ÇÒ´çÇÑ´Ù.
\savebox{\cmd}[_width_][_pos_]{_obj_}

\newsavebox{\MyBox}
\savebox{\MyBox}[2\width][c]{That's all folks!}
\fbox{\usebox{\MyBox}}\usebox{\MyBox}

_width_¿Í _pos_´Â \makebox ¹× \frameboxÀÇ °æ¿ì¿Í µ¿ÀÏÇÏ´Ù. \sbox ¸í·ÉÀº ¿É¼Ç¾øÀÌ \savebox¸¦ ÁÙ¿©¾²´Â ¸í·ÉÀÌ´Ù.


1.4 rule°ú strut

See Box.
Compare \fbox{this} with \fbox{\rule[-.5cm]{0mm}{1cm}this}.


1.5 lrbox ȯ°æ

\newsavebox{\temp}
\begin{lrbox}{\temp}
The characters \verb|~ # $ % ^ & _|
are special.
\end{lrbox}
\usebox{\temp}


  • verbatim ÅؽºÆ®¸¦ Æ÷ÇÔÇÒ ¼ö ÀÖ´Ù.
  • ¹Ú½º ¾È¿¡¼­´Â Ç೪´®ÀÌ µÈ´Ù.
  • lrboxÀÇ ¾ÕµÚ °ø¹éÀº ¸ðµÎ ¹«½ÃµÈ´Ù.
  • ÇÑ ¹®´Ü ÀÌ»óÀÌ ¿Ã ¼ö ¾ø´Ù.

1.6 parbox

\parbox[_pos_][_height_][_inner_pos_]{*width*}{*text*}

¹®´Ü(paragraph) Àüü¸¦ ÇϳªÀÇ ¹Ú½º·Î ¸¸µå´Â ¸í·ÉÀÌ´Ù. ¹Ú½º´Â ¹Ýµå½Ã *width*¸¦ ÁöÁ¤ÇØ¾ß ÇÑ´Ù. À§Ä¡ÁöÁ¤ÀÚ(_pos_)´Â ´ÙÀ½°ú °°´Ù.
À§Ä¡Áö½ÃÀÚ ÀǹÌ
t ¹Ú½ºÀÇ Ã¹ ÁÙÀÌ baseline¿¡ Á¤·ÄµÈ´Ù.
b ¹Ú½ºÀÇ ¸¶Áö¸· ÁÙÀÌ baseline¿¡ Á¤·ÄµÈ´Ù.
c º£À̽º¶óÀÎÀ» ±âÁØÀ¸·Î ¼¼·Î·Î Áß¾Ó¿¡ Á¤·ÄµÈ´Ù.
s c¿Í ºñ½ÁÇÏ´Ù.

I \parbox[t]{10pt}{t\\h\\i\\n\\k}
\parbox[b]{10pt}{M\\a\\r\\s} is
\parbox[c]{10pt}{c\\a\\l\\l\\e\\d}
\parbox[s]{35pt}{the Red Planet.}

I \fbox{\parbox[t]{10pt}{t\\h\\i\\n\\k}}
\fbox{\parbox[b]{10pt}{M\\a\\r\\s}} is
\fbox{\parbox[c]{10pt}{c\\a\\l\\l\\e\\d}}
\fbox{\parbox[s]{35pt}{the Red Planet.}}
_inner_pos_¶õ, À§ÀÇ _pos_¿Í µ¿ÀÏÇÑ À§Ä¡ÁöÁ¤ÀÚ¸¦ »ç¿ëÇϵÇ, ¹Ú½º ÀÚüÀÇ º£À̽º¶óÀÎ ±âÁØ À§Ä¡°¡ ¾Æ´Ï¶ó ¹Ú½º ¾È¿¡¼­ ÅؽºÆ®³ª obj°¡ ³õÀÏ À§Ä¡¸¦ Áö½ÃÇÏ´Â °ÍÀÌ´Ù. _height_ °ªÀ» ÁØ °æ¿ì¿¡¸¸ Àǹ̰¡ ÀÖ´Ù.

\parbox[t][20pt][b]{10pt}{T}

\fbox{\parbox[t][20pt][b]{10pt}{T}}
parbox ¾È¿¡´Â verbatimÀÌ ¿Ã ¼ö ¾ø´Ù.

1.7 minipage ȯ°æ

minipage´Â \textwidth¿Í \columnwidth¸¦ ÁöÁ¤ÇÏ¿© ÇϳªÀÇ ÀÛÀº ÆäÀÌÁöó·³ ´Ù·ê ¼ö ÀÖ´Â ¹Ú½º¸¦ ¸¸µç´Ù. µû¶ó¼­ °¢ÁÖ¸¦ ºÙÀÏ ¼ö ÀÖ´Ù´Â Áß¿äÇÑ ±â´ÉÀ» °¡Áø´Ù. parbox¿Í minipage´Â ¸ðµÎ ÇÑ ÆäÀÌÁö ¾ÈÀÇ ¹Ú½ºÀ̱⠶§¹®¿¡ ÆäÀÌÁö°¡ ³ª´©¾îÁö´Â °÷¿¡¼­ ¹Ú½ºµµ ÇÔ²² ³ª´©¾îÁöÁö ¾Ê´Â´Ù. À¯´Þ¸® ¹Ú½º¸¦ ¸¹ÀÌ ¾²´Â ¿ì¸®³ª¶óÀÇ ±Û¾²±â °üÇà¿¡ ºñÃß¾î º¸ÀÚ¸é minipage°¡ ÆäÀÌÁö ³ª´®ÀÌ µÇÁö ¾Ê´Â °ÍÀÌ ºÒÆíÇϰųª ºÒ¸¸½º·¯¿ï ¼ö ÀÖ°ÚÁö¸¸, page¶õ °¡À§·Î ¿À¸®Áö ¾Ê´Â ÇÑ À߶óÁöÁö ¾Ê´Â °ÍÀ̹ǷΠ:) minipage°¡ À߶óÁöÁö ¾Ê´Â °ÍÀº ´ç¿¬ÇÑ ÀÏÀÌ´Ù.

\begin{minipage}[_pos_][_height_][_inner_pos_]{*width*}
  text of minipage
\end{minipage}

¿É¼ÇµîÀÇ Àǹ̴ parbox¿Í °°´Ù.

\begin{minipage}{150pt}
parbox¿Í minipage´Â ¸ðµÎ ÇÑ ÆäÀÌÁö ¾ÈÀÇ ¹Ú½ºÀ̱⠶§¹®¿¡ ÆäÀÌÁö°¡ ³ª´©¾îÁö´Â °÷¿¡¼­ ¹Ú½ºµµ ÇÔ²² ³ª´©¾îÁöÁö ¾Ê´Â´Ù.
À¯´Þ¸® ¹Ú½º¸¦ ¸¹ÀÌ ¾²´Â ¿ì¸®³ª¶óÀÇ ±Û¾²±â °üÇà¿¡ ºñÃß¾î º¸ÀÚ¸é 
minipage°¡ ÆäÀÌÁö ³ª´®ÀÌ µÇÁö ¾Ê´Â °ÍÀÌ ºÒÆíÇϰųª ºÒ¸¸½º·¯¿ï ¼ö ÀÖ°ÚÁö¸¸, page¶õ °¡À§·Î ¿À¸®Áö ¾Ê´Â ÇÑ 
À߶óÁöÁö ¾Ê´Â °ÍÀ̹ǷÎ\footnote{³ó´ãÀÔ´Ï´Ù.} minipage°¡ À߶óÁöÁö ¾Ê´Â °ÍÀº ´ç¿¬ÇÑ ÀÏÀÌ´Ù.
\end{minipage}

\begin{minipage}{300pt}
parbox¿Í minipage´Â ¸ðµÎ ÇÑ ÆäÀÌÁö ¾ÈÀÇ ¹Ú½ºÀ̱⠶§¹®¿¡ ÆäÀÌÁö°¡ ³ª´©¾îÁö´Â °÷¿¡¼­ ¹Ú½ºµµ ÇÔ²² ³ª´©¾îÁöÁö ¾Ê´Â´Ù.
À¯´Þ¸® ¹Ú½º¸¦ ¸¹ÀÌ ¾²´Â ¿ì¸®³ª¶óÀÇ ±Û¾²±â °üÇà¿¡ ºñÃß¾î º¸ÀÚ¸é 
minipage°¡ ÆäÀÌÁö ³ª´®ÀÌ µÇÁö ¾Ê´Â °ÍÀÌ ºÒÆíÇϰųª ºÒ¸¸½º·¯¿ï ¼ö ÀÖ°ÚÁö¸¸, page¶õ °¡À§·Î ¿À¸®Áö ¾Ê´Â ÇÑ 
À߶óÁöÁö ¾Ê´Â °ÍÀ̹ǷÎ\footnote{³ó´ãÀÔ´Ï´Ù.} minipage°¡ À߶óÁöÁö ¾Ê´Â °ÍÀº ´ç¿¬ÇÑ ÀÏÀÌ´Ù.
\end{minipage}
<!> minipage¸¦ ÀÌ¿ëÇÑ °¢ÁÖ ºÙÀ̱â´Â MinipageFootnote¸¦ Âü°íÇ϶ó.

2 Fancy Boxes (fancybox ÆÐÅ°Áö)

Timothy Van Zandt ¾¾ÀÇ fancybox ÆÐÅ°Áö´Â ´ÙÀ½°ú °°Àº ¹Ú½º¸¦ Á¦°øÇÑ´Ù.
\shadowbox{Shadow box}
\doublebox{Double box}
\ovalbox{Oval box}
\Ovalbox{Alternative oval box}

ovalboxboxes.jpg

2.1 boxput

\boxput ¸í·ÉÀº ÁöÁ¤µÈ ƯÁ¤ À§Ä¡¿¡ µÑ ÀÌ»óÀÇ ¹Ú½º¸¦ °ãÃÄµÑ ¼ö ÀÖ°Ô ÇÑ´Ù. \boxputÀº ù¹ø° ¹Ú½º¸¦ Èĸ鿡 ±×¸®°í, \boxput*Àº ù¹ø° ¹Ú½º¸¦ Àü¸é¿¡ ±×¸°´Ù.

DeleteMe. º¸ÃæÇÒ °Í.

2.2 fancypage

ÀÌ ¸í·ÉÀº ÆäÀÌÁö Àüü¿¡ ¹Ú½º¸¦ ±×¸°´Ù. ÇÑ ÆäÀÌÁö¸¸ ±×¸®·Á¸é \thisfancypage¸¦ ¾´´Ù. ÀÌ ¸í·ÉÀº µÎ °³ÀÇ Àμö¸¦ °¡Áö´Âµ¥, ù¹ø° °ÍÀº text body ºÎºÐ¿¡ ±×¸± frameÀÌ°í, µÎ¹ø° °ÍÀº header/footer¸¦ Æ÷ÇÔÇÑ Àüü ÆäÀÌÁö¿¡ ±×¸± frameÀÌ´Ù.
\usepackage{fancybox} %fancybox packageÀÇ ÀϺÎÀ̹ǷΠpreemble¿¡ ³Ö¾î ÁÖ¾î¾ß ÇÑ´Ù. 
% ÀϹÝÀûÀ¸·Î ÀοëµÇ´Â ¿¹Á¦
\thisfancypage % ¹Ú½º µÎ°³¸¦ ±×¸®´Â ¿¹Á¦
  {\setlength{\fboxsep}{8pt} \setlength{\shadowsize}{8pt} \shadowbox} % text bodyºÎºÐ¿¡ shadow box
  {\setlength{\fboxsep}{8pt} \Ovalbox} % header/footer¿Ü°û¿¡ ovalbox¸¦ ±×¸² 
% °¡Àå ´Ü¼øÇÏ°Ô header/footer¸¦ Á¦¿ÜÇÑ text body¿µ¿ª¿¡ box¸¦ ±×¸®·Á¸é ¾Æ·¡¿Í °°ÀÌ ÀÔ·ÂÇÏ¸é µÈ´Ù.
\thisfancypage{\fbox}{}

2.3 flushleft, flushright, center, itemize, enumerate, description¿¡ Å׵θ®

°¢°¢¿¡ ÇØ´çÇÏ´Â ´ÙÀ½ ȯ°æÀ» ¾µ ¼ö ÀÖ´Ù.
  • Bflushleft
  • Bflushright
  • Bcenter
  • Bitemize
  • Benumerate
  • Bdescription

2.4 verbatim box

fancybox ÆÐÅ°Áö¸¦ ÀÌ¿ëÇϸé verbatim ÅؽºÆ®¿¡ Å׵θ®¸¦ Ä¥ ¼ö ÀÖ´Ù. VerbatimBoxes¸¦ Âü°íÇ϶ó.

3 Break Box

ÆäÀÌÁö°¡ ³ª´©¾îÁö´Â ¹Ú½º¿¡ ´ëÇÑ °ÍÀº BreakBoxes¸¦ º¸¶ó.

4 Áú¹®°ú ´äº¯, TIP

4.1 minipage¿¡ frameÀ» Ä¥ ¼ö´Â ¾ø´Â°¡?

  1. fancyboxÀÇ Sbox ȯ°æÀ» ÀÌ¿ëÇÑ´Ù.
    \newenvironment{fminipage}%
     {\begin{Sbox}\begin{minipage}}
     {\end{minipage}\end{Sbox}\fbox{TheSbox}}
    
    \begin{fminipage}{200pt}
    This is a framed minipage\footnote{not a parbox!}.
    We can use this framed minipage with fancybox package.
    \end{fminipage}
    
  2. minipage¸¦ lrbox ȯ°æÀ¸·Î save¹Ú½ºÇÏ¿´´Ù°¡ flushÇÏ´Â ¹æ¹ý.
    \newsavebox{\mysavebox}
    \newenvironment{myframedminipage}%
      {\begin{lrbox}{\mysavebox}\begin{minipage}{\textwidth}}%
      {%
         \end{minipage}\end{lrbox}\fbox{\usebox{\mysavebox}}%
      }
    
    \begin{myframedminipage}
    ¿ì¸®Áý °­¾ÆÁö´Â º¹½½°­¾ÆÁö Çб³°¬´Ù µ¹¾Æ¿À¸é ¸Û¸Û¸Û ²¿¸®Ä¡¸ç ¹Ý°©´Ù°í ¸Û¸Û¸Û.
    ¿ì¸®Áý °­¾ÆÁö´Â º¹½½°­¾ÆÁö Çб³°¬´Ù µ¹¾Æ¿À¸é ¸Û¸Û¸Û ²¿¸®Ä¡¸ç ¹Ý°©´Ù°í ¸Û¸Û¸Û.
    \end{myframedminipage}
    
    \newsavebox{\mysavebox}
\newenvironment{myframedminipage}%
  {\begin{lrbox}{\mysavebox}\begin{minipage}{.5\textwidth}}%
  {\end{minipage}\end{lrbox}\fbox{\usebox{\mysavebox}}%
}
\begin{myframedminipage}
¿ì¸®Áý °­¾ÆÁö´Â º¹½½°­¾ÆÁö Çб³°¬´Ù µ¹¾Æ¿À¸é ¸Û¸Û¸Û ²¿¸®Ä¡¸ç ¹Ý°©´Ù°í ¸Û¸Û¸Û.
¿ì¸®Áý °­¾ÆÁö´Â º¹½½°­¾ÆÁö Çб³°¬´Ù µ¹¾Æ¿À¸é ¸Û¸Û¸Û ²¿¸®Ä¡¸ç ¹Ý°©´Ù°í ¸Û¸Û¸Û.
\end{myframedminipage}
  3. framed ÆÐÅ°ÁöÀÇ framed ȯ°æ(ÀÌ°ÍÀº ÆäÀÌÁö°¡ ³ª´©¾îÁö´Â °ÍÀ̹ǷΠBreakBoxes¸¦ Âü°íÇÒ °Í).
    \usepackage{framed}
    
    \begin{framed}
    ¿ì¸®Áý °­¾ÆÁö´Â º¹½½°­¾ÆÁö Çб³°¬´Ù µ¹¾Æ¿À¸é ¸Û¸Û¸Û ²¿¸®Ä¡¸ç ¹Ý°©´Ù°í ¸Û¸Û¸Û.
    ¿ì¸®Áý °­¾ÆÁö´Â º¹½½°­¾ÆÁö Çб³°¬´Ù µ¹¾Æ¿À¸é ¸Û¸Û¸Û ²¿¸®Ä¡¸ç ¹Ý°©´Ù°í ¸Û¸Û¸Û.
    \end{framed}
    
  4. ȯ°æ ³»ÀÇ ÅؽºÆ®¸¦ verbatim ÅؽºÆ®·Î ¿ÜºÎ ÀúÀåÇÏ¿´´Ù°¡ ºÒ·¯¿À´Â ¹æ¹ý.
    \usepackage{verbatim}
    \makeatletter
    \newwrite\myverb@out
    \def\outfilename{tmpout.tmp}
    \newenvironment{mfminpage}%
    	{\begingroup\@bsphack
    	 \immediate\openout\myverb@out\outfilename
    	 \let\do\@makeother\dospecials\catcode`\^^M\active
    	 \def\verbatim@processline{%
    	 	\immediate\write\myverb@out{\the\verbatim@line}}%
    	 \verbatim@start}%
    	{\immediate\closeout\myverb@out\@esphack\endgroup\fbox{\minipage{\textwidth}\input
             \outfilename\endminipage}\ignorespacesafterend}
    \makeatother
    
    \begin{mfminpage}
    ¿ì¸®Áý °­¾ÆÁö´Â º¹½½°­¾ÆÁö Çб³°¬´Ù µ¹¾Æ¿À¸é ¸Û¸Û¸Û ²¿¸®Ä¡¸ç ¹Ý°©´Ù°í ¸Û¸Û¸Û.
    ¿ì¸®Áý °­¾ÆÁö´Â º¹½½°­¾ÆÁö Çб³°¬´Ù µ¹¾Æ¿À¸é ¸Û¸Û¸Û ²¿¸®Ä¡¸ç ¹Ý°©´Ù°í ¸Û¸Û¸Û.
    \end{mfminpage}
    

4.2 °¡º¯Æø framebox¸¦ »ç¿ëÇÏ´Â ¹æ¹ý

  1. moreverb ÆÐÅ°ÁöÀÇ boxedverbatim ȯ°æÀº verbatim ÅؽºÆ®¸¦ ½ÄÀÚÇϸ鼭 °¡Àå ±ä ÁÙ¿¡ width¸¦ ¸ÂÃá´Ù.
  2. KTUGOperate:9455 pbox.sty
    %%------example-------
    \documentclass{article}
    \usepackage{hfont}
    \usepackage{pbox}
    
    \newcommand\myflexwidthbox[1]{%
    	\fbox{\pbox{\textwidth}{#1}}%
    }
    	
    \begin{document}
    
    \myflexwidthbox{
    °¡³ª´Ù¶ó \\
    Å×½ºÆ® \\
    ¾Ë¶óºä \\
    \textcopyright \texttrademark
    }
    
    \myflexwidthbox{
    °¡³ª´Ù¶ó Å×½ºÆ® \\
    ¾Ë¶óºä \\
    \textcopyright \texttrademark
    }
    
    \end{document}
    
  3. varwidth.sty
    %%--------- sample of varwidth ----
    \documentclass{article}
    \usepackage{hfont}
    \usepackage{varwidth}
    
    \begin{document}
    
    \fbox{\begin{varwidth}{.5\textwidth}
    °¡³ª´Ù¶ó \\
    Å×½ºÆ® \\
    ¾Ë¶óºä
    \end{varwidth}}
    
    \fbox{\begin{varwidth}{.5\textwidth}
    °¡³ª´Ù¶ó Å×½ºÆ® \\
    ¾Ë¶óºä
    \end{varwidth}}
    
    \end{document}
    

5 ±×¸²(picture) ȯ°æÀÇ ¹Ú½º


^
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2006-03-18 00:31:41
Processing time 0.0667 sec