KTUGFaq
KTUG FAQ
FrontPage › \expandafter
- AMSLaTeX/Hangul . . . . 1 match
A. amsbookÀÇ {{{\uppercase\expandafter}}} ÄÚµå´Â ASCII ÀÌ¿ÜÀÇ ÄÚµå¿Í ȣȯ¼ºÀÌ ¾ø½À´Ï´Ù. Áï ¿µ¾î ÀÌ¿ÜÀÇ ¶óƾ °è¿ ¾ð¾î¿¡¼Á¶Â÷ ¹®Á¦°¡ »ý±ä´Ù´Â °ÍÀÔ´Ï´Ù. amsbook.clsÀÇ ¹ö±×¶ó°í ¾Ë·ÁÁ® ÀÖ½À´Ï´Ù. comp.text.tex¿¡ °ü·ÃµÈ ´ëÈ°¡ Àִµ¥... "ºÒÆòÇÏ´Â »ç¶÷ÀÌ ¾øÀ¸¸é °íÄ¡´Â »ç¶÷µµ ¾ø´Ù"´Â ´äº¯À» ´©±º°¡ ´Þ¾ÆµÎ¾ú´õ±º¿ä. \MakeUppercase ¶Ç´Â \MakeTextUppercase¸¦ »ç¿ëÇϵµ·Ï °íÃÄ¾ß ÇÕ´Ï´Ù. - Conditionals . . . . 9 matches
\expandafter\def\csname\expandafter\@gobbletwo\string#1%
\expandafter\@gobbletwo\string#2\endcsname
\ifnum \expandafter\the\csname c@#1\endcsname < \for@loopend\relax
\ifnum \expandafter\the\csname c@#1\endcsname < \for@loopend\relax
\iden{\expandafter\strip
\expandafter#1#1\@gobble\@gobble} \@gobble\fi}
\iden{\expandafter\strip
\expandafter#1#1\@gobble\@gobble} \@gobble\fi} - DHUcs/´ëÈ . . . . 7 matches
\expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
\expandafter{\the\dh@prerender@toks^^J\dhucsPrerenderUnicode{#1}}%
\expandafter\josa@lastt@kens\josa@tempa\josa@nil\empty\empty\empty
\expandafter\josa@last@\josa@tempb}
\global\dh@prerender@toks\expandafter{\the\dh@prerender@toks^^J%
\global\dh@prerender@toks\expandafter{\the\dh@prerender@toks^^J%
\expandafter{\the\dh@prerender@toks^^J\dhucsPrerenderUnicode{#1}}% - HANGULkStyle . . . . 1 match
* redundant `\expandafter` Á¦°Å (suggested by DohyunKim) - Karnes/2006-06 . . . . 2 matches
{\setcounter{mycnt}{0}\everypar\expandafter{\stepcounter{mycnt}}%
\def\hfontfamilynameprefix{\expandafter\FirstTwoOfFour\h@ng@ls@rif}% - Karnes/LaTeXTips . . . . 4 matches
\expandafter\def\csname hfnt#1\endcsname{%
\expandafter\strip@prefix\meaning\@currentlabelname
{\expandafter\strip@period\@currentlabstr\relax.\relax\@@@}%
\expandafter\parse\temptokstre@m - LittleTree/ReadingTeXbook/2006-03 . . . . 18 matches
(\expandafter ¿Í ¾à°£ ºñ½ÁÇÑ ¹º°¡°¡ ´À²¸Áý´Ï´Ù. :) )
{{{#!blog ÀÛÀº³ª¹« 2006-03-25T06:14:27 expandafter(2): ½Ã°£Â÷ °ø°Ý
¸í·É¾î \expandafter´Â ±²ÀåÈ÷ Àç¹ÌÀÖÀ¸¸é¼µµ º¸±âº¸´Ù´Â ±×´ÙÁö ¾î·Á¿î ¸í·É¾î°¡ ¾Æ´Ï¾ú½À´Ï´Ù.
¹è±¸¿¡ "½Ã°£Â÷ °ø°Ý" À̶ó´Â °ø°Ý ±â¼úÀÌ ÀÖÁÒ? ¼¼ÅÍ°¡ ¹è±¸ °øÀ» Å佺¸¦ ÇÏ¸é µÎ ¸íÀÇ °ø°Ý¼ö°¡ ±â´Ù¸®°í ÀÖ´Ù°¡, ù¹ø° °ø°Ý¼ö°¡ ¸¶Ä¡ ½ºÆÄÀÌÅ©¸¦ ÇÒ°Í Ã³·³ ÇÏ´Ù°¡ µÎ¹ø° °ø°Ý¼ö°¡ ½ÇÁ¦·Î ½ºÆÄÀÌÅ© °ø°ÝÀ» ÇÕ´Ï´Ù. \expandafter´Â ¹Ù·Î ÀÌ ¹è±¸ÀÇ "½Ã°£Â÷ Àü°³"¿¡ ÇØ´çÇÕ´Ï´Ù. \expandafter°¡ ¼¼ÅÍ¿¡ ÇØ´çÇÏ°í ±× µÚ¿¡ µû¶ó ³ª¿À´Â µÎ°³ÀÇ ¸í·É¾î(control sequence)°¡ µÎ ¸íÀÇ °ø°Ý¼ö¿¡ ÇØ´çÇÕ´Ï´Ù.
\expandafter´Â ù¹ø° ³ª¿À´Â ¸ÅÅ©·Î¸¦ Àü°³½ÃÅ°´Â °ÍÀÌ ¾Æ´Ï¶ó µÎ¹ø° ³ª¿À´Â ¸ÅÅ©·Î¸¦ Àü°³ ½ÃÅ°°í, ±× Àü°³µÈ °á°ú¸¦ ù¹ø° ¸ÅÅ©·Î°¡ ÀÌ¿ëÇÕ´Ï´Ù. ¸Å¿ì Àç¹ÌÀÖ½À´Ï´Ù.
°ú °°ÀÌ Àü°³µË´Ï´Ù. ÀÌ°ÍÀº ´©±¸³ª ¾Ë¼ö ÀÖ½À´Ï´Ù. ÀÌÁ¦ \expandafter¸¦ ÀÌ¿ëÇؼ ½Ã°£Â÷ °ø°Ý¿¡ µé¾î°©´Ï´Ù.
\expandafter\lookatletters\letters ? !
´Â ¾î¶»°Ô Àü°³µÉ±î¿ä? ¸ÕÀú \expandafter´Â \letters¸¦ ¸ÕÀú Àü°³ ½Ãŵ´Ï´Ù. ±×·¡¼ À§ÀÇ ¹®ÀåÀº
{{{#!blog ÀÛÀº³ª¹« 2006-03-23T02:39:43 \expandafter (1)
'''213ÂÊ''': TeXbook¿¡ \expandafterÀÇ ¼³¸íÀº ¾Æ·¡ÀÇ ¼³¸íÀÌ ÀüºÎÀÔ´Ï´Ù. ¿¹Á¦µµ ¾ø½À´Ï´Ù. ÀúÀÚ°¡ ³Ê¹«µµ ¹«½ÉÇÏ°í ¹è·Á°¡ ¾ø½À´Ï´Ù. :(
* '''\expandafter'''<token>. TeX first reads the token that comes immediately after \expandafter, without expanding it; let's call this token ''t''. Then TEX reads the token that comes after ''t'' (and possibly more tokens, if that token has an argument), replacing it by its expansion. Finally TeX puts ''t'' back in front of that expansion.
Àú·¸°Ô¸¸ ¼³¸íÇسõ°í, ¿¹Á¦µµ ¾Èµé¾î ³õ¸é, Àú °°Àº ÛíìÑÀº Àú°É ¹«½¼ ¼ö·Î ÀÌÇØÇմϱî. '¼³¸¶ ¿¹Á¦°¡ ¾øÀ»±î?' ÇÏ´Â Àǽɿ¡ À妽º¸¦ ã¾Æº¸´Ï °÷°÷¿¡ \expandafter°¡ »ç¿ëµÈ ¿¹Á¦°¡ ÀÖ¾ú½À´Ï´Ù. Á¦ÀÏ ¸ÕÀú ³ª¿À´Â ¿¹Á¦´Â 40ÂÊ¿¡ ÀÖ½À´Ï´Ù. ±×°ÍÀ» º» ¼ø°£, "\expandafter °°Àº ¾î·Á¿î(?) ¸í·É¾î°¡ 40ÂÊ¿¡ ³ª¿Í?" Çß½À´Ï´Ù. ¹°·Ð ¼³¸í ¾Õ¿¡´Â µÎ °³ÀÇ dangerous bend°¡ ¾î±è¾øÀÌ ºÙ¾îÀÖ¾ú½À´Ï´Ù. °øÆ÷ÀÇ ±âÈ£°¡ ¾Æ´Ò ¼ö ¾ø½À´Ï´Ù.
¸¶À½À» °¡´Ùµë°í ´ÙÀ½¿¡ °°ÀÌ \expandafter¸¦ ÀÌÇØÇØ º¸µµ·Ï ÇսôÙ. TeXbook ÀÌ°÷ Àú°÷¿¡ ³ª¿ÍÀÖ´Â \expandafter ¿¹Á¦¸¦ Àß °øºÎÇÑ ´ÙÀ½¿¡ ºË°Ú½À´Ï´Ù. ;)
ÀÌ ¿Ü¿¡µµ \expandafter, \noexpand ... ÂÁ. ±×·¡¼ Çϳª¾¿ ¾Ë¾Æº¸±â·Î ±»°Ô ¸¾¸Ô¾ú½À´Ï´Ù. - LittleTree/ReadingTeXbook/2006-04 . . . . 46 matches
'''TeXbyTopic 118~119ÂÊ, TeXbook 374ÂÊ''': \expandafter°¡ »ç¿ëµÇ´Â ÀüÇüÀûÀÎ ¿¹Á¦´Â ´ÙÀ½°ú °°Àº °æ¿ìÀÔ´Ï´Ù.
#1{\expandafter\advance\csname
\expandafter°¡ À¯¿ëÇÑ ¶Ç´Ù¸¥ °æ¿ì´Â
\uppercse\expandafter{\romannumeral \year}
ÇÏÁö¸¸ À§Ã³·³ \expandafter¸¦ »ç¿ëÇÏ¸é ¸ÅÅ©·Î¸¦ Àü°³ ½ÃÅ°°í ±× °á°ú¸¦ ´ë¹®ÀÚ·Î ¹Ù²Ü ¼ö ÀÖ½À´Ï´Ù.
#1{\expandafter\global\expandafter\advance
\expandafter\a\b¶ó°í Çϸé Àü°³ ¼ø¼´Â \b, \aÀÔ´Ï´Ù. Áï, Àü°³ ¼ø¼´Â ÁÖ¾îÁø cs ¼ø¼ÀÇ ¿ª¼øÀÔ´Ï´Ù. ±×·¸´Ù¸é \a\b\c°¡ ÁÖ¾îÁ³À»¶§, \c, \b, \a ¼øÀ¸·Î Àü°³ÇÏ°í ½ÍÀ¸¸é ¾î¶»°Ô ÇÏ¸é µÉ±î?
\expandafter\expandafter\expandafter\a\expandafter\b\c
À§ ¹®ÀåÀº \expandafterÀÇ Àǹ̸¦ Ãæ½ÇÈ÷ µû¶ó¼ Àü°³Çϸé, Á¦ÀϸÕÀú \c¸¦ Àü°³½ÃÅ°°í,
\expandafter \a \b
\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter\a
\expandafter\expandafter\expandafter\b\expandafter\c\d
\def\reverse#1*{\foo={} \def\stuff{#1 } \expandafter\xreverse\stuff * \the\foo}
\def\reverse#1*{\foo={} \def\stuff{#1 } \expandafter\xreverse\stuff * \the\foo}
\def\wstuff{#1 }\leavevmode\expandafter\ulword\wstuff * }
\def\wstuff{#1 }\leavevmode\expandafter\ulword\wstuff * }
ÀÌ ±ÛÀº Plain TeXÀ¸·Î °£´ÜÇÑ ¸ÅÅ©·Î¸¦ ¸¸µé¾î º» °æÇèÀÌ ÀÖ°í, TeX¿¡ ´ëÇÑ ¾à°£ÀÇ Áö½ÄÀÌ ÀÖÀ¸³ª, TeXÀÇ °æÇèÀÌ Ç³ºÎÇÏÁö´Â ¾Ê°í, ÇÏÁö¸¸ ¸ÅÅ©·ÎÀÇ À§·Â¿¡ ¹ÝÇØ ¸ÅÅ©·Î¸¦ ÀÛ¼ºÇÏ°íÀÚ ÇÏ´Â »ç¶÷µéÀ» À§ÇÑ ±ÛÀÔ´Ï´Ù. µû¶ó¼ ÀÌ ±ÛÀ» Àд ÀÌ´Â Àû¾îµµ \global, \outer, \long, \def, \edef, \let, \futurelet, \if, \expandafter, ... µîÀ» ÀÚÀ¯ÀÚÀç·Î »ç¿ëÇÒ ¼ö´Â ¾øÀ»Áö¶óµµ ÇÑ ¹øÂë °ü½ÉÀÖ°Ô º» ÀûÀÌ ÀÖ´Ù°í °¡Á¤ÇÏ°Ú½À´Ï´Ù. ¶ÇÇÑ ÀÌ ±ÛÀº ÀÛÀº³ª¹«°¡ TeXÀ» °øºÎ¸¦ ÇÏ´Ù°¡ ´À³¤ ¾î·Á¿î Á¡µéÀ» ÀÛÀº³ª¹«¿Í °°Àº Ãʺ¸ÀÚÀÇ ´«³ôÀÌ¿¡¼ ¾´ ±ÛÀ̱⵵ ÇÕ´Ï´Ù. TeXÀÇ Àü¹®°¡µéÀº ¿Ö µµ´ëü TeX ¸ÅÅ©·Î¸¦ ±×·¸°Ô ¾î·Æ°Ô ÀÛ¼ºÇÏ°í, ¼³¸íÀ» ´Þ¾Æ ³õ´Âµ¥ ÀλöÇÑÁö ¸ð¸£°Ú½À´Ï´Ù.
²¿¸® Àç±Í ±â¹ýÀº ÁÖ·Î ¸ÅÅ©·ÎÀÇ ÀÎÀÚ¸¦ ±¸¼ºÇÏ´Â ÅäÅ«µéÀ» Çϳª¾¿ ó¸® ÇÏ´Â µ¥¿¡ ÁÖ·Î »ç¿ëµË´Ï´Ù. ¿¹¸¦µé¾î, ÁÖ¾îÁø ÀÎÀÚ¿¡¼ ¾ËÆĺª ´ë¹®ÀÚÀÇ °¹¼ö¸¦ ¼¼´Â \countucletter{AbcDEFghIj}¶ó´Â ¸ÅÅ©·Î°¡ ÀÖÀ» ¶§, ÀÌ ¸ÅÅ©·Î°¡ A, b, c, D, E, ... ÇϳªÀÇ ¹®ÀÚ ÅäÅ«¿¡ °¢°¢ Àû¿ëµÇ´Â °Í°ú °°Àº °æ¿ìÀÔ´Ï´Ù. ÀÌ·¯ÇÑ °¢°¢ÀÇ ÅäÅ«¿¡ Àû¿ëµÇ´Â ÀÌ ±â¹ýÀº ´Ù¸¥ ¸¹Àº ±â¹ýÀÇ ±âº»ÀÌ µÇ±âµµ ÇÏ°í, À̸¦ ÀÀ¿ëÇÒ °÷ ¶ÇÇÑ ¸Å¿ì ¸¹½À´Ï´Ù. ¿¹¸¦ µé¾î °¢°¢ÀÇ ÅäÅ«ÀÌ ¾Æ´Ï¶ó ´Ü¾î¿¡ Àû¿ëµÇ±âµµ ÇÕ´Ï´Ù. ÀÌ ±â¹ýÀº ÁÖ¾îÁø ¸ÅÅ©·Î°¡ ¾î¶² Á¶°Ç ÇÏ¿¡¼ ÀÎÀÚÀÇ ÅäÅ«¿¡ Çϳª¾¿ Àû¿ëµÇ¹Ç·Î "Á¶°Ç, ¹Ýº¹"¿¡ ´ëÇÑ primitive°¡ ÁÖ·Î »ç¿ëµË´Ï´Ù. µû¶ó¼ \let, \if, \expandafter µîÀÇ primitive¿¡ ´ëÇÑ Áö½ÄÀÌ ¿ä±¸µË´Ï´Ù. ÀÌ¿¡ ´ëÇÑ Áö½ÄÀº ''The TeX book, TeXByTopic'' µîÀÇ Âü°í¼¿¡¼ ã¾Æ º¼ ¼ö ÀÖ½À´Ï´Ù. ÀÌ ±â¹ýÀº ´ë°³ ¾Æ·¡¿Í °°Àº ¸ð¾çÀ» ÇÏ°í ÀÖ½À´Ï´Ù.
¸ÅÅ©·Î \bar´Â ÇϳªÀÇ ÀÎÀÚ¸¦ °®´Âµ¥, À§ °æ¿ì´Â ġȯ¹®(replacement text)¿¡¼ \fi°¡ ¹Ù·Î \barÀÇ ÀÎÀÚ°¡ µÇ¾î¹ö·Á¼ Àü°³°¡ ¾û¸ÁÀÌ µË´Ï´Ù. ÁÖÀÇ ÇϽñ⠹ٶø´Ï´Ù. "³ª´Â \letÀ» Á׾ »ç¿ëÇϱ⠽ȴÙ." ÇϽô ºÐÀº \expandafter¸¦ »ç¿ëÇÏ¿© ´ÙÀ½°ú °°ÀÌ ÇÏ¸é µË´Ï´Ù. - LittleTree/ReadingTeXbook/2006-08 . . . . 12 matches
\def\@if#1#2{\csname\expandafter\if@\string#1#2\endcsname}
\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter
\def\@if#1#2{\csname\expandafter\if@\string#1#2\endcsname}
ÀÏ´Ü ¿ì¸®´Â "@", "\expandafter", "\csname \endcsname" ÀÌ·±°Å ³ª¿À¸é ÀÏ´Ü ÂδϴÙ. ^^ ±×·¡µµ ±×µ¿¾È °øºÎÇØ µÐ °ÍÀÌ ÀÖ¾î¼ Â÷±ÙÂ÷±Ù ÀÐ¾î º¸¾Ò½À´Ï´Ù. ±×·°Àú·° °¨Åºµµ ÇØ°¡¸ç, "ÀÌ·¸°Ô Çϴ°ű¸³ª" ÇÏ°í °ÅÀÇ °¨À» Àâ¾Ò½À´Ï´Ù. ÇÏÁö¸¸ µµÀúÈ÷ ÀÌÇØ ¸øÇÒ °ÍÀÌ Çϳª ÀÖ½À´Ï´Ù. ¹Ù·Î ¸Ç ¸¶Áö¸· ÁÙ.
\def\atest#1{\expandafter\a\the#1*\atest\a}
À§¿Í °°ÀÌ ¸ÅÅ©·Î¸¦ Á¤ÀÇÇÏ°í "\atest\t"¶ó°í Çϸé \t ¿¡ º°Ç¥°¡ ÀÖ´ÂÁö¿¡ ¿©ºÎ¿¡ µû¶ó \ifresultÀÇ °ªÀÌ °áÁ¤ÀÌ µË´Ï´Ù. µ¿ÀÛÇÏ´Â ¿ø¸®¸¦ ¾Ë¾Æº¸½Ã°Ú½À´Ï±î? ¿¹Àü¿¡ ÀÛÀº³ª¹«°¡ ¿½ÉÈ÷ ¿Ã·È´ø \expandafter¿Í ±× ¹ÛÀÇ Ã³À½º¸´Â ¸í·É¾îµéÀ» °øºÎÇϽøé, ¾Æ¹«°Íµµ ¾Æ´Ï¶ó´Â °ÍÀ» ¾Æ½Ã°Ô µÉ°ÍÀÔ´Ï´Ù. ÆÄÀÏÀÇ ¸Ç óÀ½¿¡ \tracingmacros=2¿Í \tracingcommands=2 ¶ó°í ÇØ ³õÀ¸½Ã¸é, À§ ¸ÅÅ©·ÎµéÀÇ µ¿ÀÛ ¿ø¸®¸¦ ´õ¿í ½±°Ô ÆÄ¾Ç ÇÒ ¼ö ÀÖÀ» °ÍÀÔ´Ï´Ù.
\def\btest#1{\expandafter\b\the#1*\bb} - LittleTree/ReadingTeXbook/2006-09 . . . . 12 matches
'''213ÂÊ''': \expandafter
\expandafter\expandafter\expandafter\square\expandafter\add\divtwo
\expandafter\expandafter\expandafter\square\expandafter\add\divtwo
expandafter¸¦ ³²¹ßÇÔÀ¸·Î½á °ñ¸Ó¸®¸¦ ½â°Ô ÇÏ°í ¹Î½ÉÀ» ÈäÈäÇÏ°Ô ÇÑ Çã¹°, °áÄÚ °¡º±´Ù ÇÒ ¼ö ¾øÀ¸¸®¶ó »ç·áµË´Ï´Ù.^^ expandafter¸¦ ½Ï °È¾î³»°í ÄÄÆÄÀÏÇØ ºÃ´õ´Ï ¾ó·¹~ °á°ú´Â µ¿ÀÏÇÏ´õ±º¿ä -.-;; -- DohyunKim [[DateTime(2006-09-01T05:12:59)]]
TeXbyTopic 12.3.1À» º¸¸é °³³äÀÌ ³ª¿ÍÀÖ½À´Ï´Ù. ''One step expansion: \expandafter'' -- DohyunKim [[DateTime(2006-09-01T07:14:17)]] - PDFManipulation . . . . 1 match
\ifnum \expandafter\the\csname c@#1\endcsname < \for@loopend\relax - PrimitiveControlSequences . . . . 1 match
*[[\expandafter]] - ¿ø±ÛÀÚ . . . . 1 match
\begin{enumerate}[\expandafter\myNum1] - ÀÛÀº³ª¹«/2006-05 . . . . 1 match
\def\iterate{\body\expandafter\iterate\else\fi} - ÀÛÀº³ª¹«/2008-05 . . . . 1 match
\let\ea\expandafter - ÀÛÀº³ª¹«/2008-08 . . . . 2 matches
\newcommand{\Romannumeral}[1]{\expandafter\@slowromancap\romannumeral #1@}
\def\BigRoman{\uppercase\expandafter{\romannumeral\count255}} - Âü°í¹®ÇåÀοë . . . . 3 matches
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}
\expandafter\ifx\csname url\endcsname\relax
\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }