목차, 도트 및 크기 사용자 정의

목차, 도트 및 크기 사용자 정의

목차에 점을 추가하고 크기를 수정하고 싶습니다. 스타일에 관해 질문이 많았다는 건 알지만, 나는 믿을 수 없을 정도로 멍청합니다. 나는 \begin 명령이 무엇을 하는지조차 모른다. 저도 언어를 바꾸고 싶어요. 나는 "내용"을 쓰는 것이 아니라 프랑스어로 된 "table des matieres"라고 쓰고 싶습니다.

여기 내 2 줄이 있습니다

\newpage
  \tableofcontents
  \addtocontents{toc}{~\hfill\textbf{Page}\par} 

무엇을 추가해야 하는지, 어디에 추가해야 하는지 알려주세요. 나는 많은 것을 시도했지만 라텍스를 배울 시간이 없습니다.

매우 감사합니다

답변1

@Bernard의 의견에서 영감을 얻어 다음에서 차용했습니다.뒷면그리고 @cmhughes'답변비슷한 질문에 :

\documentclass[french]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}

\usepackage{titletoc}

% \dottedcontents{<section>}[<left>]{<above-code>}{<label width>}{<leader width>}
\dottedcontents{section}[0em]{\bfseries}{2.9em}{1pc}
%\dottedcontents{subsection}[5em]{}{3.3em}{1pc}

\begin{document}

\tableofcontents

\vspace{2cm} % Add a 2cm space

\begin{abstract}
Ceci est un bref résumé du contenu du document écrit en français.
\end{abstract}

\section{Section d'introduction}
Il s'agit de la première section, nous ajoutons des éléments supplémentaires et tout sera correctement orthographiés. En outre, si un mot est trop long et doit être tronqué, babel va essayer de tronquer correctement en fonction de la langue.

\subsection{Subsection}

\section{Section théorèmes}
Cette section est de voir ce qui se passe avec les commandes de texte qui définissent.

\end{document}

산출:

여기에 이미지 설명을 입력하세요

답변2

나는 당신이 무엇을 추구하는지 정말로 모릅니다. "크기 변경"은 무엇을 의미합니까? 어디에 점을 추가하고 싶나요?

그러나 tocloft패키지가 답입니다. 다음은 사용 방법을 보여주는 MWE입니다.

% tocprob4.tex SE 533373 Customize ToC, dots and size
\documentclass{report}
\usepackage{lipsum}
\usepackage{tocloft}
\renewcommand{\contentsname}{table des matieres} % change the title
\renewcommand{\cftchapdotsep}{\cftdotsep} % add dots for chapters
\renewcommand{\cftsecdotsep}{10} % increase space between dots for sections
\renewcommand{\cftdot}{\ensuremath{\ast}} % replace dots by asterisks
%\renewcommand{\cftdot}{\Large .} % make dots Large

\begin{document}
\addtocontents{toc}{\hfill \textbf{Page}\par} % put Page above page numbers
\tableofcontents

\chapter{A chapter}
\lipsum[1]
\section{A section}
Some text in a section.
\subsection{A subsection}
Some text in a subsection.
\end{document}

texdoc tocloft자세한 내용은 설명서( )를 읽어보세요 .

관련 정보