0

I'm preparing my thesis in LYX. Previously I asked a question about article class, but then I've found that it would be better to use report class instead. I use a tocloft package and code looks as follows:

\documentclass[14pt]{extreport}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[LGR,T1,T2A]{fontenc}
\usepackage[koi8-r]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2.5cm,rmargin=1.1cm,headheight=17pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{1}
\setcounter{tocdepth}{1}
\usepackage{float}
\usepackage{units}
\usepackage{textcomp}
\usepackage{amsmath}
\usepackage{stmaryrd}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{esint}
\usepackage{subscript}
\onehalfspacing

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\newcommand*\LyXZeroWidthSpace{\hspace{0pt}}
\DeclareRobustCommand{\greektext}{%
  \fontencoding{LGR}\selectfont\def\encodingdefault{LGR}}
\DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}}
\ProvideTextCommand{\~}{LGR}[1]{\char126#1}

\DeclareRobustCommand{\cyrtext}{%
  \fontencoding{T2A}\selectfont\def\encodingdefault{T2A}}
\DeclareRobustCommand{\textcyr}[1]{\leavevmode{\cyrtext #1}}

\newcommand{\lyxmathsym}[1]{\ifmmode\begingroup\def\b@ld{bold}
  \text{\ifx\math@version\b@ld\bfseries\fi#1}\endgroup\else#1\fi}

\ProvideTextCommandDefault{\guillemotleft}{%
  {\usefont{U}{lasy}{m}{n}\char'50\kern-.15em\char'50}%
\penalty10000\hskip0pt\relax%
}
\ProvideTextCommandDefault{\guillemotright}{%
  \penalty10000\hskip0pt%
  {\usefont{U}{lasy}{m}{n}\char'51\kern-.15em\char'51}%
}
\DeclareTextSymbolDefault{\textquotedbl}{T1}
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[koi8-r]{inputenc}
\usepackage{mathtext}
\usepackage{titlesec}
\usepackage[english, russian]{babel}
%\usepackage[T1,T2A]{fontenc}
\usepackage{tocloft}
\addcontentsline{toc}{chapter}{Введение}
\renewcommand{\cfttoctitlefont}{\hfil\Large\bfseries}
\renewcommand{\cftaftertoctitle}{\hfill}
\renewcommand{\cftchappresnum} {Глава }
\setlength{\cftchapnumwidth}{5em}
\setlength{\cftsecnumwidth}{3em}
\renewcommand{\headrulewidth}{0}

\makeatother

\usepackage[style=gost-numeric,bibencoding=utf8, sorting=none]{biblatex}

\addbibresource{0C__Users_1_Documents_My_diss_All_bib.bib}
\begin{document}

\lhead{}
\rhead{}
\chead{\thepage}
\cfoot{}
\begin{center}
{\large{}Титульная}\vspace{28pt}
\par\end{center}

\noindent \begin{center}
Специальность 01.04.11 -- физика магнитных явлений
\par\end{center}    

\newpage{}  

\tableofcontents 
\clearpage

\newpage{}

\chapter*{{\large{}Введение }}

\section*{{\normalsize{}Цели диссертационной работы}}

\section*{{\normalsize{}Апробация работы} }
  Основные результаты диссертационной..

\newpage{}

\chapter{{\large{}Литературный обзор}}

\vspace{42pt}

\section{{\normalsize{}Природа обменного взаимодействия}}

\section{{\normalsize{}Обменные взаимодействия в соединениях РЗМ с Fe, Ni,
Mn}}

\section{{\normalsize{}Кристаллическая структура...}}

\newpage{}

\chapter{{\large{}Технология приготовления и аттестация образцов }}

\vspace{42pt}

\section{{\normalsize{}Микроструктура }}

\section{{\normalsize{}Методика измерения магнитокалорического эффекта в малых
полях и больших полях}}

\section{{\normalsize{}Измерение магнитной восприимчивости}}

\newpage{}

\chapter{{\large{}Результаты}}

\vspace{42pt}

\section{{\normalsize{}Гигантская объёмная ...  }}

\vspace{42pt}

\section{{\normalsize{}Магнитные свойства...}}

\vspace{42pt}

\newpage{}

\chapter{{\large{}Выводы}}

\newpage{}

\chapter*{{\large{}Литература}}

\addcontentsline{toc}{chapter}{Литература}

\nocite{*}
\printbibliography

\end{document}

There are 2 points still looking not like they should. First one- the header of ToC is not centered. However I used a command \renewcommand{\cfttoctitlefont} that should provide centering.

And I need the chapter ('Глава ') name to be followed by dots just like section name.

How can I edit these?

1
  • For a thesis, instead of report you should consider use book, scrbook, memoir or tufte-book or one templte of ctan.org/topic/dissertation
    – Fran
    Sep 15, 2020 at 16:33

1 Answer 1

0

Please use minimal working examples (MWE) to simplify troubleshooting.

Firstly, you're on the right track with centering the TOC title. Adding this command to the preamble should produce the desired output.

\renewcommand{\cfttoctitlefont}{\hfill}
\renewcommand{\cftaftertoctitle}{\hfill}

Secondly, you can get generate leading dots after section entries in the table of contents by adding the following command to your preamble.

\renewcommand{\cftchapdotsep}{\cftdotsep}

Putting it all together into a MWE.

\documentclass{extreport}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{1}
\setcounter{tocdepth}{1}

\usepackage{tocloft}
\addtocontents{toc}{\protect\thispagestyle{fancy}}

% centre toc title
\renewcommand{\cfttoctitlefont}{\hfill\Large}
\renewcommand{\cftaftertoctitle}{\hfill}

% add leading dots to chapters in TOC
\renewcommand{\cftchapdotsep}{\cftdotsep}

\begin{document}

\tableofcontents

\chapter{First}
\section{Some Section}

\chapter{Second}
\section{Another Section}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .