\newcommand{\commandname}[number of arguments]{command text, using #1, #2 etc to denote arguments}コマンド定義例
\RequirePackage{ifthen} \newcommand{\weekday}[1]{% \ifthenelse{\equal{#1}{1}}{Monday}{}% \ifthenelse{\equal{#1}{2}}{Tuesday}{}% \ifthenelse{\equal{#1}{3}}{Wednesday}{}% \ifthenelse{\equal{#1}{4}}{Thursday}{}% \ifthenelse{\equal{#1}{5}}{Friday}{}% \ifthenelse{\equal{#1}{6}}{Saturday}{}% \ifthenelse{\equal{#1}{7}}{Sunday}{}% }tex ファイル中での使い方
weekday command: \weekday{3}\\
0 件のコメント:
コメントを投稿