KTUG 한국 텍 사용자 그룹

Menu

KTUG :: Q&A 마당

nanim께서 답을 올려주셨네요.

저도 잘 이해한 건지 모르겠지만, 나름대로 해본 것을 (아까워서) 첨부합니다. 


test_oblivoir_toc_and_ref.PNG



% test_oblivoir.tex

\documentclass[a4paper,nanum,chapter,tocentry]{oblivoir} 

% tocentry의 설명에 대해서는 oblivoir 설명서 참조. 아래에서 cftsetindetns 따위로 사용자가 간격을 직접 지정하는 경우에는 굳이 'tocentry' 옵션을 쓰지 않아도 되지 않을까 추측(?)함.


\usepackage{jiwonlipsum}


\cftsetindents{section}{3.2em}{3.0em} 

% toc에서 섹션 앞에 들여쓸 공간 3.2em, 섹션 번호(1.1, 1.2, ...)가 식자될 너비

\cftsetindents{subsection}{6.2em}{3.0em} 

% 서브섹션 앞에 들여쓸 공간 6.2em(=3.2em+3.0em). 보통 상위 항목의 들여쓰기 길이 + 번호너비를 더해주면 된다. 뒤의 3.0em은 서브섹션 번호(1.1.1, 1.1.2, ...)가 식자될 너비


\hypersetup{pdfborder={0 0 0}} 

% 하이퍼링크의 빨간 테두리를 죽인다. 


\newcommand\sectionref[1]{제\ref{#1}\sectionname} 

% 이런 식으로 \ref 앞에 '제'와 '절'을 찍어주도록 만든다. \sectionname은 한글로 '절'을 의미한다. \renewcommand로 다른 단어로 바꿀 수 있다. 


\begin{document}


\pagestyle{hangul}


\frontmatter


\begin{verbatim}

\pref{sec:first_section} \ref{sec:first_section}\sectionname을 참고하라. 


\pageref{sec:second_section}\pagename \Sref{sec:second_section}\를 참고하라. 


\sectionref{sec:first_section}\와 \sectionref{sec:second_section}\을 참고하라.


\sectionref{sec:first_section}\과 \sectionref{sec:second_section}\를 참고하라.

\end{verbatim}


\pref{sec:first_section} \ref{sec:first_section}\sectionname을 참고하라. 


\pageref{sec:second_section}\pagename \Sref{sec:second_section}\를 참고하라. 


\sectionref{sec:first_section}\와 \sectionref{sec:second_section}\을 참고하라.


\sectionref{sec:first_section}\과 \sectionref{sec:second_section}\를 참고하라.



\tableofcontents



\mainmatter


\chapter{일야구도하기}

\section{섹션 하나}\label{sec:first_section}

\jiwon[1]


\subsection{서브섹션 하나}

\jiwon[1]

\subsection{서브섹션 둘}

\jiwon[1]


\section{섹션 둘}\label{sec:second_section}

\jiwon[2]

\subsection{서브섹션 셋}

\jiwon[2]

\subsection{서브섹션 넷}

\jiwon[2]


...


(이하 생략)


===


* 질문을 하실 때는 최소한의 샘플을 올려주시는 게 피차 좋습니다. 

KTUG 한국 텍 사용자 그룹