네, 항상 방법은 있습니다. 새로운 매크로를 만들어서 저 두 개를 한 번에 쓸 수 있게 하면 됩니다.
여러 일을 동시에 해주는 매크로도 만들 수 있습니다:
\documentclass{article}
\usepackage{kotex}
\usepackage{xcolor}
\usepackage{relsize}
\usepackage{makeidx}
\renewcommand*{\indexname}{찾아보기}
\makeindex
% Korean-English, e.g., \alt{메모리 재활용}{garbage collection}
% \alt*을 통해 찾아보기에 추가, \alt는 단순히 한영 병기
% <>안에는 참조할 다른 개념 제시
\ExplSyntaxOn
\NewDocumentCommand { \myindex } { s m m }
{
\IfBooleanTF {#1}
{ \index{#2!#3|textbf}\index{#3!#2|textbf} }
{ \index{#2!#3}\index{#3!#2} }
}
\NewDocumentCommand { \alt } { s m O{#2} d<> m O{#5} d<> }
{
#2\,{\color{gray!50!darkgray}\smaller\textit{#5}}\hspace{.06667em}
\IfBooleanT {#1}
{
\myindex{#3}{#6}
\IfNoValueTF {#4}
{
\IfNoValueF {#7}
{ % See English
\index{#6|see{#7}}
}
}
{
\IfNoValueTF {#7}
{ % See Korean
\index{#3|see{#4}}
}
{ % See both
\index{#3|see{#4}}\index{#6|see{#7}}
}
}
}
}
\ExplSyntaxOff
\begin{document}
\alt*{메모리 재활용}{garbage collection}은 \alt{프로그램}{program}에서 더 이상 쓰이지 않는 자원을 자동으로 찾아서 재활용하는 기술이다.
\printindex
\end{document}
네, 항상 방법은 있습니다. 새로운 매크로를 만들어서 저 두 개를 한 번에 쓸 수 있게 하면 됩니다.
여러 일을 동시에 해주는 매크로도 만들 수 있습니다:
본문:
찾아보기: