KTUGFaq

KTUG FAQ

"\let"¿¡ ´ñ±Û ´õÇϱâ

·Î±×ÀÎ:
ºñ¹Ð¹øÈ£:
°¡ÀÔ
You have a strong desire for a home and your family interests come first.
FrontPage › LittleTree/ReadingTeXbook/2006-03
Mar 21, 2006
\let
Submitted by ÀÛÀº³ª¹« @ 03-21 [10:06 am]
206~207ÂÊ: TeX¿¡¼­ Æí¸®Çϸ鼭µµ Áß¿äÇÑ ¸í·É¾î ÁßÀÇ Çϳª°¡ ¹Ù·Î \letÀÔ´Ï´Ù. ÀÌ´Â plain.texÀ̳ª lplain.tex¿¡¼­ ½¢ÇÏ°Ô ¾²ÀÔ´Ï´Ù. \letÀº ´ÙÀ½°ú °°Àº Çü½ÄÀ» ÃëÇϴµ¥,
\let\cs=<token>
ÀÌ´Â \cs¿¡ <token>ÀÌ ÇöÀç °¡Áö°í ÀÖ´Â Àǹ̸¦ ºÎ¿©ÇÑ´Ù´Â ¶æÀÔ´Ï´Ù. Àç¹ÌÀÖ´Â Á¡Àº <token>ÀÌ ´Ù¸¥ ¸í·É¾î(control sequence)ÅäÅ« À϶§ Àε¥, ÀÌ ¶§µµ ¸¶Âù°¡Áö·Î ±× ¸í·É¾î°¡ °¡Áö°í ÀÖ´Â ±â´É ±×´ë·Î¸¦ \cs¿¡°Ô ¹°·ÁÁÝ´Ï´Ù. ¿¹¸¦µé¾î, '\let\a=\def'¶ó°í ÇÏ°í, '\a\b...{...}'¶ó°í Çϸé, \a°¡ \defÀÇ ÀÇ¹Ì¿Í ±â´ÉÀ» ¹°·Á¹Þ¾Æ¼­, ¸ÅÅ©·Î \b¸¦ Á¤ÀÇÇÏ´Â °ÍÀÌ µË´Ï´Ù. ¶Ç, ¾Æ·¡ÀÇ Àǹ̴Â
\let\a=\b \let\b=\c \let\c=\a
¸í·É¾î \b¿Í \cÀÇ Àǹ̸¦ ¹Ù²Ù´Â °ÍÀÌ µË´Ï´Ù. ±×¸®°í, ´ÙÀ½°ú °°Àº ¹®ÀåÀº
\outer\def\a#1.{#1:} \let\b=\a
'\outer\def\b#1.{#1:} \let\a=\b'¿Í ¿ÏÀü µ¿ÀÏÇÕ´Ï´Ù.

\let¿¡ »ç¿ëµÈ <token>ÀÌ ´ÜÀÏ ¹®ÀÚ(single character)ÀÌ°í, ±× ¹®ÀÚ°¡ character code¿Í category codeÀÇ ½ÖÀ̶ó¸é, ¾î´À Á¤µµ±îÁö´Â ±× ¹®ÀÚ¿Í °°Àº ¿ªÇÒÀ» ÇÏÁö¸¸, ¾à°£ Â÷ÀÌÁ¡ÀÌ Àִٳ׿ä. ¿¹¸¦µé¾î, '\let\zero=0'¶ó¸é, \zero´Â ¼ýÀÚ 0ÀÇ Àǹ̸¦ °®Áö¸¸, 0ÀÌ ±×·¸µíÀÌ, \zero´Â ¼ýÀÚ »ó¼ö ¾È¿¡¼­´Â »ç¿ëµÉ ¼ö ¾ø½À´Ï´Ù. ¿Ö³ÄÇϸé, TeXÀº ¼ýÀÚ »ó¼ö¿¡ ¸ÅÅ©·Î°¡ ¾²¿´À» °æ¿ì, ±× ¸ÅÅ©·Î¸¦ Àü°³ÇÏ°í ³ª¸é ¸ÅÅ©·ÎµéÀÌ ¸ðµÎ ¼ýÀÚµé·Î ¹Ù²î¾î¾ß Çϴµ¥, \zero´Â ¸ÅÅ©·Î°¡ ¾Æ´Ï±â ¶§¹®¿¡ Àü°³°¡ µÇÁö¾ÊÀ¸¹Ç·Î, ¼ýÀÚ »ó¼ö¾È¿¡¼­´Â »ç¿ëµÉ ¼ö ¾ø´Ù°í ÇÕ´Ï´Ù. ¹«½¼ ¶æÀÎÁö ¾Ëµí ¸»µí ÇÏÁö¸¸, ÀúÀÚÀÇ ¸»´ë·Î¶ó¸é, ³ªÁß¿¡ ´Ù½Ã »ìÆ캼 ±âȸ°¡ Àִٳ׿ä. ¹Ï¾î¾ßÁÒ.

