NBash
190 строк · 4.5 Кб
1\let\mypdfximage\pdfximage\def\pdfximage{\immediate\mypdfximage}\documentclass[twoside]{book}
2
3%% moved from doxygen.sty due to workaround for LaTex 2019 version and unmaintained tabu package
4\usepackage{ifthen}
5\ifx\requestedLaTeXdate\undefined
6\usepackage{array}
7\else
8\usepackage{array}[=2016-10-06]
9\fi
10%%
11% Packages required by doxygen
12\usepackage{fixltx2e}
13\usepackage{doxygen}
14\usepackage{graphicx}
15\usepackage[utf8]{inputenc}
16\usepackage{makeidx}
17\PassOptionsToPackage{warn}{textcomp}
18\usepackage{textcomp}
19\usepackage[nointegrals]{wasysym}
20\usepackage{ifxetex}
21
22% Font selection
23\usepackage[T1]{fontenc}
24\usepackage[scaled=.90]{helvet}
25\usepackage{courier}
26\renewcommand{\familydefault}{\sfdefault}
27\usepackage{sectsty}
28\allsectionsfont{%
29\fontseries{bc}\selectfont%
30\color{darkgray}%
31}
32\renewcommand{\DoxyLabelFont}{%
33\fontseries{bc}\selectfont%
34\color{darkgray}%
35}
36\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}}
37
38% Arguments of doxygenemoji:
39% 1) ':<text>:' form of the emoji, already "LaTeX"-escaped
40% 2) file with the name of the emoji without the .png extension
41% in case image exist use this otherwise use the ':<text>:' form
42\newcommand{\doxygenemoji}[2]{%
43\IfFileExists{./#2.png}{\raisebox{-0.1em}{\includegraphics[height=0.9em]{./#2.png}}}{#1}%
44}
45% Page & text layout
46\usepackage{geometry}
47\geometry{%
48a4paper,%
49top=2.5cm,%
50bottom=2.5cm,%
51left=2.5cm,%
52right=2.5cm%
53}
54\tolerance=750
55\hfuzz=15pt
56\hbadness=750
57\setlength{\emergencystretch}{15pt}
58\setlength{\parindent}{0cm}
59\newcommand{\doxynormalparskip}{\setlength{\parskip}{3ex plus 2ex minus 2ex}}
60\newcommand{\doxytocparskip}{\setlength{\parskip}{1ex plus 0ex minus 0ex}}
61\doxynormalparskip
62\makeatletter
63\renewcommand{\paragraph}{%
64\@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
65\normalfont\normalsize\bfseries\SS@parafont%
66}%
67}
68\renewcommand{\subparagraph}{%
69\@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
70\normalfont\normalsize\bfseries\SS@subparafont%
71}%
72}
73\makeatother
74
75\makeatletter
76\newcommand\hrulefilll{\leavevmode\leaders\hrule\hskip 0pt plus 1filll\kern\z@}
77\makeatother
78
79% Headers & footers
80\usepackage{fancyhdr}
81\pagestyle{fancyplain}
82\renewcommand{\footrulewidth}{0.4pt}
83%
84\fancypagestyle{fancyplain}{
85\fancyhf{}
86\fancyhead[LE, RO]{\bfseries\thepage}
87\fancyhead[LO]{\bfseries\rightmark}
88\fancyhead[RE]{\bfseries\leftmark}
89\fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen }
90}
91%
92\fancypagestyle{plain}{
93\fancyhf{}
94\fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen }
95\renewcommand{\headrulewidth}{0pt}}
96%
97\pagestyle{fancyplain}
98%
99\renewcommand{\chaptermark}[1]{%
100\markboth{#1}{}%
101}
102\renewcommand{\sectionmark}[1]{%
103\markright{\thesection\ #1}%
104}
105
106% Indices & bibliography
107\usepackage{natbib}
108\usepackage[titles]{tocloft}
109\setcounter{tocdepth}{3}
110\setcounter{secnumdepth}{5}
111\makeindex
112
113\usepackage{newunicodechar}
114\newunicodechar{⁻}{${}^{-}$}% Superscript minus
115\newunicodechar{²}{${}^{2}$}% Superscript two
116\newunicodechar{³}{${}^{3}$}% Superscript three
117
118% Hyperlinks (required, but should be loaded last)
119\ifpdf
120\usepackage[pdftex,pagebackref=true]{hyperref}
121\else
122\ifxetex
123\usepackage[pagebackref=true]{hyperref}
124\else
125\usepackage[ps2pdf,pagebackref=true]{hyperref}
126\fi
127\fi
128
129\hypersetup{%
130colorlinks=true,%
131linkcolor=blue,%
132citecolor=blue,%
133unicode%
134}
135
136% Custom commands
137\newcommand{\clearemptydoublepage}{%
138\newpage{\pagestyle{empty}\cleardoublepage}%
139}
140
141\usepackage{caption}
142\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}
143
144\usepackage{etoc}
145\etocsettocstyle{\doxytocparskip}{\doxynormalparskip}
146\renewcommand{\numberline}[1]{#1~}
147%===== C O N T E N T S =====
148
149\begin{document}
150\raggedbottom
151
152% Titlepage & ToC
153\hypersetup{pageanchor=false,
154bookmarksnumbered=true,
155pdfencoding=unicode
156}
157\pagenumbering{alph}
158\begin{titlepage}
159\vspace*{7cm}
160\begin{center}%
161{\Large My Project }\\
162\vspace*{1cm}
163{\large Generated by Doxygen 1.9.1}\\
164\end{center}
165\end{titlepage}
166\clearemptydoublepage
167\pagenumbering{roman}
168\tableofcontents
169\clearemptydoublepage
170\pagenumbering{arabic}
171\hypersetup{pageanchor=true}
172
173%--- Begin generated contents ---
174\chapter{My\+File Docs}
175\label{index}\hypertarget{index}{}\input{index}
176\chapter{File Index}
177\input{files}
178\chapter{File Documentation}
179\input{1_8sh}
180%--- End generated contents ---
181
182% Index
183\backmatter
184\newpage
185\phantomsection
186\clearemptydoublepage
187\addcontentsline{toc}{chapter}{\indexname}
188\printindex
189
190\end{document}
191