<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%!TEX program = SpiX
%$ xelatex -synctex=1 $texname
\documentclass[chapter,a4paper,oneside,colorlinks]{oblivoir}

\usepackage{fancyvrb}

\usepackage{fapapersize}
\usefapapersize{*,*,30mm,50mm,35mm,*}

\setmainfont{TeX Gyre Pagella}
\setkomainfont(Noto Serif CJK KR)
\setkosansfont(Noto Sans CJK KR Light)(Noto Sans CJK KR Medium)

\usepackage{obchaptertoc}

\ExplSyntaxOn

\renewcommand*\sideparform{\raggedright}
\sideparmargin{right}
\NewDocumentCommand \pkgcmd { m }
{
	\cs{#1}
	\sidepar{\cs{#1}}
}

\ExplSyntaxOff

\makeatletter
\makechapterstyle{thisdoc}{%
%	\chapterstyle{section}
	\renewcommand\clearforchapter{\par}
	\setlength\beforechapskip{2\onelineskip}
%	\setlength\midchapskip{2pt}
	\renewcommand*\afterchapternum{\quad}
	\setlength\afterchapskip{1.33\onelineskip}
	\renewcommand*\chaptitlefont{\sffamily\bfseries\huge}
	\renewcommand*\chapnamefont{\sffamily\bfseries\Large}
	\renewcommand*\chapnumfont{\sffamily\bfseries\LARGE}
	\renewcommand*\pre@chapter{Chapter\:}
	\renewcommand*\post@chapter{}
	\renewcommand*\memendofchapterhook{\chaptertoc}
	\renewcommand*\printchapternum{\chapnumfont\thechapter}
}
\makeatother

\setlength\cftchapternumwidth{5em}
\renewcommand*\cftsectionpresnum{}
\setlength\cftsectionnumwidth{3.8em}
\setlength\cftsectionindent{1.2em}
\setlength\cftsubsectionnumwidth{2.8em}
\setlength\cftsubsectionindent{2.2em}
\chapterstyle{thisdoc}

\chaptertocmaxlevel{section}
\renewcommand*\chaptertocfont{\small}
\ChapterTOCFormat{
    \setpnumwidth{0em}
    \hypersetup{linkcolor=cyan}
    \renewcommand*\numberline[1]{}
    %%% section
	\setlength\cftsectionnumwidth{2em}
	\renewcommand*\cftsectiondotsep{\cftnodots}
	\renewcommand*\cftsectionleader{\;}
    \renewcommand*\cftsectionafterpnum{\hfill}
    \renewcommand*\cftsectionfont{\hfill}
    \renewcommand*\cftsectionformatpnum[1]{\textsubscript{\color{red}#1}}
    %%% subsection
    \TOCFormatsameas{subsection}{section}{dotsep,leader,afterpnum,font,formatpnum,numwidth}
}

\begin{document}

\calccentering{\unitlength}

\title{chapter toc for oblivoir}
\author{Nova de Hi}
%\date{2020/09/02 \quad v2.0}
\date{2024/01/31 \quad v4.0}
\begin{adjustwidth}{\unitlength}{-\unitlength}
\maketitle
\end{adjustwidth}

\tableofcontents

\chapter{ěěíę¸°}

\section{ę°ě}
chaptertocě ëí´ěë ę˛ěíě ě´ęłłě&nbsp;ęłłě ě´ë°ě&nbsp;ë° ěëŁ¨ěë¤ě´ ěěľëë¤. í¨í¤ě§ë ë§ęł&nbsp;ě. memoir ę´ë&nbsp;¨í´ě yihozeęťě (ě¸ě&nbsp;&nbsp;ě§ ę¸°ěľëě§ ěě§ë§) chaptertocëĽź ěí ě¸ëś íěź ę¸°ë˛ěźëĄ ě&nbsp;ěíě¨ë ę˛ë ěěë ę¸°ěľě´ ëë¤ě.

ęˇ¸ë°ë° ë­ę° oblivoirěě ęšëíę˛ ëěíě§ ěë&nbsp;ę°, ěë´ěź íë ęłłě´ ëëŹ´ ë§ë&nbsp;ę° íëëźęł&nbsp;ě. ěë(2019) memoir ě¤í°ëęˇ¸ëŁšěě ě´ ëŹ¸ě&nbsp;ëĽź ë¤ëŁ¨ěëë°, ęˇ¸ ë í&nbsp;ëĄ&nbsp;í ë´ěŠě ë°íěźëĄ í¨í¤ě§ëĄ ë§ë¤ěěľëë¤. ë¤ëĽ¸ ěśę°ě&nbsp;ě¸ ę˛ ěě´ ě¤ëĄě§ oblivoirě memoir ëŞë&nbsp;šë§ěźëĄ chaptertocëĽź ë§ë¤ëëĄ íěľëë¤.

ěŹěŠě¤ëŞěëĽź ë§ë¤ę¸° ęˇě°Žę¸° ëëŹ¸ě... ëłľěĄí í¨í¤ě§ë ěëęł&nbsp; í´ě, ěŹěŠë˛ě ěŹę¸°ě ę°ë¨í ę¸°ëĄí´ëĄëë¤.

\section{ěľě}

[v2.0] ë¤ě ěľěě ě¤ ě ěěľëë¤.
\begin{Verbatim}[baselinestretch=1.05]
\usepackage[level=part]{obchaptertoc}
\end{Verbatim}

levelëĄ ě&nbsp;ęłľí&nbsp; ě ěë ę°ě \verb|book|, \verb|part|ě´ęł&nbsp;, ę¸°ëł¸ę°ě \verb|chapter|ěëë¤.
ěëŹ´ ę˛ë ěŁźě§ ěěźëŠ´ ě´ ę°ě´ \verb|chapter|ě¸ ę˛ęłź ę°ěľëë¤.

ěëŹ´ë° ě¤ě&nbsp;ě´ ěěźëŠ´ \verb|\chaptertoc|ë ëšě°í chapterě ě&nbsp;ěŠëě§ë§, ë§ě˝ parttocëĽź ë§ë¤ęł&nbsp;ě íë¤ëŠ´, 
\begin{Verbatim}[baselinestretch=1.05]
\usepackage[level=part]{obchaptertoc}
\chaptertocmaxlevel{chapter}
\renewcommand\chaptertocfont{\normalfont\normalsize\selectfont}
\renewcommand\printparttitle[1]{#1\par\vspace{40pt}\chaptertoc}
\end{Verbatim}
ě´ë&nbsp;ę˛ íëŠ´ ëę˛&nbsp;ěľëë¤.

ě´ í¨í¤ě§ë partěë parttocëĽź ëśě´ęł&nbsp; chapterě ëë¤ě chaptertocëĽź ëśě´ë
(ëšěěě&nbsp;ě¸) ěíŠě ęł&nbsp;ë&nbsp;¤íě§ ěěěľëë¤. ë°ëźě, ëšëĄ parttocëĽź ěěąíëëźë 
ěě ëŞë&nbsp;šě ěŹě&nbsp;í \cs{chaptertoc}ěëë¤. ë¤ëĽ¸ ě¤ě&nbsp; ëŞë&nbsp;šë ë§ě°Źę°ě§ěëë¤.

ě´ í¨í¤ě§ë section tocëĽź ě§ěíě§ ěěľëë¤. ě&nbsp;ěë section ě´í ëëšě&nbsp;ě tocëĽź ëśě´ë ę˛ě
ëěźě¤ëźęł&nbsp; ěę°íęł&nbsp; ěěľëë¤. ęˇ¸ëŹëŻëĄ \texttt{level=section}ęłź ę°ě ěľěě
ě&nbsp;ęłľíě§ ěěľëë¤.

\chapter{ëŞë&nbsp;šęłź íŹë§¤í}

\section{ëŞë&nbsp;š}

\subsection{\cs{chaptertoc} ëŞë&nbsp;š}

ëŞë&nbsp;šě´ ěŁźě´ě§ ěěšě íěŹ chapterě chaptertocëĽź ěěíŠëë¤. ëł´íľě ěĽ íě´íě´ ëëęł&nbsp; ëł¸ëŹ¸ě´ ěěíę¸° ě&nbsp;ě ěěší&nbsp; íëęš \cs{memendofchapterhook}ě ëŁě´ëě´ë ëŠëë¤.

\subsection{\cs{ChapterTOCafterskiptrue}\texttt{|false}}

ëí´í¸ë trueěëë¤. ě´ ę°ě´ ě°¸ě´ëŠ´ \cs{chaptertoc}ëĽź ěěíęł&nbsp; \cs{par}í´ě¤ëë¤. ęˇ¸ë°ë° framed íę˛˝ě ëŁëë¤ë&nbsp;ę° ěĽěě íë&nbsp;¤ í&nbsp; ë ë§ě§ë§ě í ě¤ě´ ěę¸°ë ę˛ě ííźí´ěź í&nbsp; ëę° ěěľëë¤. ě´ë´ ë \cs{ChapterTOCafterskipfalse}ëĄ ě§ě&nbsp;íŠëë¤.

\subsection{\cs{chaptertocmaxlevel}}

chaptertocëĽź ě´ë ěě¤ęšě§ ë§ë¤ ę˛ě¸ę° ě§ě&nbsp;íŠëë¤. ě¸ěëĄ section, subsection ëą ěĽě&nbsp; ëŞë&nbsp;šě ě´ëŚě ě&nbsp;ě´ě¤ ě ěęł&nbsp;, depth ěš´ě´í°ëĽź ëíë´ë ěŤěëĽź ě&nbsp;ě´ë ëŠëë¤. ëí´í¸ë subsectionęšě§ëĽź chaptertocëĄ ë§ëë ę˛ěëë¤. 

\section{íŹë§¤í}

\subsection{\cs{ChapterTOCFormat} ëŞë&nbsp;š}

chaptertocě ëŞ¨ë&nbsp; íŹë§¤í ě¤ě&nbsp;ě memoirě \verb|\cft...| ëŞë&nbsp;šěźëĄ íŠëë¤. ęˇ¸ëŹë ě´ ëŞë&nbsp;šě ěŹě&nbsp;ěíë ě˝ëëĽź ęˇ¸ëĽ preambleě ëŁěźëŠ´ ęˇ¸ę˛ě ëŹ¸ě ě&nbsp;ě˛´ě tocě í´ëšíë ę˛ě´ ëę¸° ëëŹ¸ě chaptertocëĽź ěí cft ě¤ě&nbsp; ëŞë&nbsp;šë¤ě \cs{ChapterTOCFormat} ëŞë&nbsp;šě ě¸ěëĄ ěŁźě´ěź íŠëë¤. ěëĽź ë¤ëŠ´,
\begin{Verbatim}[baselinestretch=1.05]
\ChapterTOCFormat{%
	\renewcommand\cftsectionfont{\sffamily\small}
	\setlength{\cftsectionnumwidth}{3em}
}
\end{Verbatim}
ě´ë° ěěźëĄ ëŞ¨ë&nbsp; chaptertocěŠ cft ě¤ě&nbsp; ëŞë&nbsp;šë¤ě ěŹę¸°ě ëŞ¨ěě ě§ě&nbsp;íëŠ´ ëŠëë¤.

\subsection{\cs{chaptertocfont}}

ěě ëł´ě¸ ë°ě ę°ě´ chaptertoc ë´ě section, subsectionëąě í°í¸ëĽź ë¤ renewcommandí&nbsp; ě ěě§ë§, ę°ë chaptertoc ě&nbsp;ě˛´ě í°í¸ëĽź ě§ě&nbsp;íęł&nbsp; ěśě ëę° ěěľëë¤. ě´ę˛ě \cs{chaptertocfont}ëźë ë§¤íŹëĄëĽź ěŹě&nbsp;ěíëŠ´ ëŠëë¤. \cs{cftsectionfont} ëąě´ ě°ě&nbsp;ě´ęł&nbsp; ě´ë&nbsp;ę˛ ę°ëłě&nbsp;ěźëĄ í°í¸ëĽź ě§ě&nbsp;íě§ ěěë¤ëŠ´ \cs{chaptertocfont}ě ě¤ě&nbsp;ě ë°ëŚëë¤. ę¸°ëł¸ę°ě \verb|\rmfamily\normalsize|ěëë¤.

\subsection{\cs{TOCFormatsameas}}

ęˇ¸ë°ë° ě´ë° ěěźëĄ ě¤ě&nbsp;íë¤ëł´ëŠ´ sectioně ëí´ě í ě¤ě&nbsp;ě subsectioně ëí´ěë ěźěźě´ í´ěŁźě´ěź íë ę˛ě´ ęˇě°Žě ě ěěľëë¤. \cs{TOCFormatsameas} ëŞë&nbsp;šě 3ę°ě ě¸ěëĽź ěˇ¨íëë°, \verb|#1|ě ě¤ě&nbsp;íęł&nbsp;ě íë section level ě´ëŚ, \verb|#2|ë ě´ëŻ¸ ě¤ě&nbsp;ëě´ ěë section level ě´ëŚ, \verb|#3|ě ëěźíę˛ ëłę˛˝íęł&nbsp;ě íë ë§¤íŹëĄě ëě´ëŚěëë¤. ë¤ě ěë,
\begin{Verbatim}[baselinestretch=1.05]
\TOCFormatsamsas{subsection}{section}{dotsep,presnum}
\end{Verbatim}
ě´ę˛ě \cs{cftsubsectiondotsep}ě \cs{cftsectiondotsep}ęłź ę°ę˛ íęł&nbsp;, \cs{cftsubsectionpresnum}ě \cs{cftsectionpresnum}ęłź ëěźíę˛ ě¤ě&nbsp;íëźë ěëŻ¸ěëë¤. ë§ě§ë§ ě¸ěë íěí ę˛ě ë ěśę°í&nbsp; ě ěěľëë¤.


\chapter{ę¸°í}

\section{ě´ ěë´ëŹ¸ěě chaptertoc}

ěě&nbsp;ëĽź ę˛¸íěŹ ě´ ěë´ëŹ¸ěě chaptertocëĽź ě´ëťę˛ ë§ë¤ěëě§ ěę°íę˛&nbsp;ěľëë¤.

í¨í¤ě§ ěŹěŠě ě&nbsp;ě¸íŠëë¤.
\begin{Verbatim}[baselinestretch=1.05]
   \usepackage{obchaptertoc}
\end{Verbatim}

chapterstyleě ě&nbsp;ěíëŠ´ě \cmd{\memendofchapterhook}ě \cmd{\chaptertoc}ëĽź ěśę°íěŹ 
\cmd{\chapter} ëŞë&nbsp;šě´ ě¤íëëŠ´ í­ě \cmd{\chaptertoc}ëĽź ëśě´ëëĄ íěěľëë¤.
\begin{Verbatim}[baselinestretch=1.05]
	\renewcommand*\memendofchapterhook{\chaptertoc}
\end{Verbatim}

ë¤ě ë ě¤ě ě&nbsp;ě­ ě¤ě&nbsp;ěëë¤. chaptertocë section ěě¤ęšě§ë§ ë§ë¤ęł&nbsp; ëí´í¸ í°í¸ë \cmd{\small}ëĄ
íëźë ę˛ěëë¤. 
\begin{Verbatim}[baselinestretch=1.05]
    \chaptertocmaxlevel{section}
    \renewcommand*\chaptertocfont{\small}
\end{Verbatim}

ęˇ¸ëŚŹęł&nbsp; chaptertocě formatě ë¤ěęłź ę°ě´ ěŁźěěľëë¤.

\begin{Verbatim}[baselinestretch=1.05,numbers=left]
\ChapterTOCFormat{
    \setpnumwidth{0em}
    \hypersetup{linkcolor=cyan}
    \renewcommand*\numberline[1]{}
    %%% section
    \setlength\cftsectionnumwidth{2em}
    \renewcommand*\cftsectiondotsep{\cftnodots}
    \renewcommand*\cftsectionleader{\;}
    \renewcommand*\cftsectionafterpnum{\hfill}
    \renewcommand*\cftsectionfont{\hfill}
    \renewcommand*\cftsectionformatpnum[1]{\textsubscript{\color{red}#1}}
    %%% subsection
    \TOCFormatsameas{subsection}{section}{dotsep,leader,afterpnum,font,formatpnum,numwidth}
}
\end{Verbatim}

ě´ ě¤ě&nbsp; ěě ěë ę˛ě chaptertocěë§ ěíĽě ëŻ¸ěšŠëë¤. ë°ëźě ëŹ¸ě ě&nbsp;ě˛´ě \cmd{\tableofcontents}ěë 
ě´ ě¤ě&nbsp;ě í¨ęłźę° ëíëě§ ěěľëë¤.

2íě íě´ě§ ë˛í¸ëĽź ě°ë ë°ě¤ě í­ě¸ë°, ě´ ëŹ¸ěë ěľë í ěëŚŹě ëśęłźíëŻëĄ ě´ë&nbsp;ę˛ íěľëë¤. ěźë°ě&nbsp;ěźëĄ ě´ ě¤ě&nbsp;ě ëí´í¸ëĽź ęˇ¸ëëĄ ěŹěŠíë ę˛ě´ ě˘ěľëë¤.

3íě chaptertocě íě´í ěěěëë¤.

4íě ë§¤ě° íŹęˇí ěŹëĄěëë¤. ę°ë¨í ë§íěëŠ´, ``2.1 ę°ě''ě ę°ě´ ě´ëĽ¸ë° \dotemph{ě&nbsp; ë˛í¸}ëĽź 
chaptertocěěë ěěíě§ ěę˛&nbsp;ë¤ë ě&nbsp;ě¸ěëë¤. 

6íëśí° 11íęšě§ë section toc íŹë§ˇěëë¤. ě´ ę°ę°ě´ ëŹ´ěě ěëŻ¸íëę°ë memoir ë§¤ë´ěźě´ë, 
pgreenbook ë§¤ë´ěź(íę¸)ě ěě¸íŠëë¤.
ë¤ë§, ě´ë° ěěźëĄ íě´í ë¤ě íě´ě§ ë˛í¸ëĽź ë°ëĄ ëśěź ě&nbsp;ě, \cmd{\cftsectionafterpnum}ě ëł´íľ \cmd{\cftparfillskip}ě ěŁźě´ě \verb|\par|ę° ë°ëĄ í¨ęłźëĽź ë°ííëëĄ íŠëë¤ë§ ěŹę¸°ěěë íëŠ´ě ě¤ëĽ¸ěŞ˝ ëě ëśěź ěě&nbsp;(ě¤ëĽ¸ěŞ˝ ě&nbsp;ë&nbsp;Ź)ě´ëźě ě´ë° ěěźëĄ ě&nbsp;ěíěěľëë¤. ě­ě ěźë°ě&nbsp;ěźëĄ ě°ě´ë ę˛ě ěëě§ë§ ě°¸ęł&nbsp;ę° ëëŚŹëź ë´ëë¤.

ëŞ¨ë&nbsp; íě´ ě¤ëĽ¸ěŞ˝ ě&nbsp;ë&nbsp;ŹëëëĄ ë§ëë ę˛ě \cmd{\cftsectionfont}ëĽź \cmd{\hfill}ëĄ íë ę˛ě´ëźě
ěĄ°ę¸ í¸ëŚ­ě˛ëź ëł´ě´ę¸°ë íŠëë¤.

13íě subsectionë sectionęłź ëę°ě´ íëźë ě&nbsp;ěě¸ë°, ě¤ě chaptertocëĽź sectionęšě§ë°ě
ë§ë¤ě§ ěę¸° ëëŹ¸ě ě´ę˛ě ëśíěí´ëł´ě´ě§ë§ íšě ëŞ¨ëĽź ę˛˝ě°ě ëëšíěŹ ě&nbsp;ě´ë ę˛ěëë¤.

\section{ë§ěšë ë§}

ě¤íěź íěźęłź íě¤í¸ íěźě í¨ęť ëŹśě´ ěŹëŚ˝ëë¤. íě¤í¸ íěź test.texě ëł´ěëŠ´ ě´ëťę˛ ěŹěŠíëě§ íëě ě ě ěě ę˛ěëë¤. ě´ í¨í¤ě§ë ě¤ëĄě§ oblivoirë§ě ěíěŹ ěěąë ę˛ěźëĄ, ë¤ëĽ¸ í´ëě¤ę° ëĄëëëŠ´ ěëŹëĽź ëł´ě´ëŠ´ě ëŠěśĽëë¤. ěŹě§ě´ memoirěë í¨ęť ě°ě§ ëŞťíŠëë¤.

íě ěě&nbsp;ě ě˝ę˛ íę¸° ěí´ ëľę¸ëĄ íěźě ěëĄëíę˛&nbsp;ěľëë¤.

ěŹě¤ ě´ ě¤íěź íěźě ěě &lt;ëŹ¸ěĽę°í&gt; ěě¤ëĽź ěŹëŚ´ ě&nbsp;ě ę°ëľí ěěąíë ę˛ě ë˛ęˇ¸ëĽź ęł&nbsp;ěšęł&nbsp; ę¸°ëĽě ëł´ěśŠí ę˛ěëë¤.

version 2.0ě KTUG ę˛ěíě parttocě ëí ě§ëŹ¸ě´ ěŹëźě¨ ę˛ě ëł´ęł&nbsp; íěĽíěěľëë¤.

version 3.0ě KTUG ę˛ěíě Krissëě´ ěë&nbsp;¤ěŁźě&nbsp; íě´ě§ ě¤íěź ę´ë&nbsp;¨ ë˛ęˇ¸ëĽź ęł&nbsp;ěš ę˛ěëë¤.

version 4.0ě ë˛ęˇ¸ëĽź ęł&nbsp;ěšęł&nbsp; ëŹ¸ěëĽź ë¤ě ěěąíěľëë¤.

\end{document}

</pre></body></html>