3

I need template for russian book Chapterview, TOC (see the picture below). Is there and easy way to do it base on \documentclass{book}? Thanks.

Title of contents

ChapterView

  • Your question leaves all the effort to our community, even typing the essentials of a TeX document such as \documentclass{}...\begin{document} etc. As it is, most of our users will be very reluctant to touch your question, and you are left to the mercy of our procrastination team who are very few in number and very picky about selecting questions. You can improve your question by adding a minimal working example (MWE) that more users can copy/paste onto their systems to work on. If no hero takes the challenge we might have to close your question. – cfr Nov 07 '14 at 22:30
  • Welcome to TeX SE, by the way! – cfr Nov 07 '14 at 22:31

1 Answers1

5

This should be a start. For setting the pagination parameters use geometry.

\documentclass[a4paper]{book}

\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}

\usepackage{microtype}

\usepackage{titlesec,titletoc,chngcntr}

\titleformat{\chapter}[display]
 {\Large}
 {\titleline[l]{\chaptertitlename\ \thechapter}\vspace{6pt}\titlerule[.8pt]}
 {\dimexpr-\baselineskip+6pt\relax}
 {\bfseries\MakeUppercase}

\titleformat{\section}[block]
 {\bfseries}
 {\S\ \thesection.}
 {\fontdimen2\font}
 {}

\titlecontents{chapter}[0pt]
 {}
 {\textls[200]{\chaptername} \thecontentslabel.\ \bfseries}
 {}
 {\titlerule*[6pt]{.}\contentspage}
 [\addvspace{3pt}]

\titlecontents{section}[1.5em]
 {}
 {\S\ \makebox[1.5em][l]{\thecontentslabel.}}
 {}
 {\titlerule*[6pt]{.}\contentspage}

\makeatletter
\renewcommand\frontmatter{\cleardoublepage\@mainmatterfalse}
\renewcommand\mainmatter{\cleardoublepage\@mainmattertrue}
\makeatother
\renewcommand{\thechapter}{\Roman{chapter}}
\counterwithout{section}{chapter}

\begin{document}
\frontmatter
\tableofcontents

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

Введение — в собственном смысле — предварительные сообщения общего характера, 
предпосылаемые произведению, обычно научного характера, с целью ввести читателя в курс 
предмета.

Введение в этом случае не связано непосредственно с сюжетом произведения и может иметь 
самостоятельное значение — например введение к «Опыту о нравах» («Essais de mœurs») 
Вольтера, напечатанное также самостоятельно под заглавием «Философия истории». В 
художественной литературе введением называется ввод в основное действие, та предварительная 
часть, где автор устанавливает намерения и характер персонажей, указывает побочные 
обстоятельства, определяющие действие. По словам Вольтера, в введении, как в зародыше, 
должна содержаться развязка. В древнегреческой трагедии (например у Эсхила), когда хор 
играл важную роль, введение давалось хороначальником. Позже введение помещалось перед 
выходом хора в предварительной сцене, так называемом прологе. В дальнейшем развитии 
введение сделалось органической частью произведения, непосредственно входящей в его состав. 
В театральных произведениях целям введение служит афиша, указывающая время и место 
действия, а также имена и взаимоотношения действующих лиц в пьесе.

В праве, вводная или вступительная часть законодательного или иного правового акта 
называется преамбулой.

\mainmatter

\chapter{Москва}

\section{Москва}

Москва — столица Российской Федерации, город федерального значения, административный центр 
Центрального федерального округа и центр Московской области, в состав которой не входит. 
Крупнейший по численности населения город России и её субъект — 12 108 257 чел. (2014), 
самый населённый из городов, полностью расположенных в Европе, входит в первую десятку 
городов мира по численности населения. Центр Московской городской агломерации.

Историческая столица Великого княжества Московского, Русского царства, Российской империи 
(в 1728—1730 годах), Советской России и СССР. Город-герой. В Москве находятся федеральные 
органы государственной власти Российской Федерации (за исключением Конституционного суда), 
посольства иностранных государств, штаб-квартиры большинства крупнейших российских 
коммерческих организаций и общественных объединений. В городе организована система местного 
самоуправления.

\section{Расположена}

Расположена на реке Москве в центре Восточно-Европейской равнины, в междуречье Оки и Волги. 
Как субъект федерации, Москва граничит с Московской и Калужской областями.

Москва — важный туристический центр России; Московский Кремль, Красная площадь, Новодевичий 
монастырь и Церковь Вознесения в Коломенском входят в список Всемирного наследия ЮНЕСКО. 
Она является также важнейшим транспортным узлом. Город обслуживают 5 аэропортов, 9 
железнодорожных вокзалов, 3 речных порта (имеется речное сообщение с морями бассейнов 
Атлантического и Северного Ледовитого океанов). С 1935 года в Москве работает метрополитен.

\end{document}

enter image description here

enter image description here

egreg
  • 1,121,712
  • egreg, what is the purpose of this part of code? \makeatletter \renewcommand\frontmatter{\cleardoublepage@mainmatterfalse} \renewcommand\mainmatter{\cleardoublepage@mainmattertrue} \makeatother – user65820 Nov 07 '14 at 23:38
  • @user65820 Remove those lines if you prefer that pages in the frontmatter are numbered with roman numerals. That wasn't clear from your question, I used those commands based on the appearance of the sample table of contents. – egreg Nov 07 '14 at 23:40
  • How to hide pagenumders on the TOC page? – user65820 Nov 07 '14 at 23:51
  • @user65820 {\cleardoublepage\pagestyle{empty}\tableofcontents\clearpage} – egreg Nov 07 '14 at 23:55
  • So you typed them all! Good in russian too. –  Nov 08 '14 at 00:29
  • @egreg, can you explain me, what font LaTeX used in the code? My compilation looks not so good as your. I compile this with pdfLatex. – user65820 Nov 08 '14 at 10:06
  • @user65820 I bet you have MiKTeX. ;-) You should install the CM-Super font package, look on the site for more information, for instance http://tex.stackexchange.com/questions/33608/how-to-run-updmap-sys-after-installing-cm-super – egreg Nov 08 '14 at 10:08
  • @egreg, How can I use \MakeTextUppercase{} in \titleformat{\chapter}[display] to change case only in ChapterView not in TOCview? – user65820 Nov 08 '14 at 22:59
  • @user65820 Add \MakeUppercase after \bfseries in the last line of \titleformat{\chapter}. I'll update the example. – egreg Nov 08 '14 at 23:02
  • @egreg, thanx, I have done. – user65820 Nov 08 '14 at 23:10
  • @egreg, I see there are many units like this "+6pt", whish is format indents. Which method of their calculation? – user65820 Nov 08 '14 at 23:30
  • @user65820 Trial and error. – egreg Nov 08 '14 at 23:35
  • @egreg, :). I made a small corrections: \textls[200]{\MakeTextUppercase{\chaptertitlename}} in a \titleformat{\chapter} for further conformity – user65820 Nov 08 '14 at 23:40
  • @egreg, How to suppress \vspace{6pt} in the ChapterView not in TOC? – user65820 Nov 08 '14 at 23:53
  • @user65820 I don't understand: typesetting the titles is completely independent of typesetting the TOC – egreg Nov 08 '14 at 23:54
  • Ok, mea culpa. I need to suppress a vertical clearance between top of the page and chaptername in a ChapView not in TOC. – user65820 Nov 09 '14 at 00:00
  • @user65820 Sorry, but continuing a discussion here is against the rules of the site. Preparing a full fledged class is long work. If you have a specific question, please ask a new one as followup of this one. – egreg Nov 09 '14 at 00:05