Ã¥¿¡ ³ª¿À´Â ¹®Á¦ Çϳª¸¸ Ç®¾îº¾½Ã´Ù.
  • Q: '\let\a=\b'¿Í '\def\a{\b}' µÑ »çÀÌÀÇ Â÷ÀÌÁ¡ÀÌ ÀÖ±â´Â Àִ°ǰ¡¿ä? ÀÖ´Ù¸é ¾î¶² Â÷ÀÌÁ¡ÀÌ ÀÖ³ª¿ä?
  • A: Â÷ÀÌ°¡ À־ ¾ÆÁÖ ¸¹´Ù³×¿ä.(Yes indeed.) ù¹ø°ÀÇ °æ¿ìÀÇ \a´Â \letÀÌ ½ÇÇàµÇ´Â ½ÃÁ¡ÀÇ \bÀÇ Àǹ̸¦ ¹Þ°í, µÎ¹ø°ÀÇ °æ¿ìÀÇ \a´Â ¸ÅÅ©·Î À̹ǷΠ\a°¡ »ç¿ëµÉ ¶§¸¶´Ù Àü°³µÇ¾î \b·Î ¹Ù²ò´Ï´Ù. ±×·¡¼­ ±× ¶§ÀÇ \a´Â \a°¡ Àü°³µÇ´Â ½ÃÁ¡ÀÇ \bÀÇ Àǹ̸¦ °®½À´Ï´Ù.

Á¦°¡ º» ¿¹ Áß¿¡ Á¦ÀÏ ½¬¿ü´ø °ÍÀ» Çϳª ¿¹·Î µé¾îµÎ°Ú½À´Ï´Ù. ¼º½ÇÇÑ µ¶Àڷμ­ ^^
\let\endpara\par
\def\newerpara{\par}
\def\par{\endpara\vskip2pt\hrule\vskip2pt}
\let\anotherpara\par

There are a variety of ways to create commands.
The one descriptoin given so far is to use def. \par
There are a variety of ways to create commands.
The one descriptoin given so far is to use def. \endpara
There are a variety of ways to create commands.
\let\par\endpara
The one descriptoin given so far is to use def. \anotherpara
There are a variety of ways to create commands.
The one descriptoin given so far is to use def. \newerpara
There are a variety of ways to create commands.
The one descriptoin given so far is to use def.

\bye
-- Karnes 2006-03-23 09:24:55

°¨»çÇÕ´Ï´Ù. ¸Ó¸®¿¡ ½ï½ïµé¾î¿É´Ï´Ù. ¾ÆÇÏ! Á¦°¡ ¾²°í ÀÖ´Â ±Û¿¡ ºÐ¸íÈ÷ Ʋ¸° ºÎºÐÀÌ ¸¹À» °ÍÀÔ´Ï´Ù. Ʋ¸° °÷Àº ¹Ù·Î Àâ¾Æ Áֽðí, Á¦ ¼³¸íÀÌ ºÎÁ·Çϴٰųª ¸ðÈ£ÇÏ´Ù ½ÍÀ¸½Ã¸é, À̹ø ó·³ °¡¸£Ä§À» Áֽñ⸦ ºÎŹµå¸³´Ï´Ù. "I hope to pick your brain about TeX." :) -- Anonymous 2006-03-23 11:58:19
À̸§:

¼­¸íÇÏÁö ¾Ê±â