KTUG 한국 텍 사용자 그룹

Menu

KTUG :: Q&A 마당

저 링크된 글에서 게시자가 말씀하셨듯이 이걸 굳이 패키지로 만들 필요가 없습니다. 패키지로 만드는 것은 색상이나 글꼴 따위를 변경할 수 있게 (configurable) 하려는 것인데, 경험상 그렇게 쓸 일 없습니다. 다음과 같은 정도면 충분하지 않을까 합니다.

circled.png

\documentclass[a4paper]{article}
\usepackage{xparse}
\usepackage{tikz}
\ExplSyntaxOn
\NewDocumentCommand\cirnum{ m }
{
    \raisebox{-.5ex}{
        \tikz\node[
            circle, draw=white, thin, inner~sep=0.25pt,
            top~color=black, bottom~color=black,
            text~width=1em,
            font=\sffamily\footnotesize\bfseries, text~badly~centered, white
            ]{#1};}
}
\NewDocumentCommand \cirnumuntil { m }
{
    \int_step_inline:nn { #1 }{ \cirnum{ ##1 }\space }
}
\ExplSyntaxOff
\begin{document}
\cirnumuntil{25}
\end{document}

KTUG 한국 텍 사용자 그룹