여기서 아래부분에 1 Princeton, 2 Stanford, 3 Caltech이 나오게 만들고 싶습니다.
라벨링 자체에는 문제가 없는것을 보아하니, 제가 출력을 시킬 때 아주 실수를 한 것 같습니다.
저렇게 하기 위해서는 어떻게 해야 할까요?
\documentclass{article}
\newcounter{affil}
\newcommand{\affilinfo}{}
\makeatletter
\newcommand{\affiliation}[2][\empty]{\refstepcounter{affil}
\ifx#1\empty
\g@addto@macro{\affilinfo}{$^{\csname theaffil\endcsname}$#2}
\else\label{#1}%
\g@addto@macro{\affilinfo}{$^{\csname theaffil\endcsname}$#2}
\fi
}
\affiliation[PR]{Princeton}
\affiliation[ST]{Stanford}
\affiliation[CT]{Caltech}
\newcommand{\myinfo}{\affilinfo}
\begin{document}
\ref{PR} Hello
\ref{ST} Hello
\ref{CT} Hello
\ref{ST} Hello
\myinfo
\end{document}
KTUG 한국 텍 사용자 그룹