2012/01/05 14:18
레이텍 (LaTeX)
\newcommand\selectedmark{...}
\newcommand\unselectedmark{...}
\newcommand\selectednum{}
\newcounter{optionnum}
\newcommand\selectedlabel{
\setcounter{optionnum}{0}
\renewcommand\makelabel{
\stepcounter{optionnum}
\ifthenelse{\value{optionnum}=\selectednum}{\selectedmark}{\unselectedmark}}}
\newenvironment{selected}[1]{
\begin{list}{}{
\renewcommand\selectednum{#1}
\selectedlabel
}}{\end{list}}
\begin{document}
\mainmatter
\chapter{Rules of capitalization in titles}
Capitalize the first word of the title and all proper nouns.
\begin{selected}{2}
\item book
\item chapter
\item section
\item subsection
\item paragraph
\end{selected}
\end{document}
두 개 이상을 선택할 수 있게 만들려면 어떻게 해야 할까? 모르겠다.
'레이텍 (LaTeX)' 카테고리의 다른 글
| 행간 (0) | 2012/01/09 |
|---|---|
| 선택지 II (0) | 2012/01/06 |
| 선택지 (0) | 2012/01/05 |
| 면주에서 돌아가는 바퀴 II (0) | 2011/12/29 |
| Texmaker (0) | 2011/12/28 |
| M's TeX Helper (0) | 2011/12/27 |

