% CWEB macros for the Russian language by Dmitri Pavlov. Public domain. % You may redistribute this file under the terms of GNU General Public License version 3. % Report bugs and suggestions to me: host: math.berkeley.edu, user: pavlov. % This package uses the LH fonts by Olga Lapko and Andrei Hodulev. % If you want to use some other fonts, just replace the lh prefix everywhere. % This package uses the UTF-8 encoding. % Just recode the file if you want to use some other encoding. \font\ninerm=lhr9 \let\mc=\ninerm % medium caps \font\eightrm=lhr8 \let\sc=\eightrm % for smallish caps (NOT a caps-and-small-caps font) \let\mainfont=\tenrm \let\cmntfont\tenrm %\font\tenss=lhss10 \let\cmntfont\tenss % alternative comment font \font\titlefont=lhr7 scaled\magstep4 % title on the contents page \font\ttitlefont=lhtt10 scaled\magstep2 % typewriter type in title \font\tentex=lhtex10 % TeX extended character set (used in strings) \fontdimen7\tentex=0pt % no double space after sentences %\let\five\5 %\def\C#1{\five\five\quad$/\ast\,${\cmntfont #1}$\,\ast/$} %\let\5\6 \def\ATH{{\acrofalse\X\kern-.5em:Директивы препроцессора\X}} \def\A{\note{Смотри также секцию}} % xref for doubly defined section name \def\As{\note{Смотри также секции}} % xref for multiply defined section name \def\ET{ и~} % conjunction between two section numbers \def\ETs{, и~} % conjunction between the last two of several section numbers \def\Q{\note{На этот код ссылается секция}} % xref for mention of a section \def\Qs{\note{На этот код ссылаются секции}} % xref for mentions of a section \def\U{\note{Этот код используется в секции}} % xref for use of a section \def\Us{\note{Этот код используется в секциях}} % xref for uses of a section \gtitle={Вывод \.{CWEB}'а} % this running head is reset by starred sections \def\ch{\note{Эти секции были изменены с помощью файла изменений:} \let\*=\relax} \def\fin{\par\vfill\eject % this is done when we are ending the index \ifpagesaved\null\vfill\eject\fi % output a null index column \if L\lr\else\null\vfill\eject\fi % finish the current page \parfillskip 0pt plus 1fil \def\grouptitle{ИМЕНА СЕКЦИЙ} \ifacro \def\outsecname{Имена секций} \let\Xpdf\X \fi \ifpdftex \makebookmarks \pdfdest name {NOS} fitb \pdfoutline goto name {NOS} count -\secno {\outsecname} \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.\toks0{##2}\pdfoutline goto num \the\toksA {\the\toks0}} \else\ifpdf \special{pdf: outline -1 << /Title (\outsecname) /Dest [ @thispage /FitH @ypos ] >>} \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.\toks0{##2} \special{pdf: outline 0 << /Title (\the\toks0) /A << /S /GoTo /D (\romannumeral\the\toksA) >> >>}} \fi\fi \let\topsecno=\nullsec \message{Section names:} \output={\normaloutput\page\lheader\rheader} \setpage \def\note##1##2.{\quad{\eightrm##1~\ifacro{\pdfnote##2.}\else{##2}\fi.}} \def\Q{\note{Упоминается в секции}} % crossref for mention of a section \def\Qs{\note{Упоминается в секциях}} % crossref for mentions of a section \def\U{\note{Используется в секции}} % crossref for use of a section \def\Us{\note{Используется в секциях}} % crossref for uses of a section \def\I{\par\hangindent 2em}\let\*=* \readsections} \def\con{\par\vfill\eject % finish the section names % \ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers \rightskip 0pt \hyphenpenalty 50 \tolerance 200 \setpage \output={\normaloutput\page\lheader\rheader} \titletrue % prepare to output the table of contents \pageno=\contentspagenumber \def\grouptitle{СОДЕРЖАНИЕ} \message{Table of contents:} \topofcontents \startpdf \line{\hfil Секция\hbox to5em{\hss Страница}} \let\ZZ=\contentsline \readcontents\relax % read the contents info \botofcontents \end} % print the contents page(s) and terminate \def\contentsline#1#2#3#4#5{\ifnum#2=0 \smallbreak\fi \line{\consetup{#2}#1 \rm\leaders\hbox to .5em{.\hfil}\hfil \ \ifacro\pdflink{#3}{\romannumeral#3}\else#3\fi\hbox to5em{\hss#4}}} \def\today{\number\day\ \ifcase\month\or Января\or Февраля\or Марта\or Апреля\or Мая\or Июня\or Июля\or Августа\or Сентября\or Октября\or Ноября\or Декабря\fi \space\number\year\ года} \def\datethis{\def\startsection{\leftline{\sc\today\ в \hours}\bigskip \let\startsection=\stsec\stsec}} % say `\datethis' in limbo, to get your listing timestamped before section 1 \def\datecontentspage{% \def\topofcontents{\leftline{\sc\today\ в \hours}\bigskip \centerline{\titlefont\title}\vfill}} % timestamps the contents page