KTUG 한국 텍 사용자 그룹

Menu

KTUG :: Q&A 마당

%START 패키지 사용
\usepackage{ulem} %취소선명령(\sout{})을 사용하기 위한 패키지
\usepackage{titlesec} %header 등을 꾸미기 위해
\usepackage{titletoc} %toc에서 header 등을 꾸미기 위해
\usepackage{tocloft}
%END 패키지 사용
%START header 스타일
\titleformat{\chapter}
{\normalfont\ttfamily\Huge\bfseries}
{}{0pt}{}
\titleformat{\section}
{\normalfont
\sffamily\bfseries}
{}{0pt}{}
\titlespacing{\section}
{0pc}{1.5ex plus .1ex minus .2ex}{1pc}
%END header 스타일

%START toc 스타일
\cftpagenumbersoff{section} %toc에서 section의 페이지 번호가 나타나
\renewcommand\cftchapterfont{\ttfamily\LARGE}
\renewcommand\cftchapterpagefont{\ttfamily\Large}
\cftsetindents{chapter}{1em}{2.2em}
\setlength{\cftchapternumwidth}{4.2em}

%\cftsetindents{section}{1em}{3em}
%\setlength\cftsectionnumwidth{4em}
\renewcommand\cftsectionfont{\sffamily\small}

\begin{document}
------------------------------------------------------------------------------------------------------------------
위와 같이 할 경우 그림과 같이 section 제목이 기본위치에 나오는데, 

\cftsetindents{section}{1em}{3em} 또는

\setlength\cftsectionnumwidth{4em} 을 사용하면 "LaTeX Error: Missing \begin{document}" 가 발생합니다.

\setlength\cftchapternumwidth{4.2em}는 에러없이 잘 되는데, 요 두 개는 왜 이모양인가요? 


그리고 titletoc패키지를 안쓰니까 toc의 section 제목들을 한 줄로 나타내는 방법을 또 모르겠습니다.

구원의 밧줄을 내려주세요. ㅜㅜ

KTUG 한국 텍 사용자 그룹