KTUGFaq

KTUG FAQ

·Î±×ÀÎ:
ºñ¹Ð¹øÈ£:
°¡ÀÔ
Your aims are high, and you are capable of much.
FrontPage › xkeyval

¸ñÂ÷

1 º¯¼ö ¸¸µé±â
2 Á¶°Ç º¯¼ö (boolean) ¸¸µé±â
3 ¿¹Á¦

1 º¯¼ö ¸¸µé±â

4 °³ÀÇ ±æÀÌ º¯¼ö¸¦ ¸¸µé°í ±×°ÍµéÀ» ¼³Á¤ÇÏ´Â ¸í·ÉÀ» ¸¸µé¾î º¸ÀÚ.

\newlength{\nodewidth}
\newlength{\nodeheight}
\newlength{\ynodedistance}
\newlength{\xnodedistance}

\newcommand\setnodelengths[4]{
\setlength{\nodewidth}{#1}
\setlength{\nodeheight}{#2}
\setlength{\ynodedistance}{#3}
\setlength{\xnodedistance}{#4}
}

\setnodelengths{12em}{20pt}{7.5mm}{5mm}

°£´ÜÇÏ´Ù. ÇÏÁö¸¸ ÀÌ ¹æ½ÄÀº »ç¿ëÀÚ¿¡°Ô ¸Å°³ º¯¼öÀÇ ¼ø¼­¸¦ ¿Ü¿ìµµ·Ï ¿ä±¸ÇÑ´Ù. ¶ÇÇÑ ¹Ýµå½Ã ³× °³ º¯¼ö ¸ðµÎ¸¦ ÁöÁ¤Çϵµ·Ï ¿ä±¸ÇÑ´Ù. ³ªÁß¿¡ ÇÑ °³ÀÇ º¯¼ö °ª¸¸ ¹Ù²Ü ¼ö ÀÖÁö ¾ÊÀº°¡? xkeyval ÆÐÅ°Áö¸¦ ÀÌ¿ëÇÏ¿© ¸Å°³ º¯¼öÀÇ À̸§À» ÁöÁ¤ÇÏ°í °ªÀ» ºÎ¿©ÇÏ´Â ¹æ½ÄÀ¸·Î ¸¸µé¾î º¸ÀÚ.
\RequirePackage{xkeyval}

\newlength{\nodewidth}
\newlength{\nodeheight}
\newlength{\ynodedistance}
\newlength{\xnodedistance}

\define@key{node}{nodewidth}{
        \setlength{\nodewidth}{#1}
}
\define@key{node}{nodeheight}{
        \setlength{\nodeheight}{#1}
}
\define@key{node}{xnodedistance}{
        \setlength{\xnodedistance}{#1}
}
\define@key{node}{ynodedistance}{
        \setlength{\xnodedistance}{#1}
}
\newcommand\setnodelengths[1]{
        \setkeys{node}{#1}
}

\setnodelengths{nodewidth=12em,nodeheight=20pt,xnodedistance=7.5mm,ynodedistance=7.5mm}

2 Á¶°Ç º¯¼ö (boolean) ¸¸µé±â


\define@boolkey{spec}{HD}[true]{}

\setkeys{spec}{HD}´Â \setkeys{spec}{HD=true}¿Í °°´Ù.¿Ö³ÄÇÏ¸é µðÆúÆ®·Î true°¡ ÁöÁ¤µÇ¾î Àֱ⠶§¹®ÀÌ´Ù. ¹èŸÀûÀÎ º¯¼ö¸¦ Çϳª ¸¸µé¾îº¸ÀÚ.

\define@boolkey{spec}{SD}[true]{}

SD°¡ true·Î ÁöÁ¤µÈ´Ù¸é HD°¡ false°¡ µÇ¾î¾ß ÇÑ´Ù. ¶Ç ±× ¹Ý´ëµµ ¼º¸³µÇ¾î¾ß ÇÑ´Ù.

\define@boolkey{spec}{SD}[true]{
   \ifKV@spec@SD
     \setkeys{spec}{HD=false}
   \fi
}

\define@boolkey{spec}{HD}[true]{
   \ifKV@spec@HD
     \setkeys{spec}{SD=false}
   \fi
}

KV@spec@HD´Â \define@boolkey¿¡ ÀÇÇØ ¸¸µé¾îÁö´Â º¯¼öÀÌ´Ù. ÀÌ°ÍÀ» tex ÆÄÀÏ¿¡¼­ ifthen ÆÐÅ°ÁöÀÇ \ifthenelse ¸í·É¿¡µµ ´ç¿¬È÷ ¾µ ¼ö ÀÖ´Ù.

\ifthenelse{\boolean{KV@spec@HD}}{ ... }{ ...}



^
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-11-18 14:07:57
Processing time 0.0434 sec