Repository navigation
Expand file tree
/
Copy path_quarto.yml
More file actions
198 lines (178 loc) · 7.03 KB
/
Copy path_quarto.yml
File metadata and controls
198 lines (178 loc) · 7.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
project:
type: book
output-dir: docs
resources:
- "assets/fonts/**/*.woff2"
lang: ru
book:
title: "Анализ данных и статистика в R"
author: "Иван Поздняков"
date: today
favicon: images/favicon.svg
search:
location: sidebar
type: textbox
downloads: [pdf, epub]
chapters:
- index.qmd
- part: 005-whole_r_intro.qmd
chapters:
- 010-intro.qmd
- 013-vector.qmd
- 016-complex_structures.qmd
- 020-install.qmd
- 030-import_data.qmd
- 040-if_for.qmd
- 050-functional.qmd
- part: 105-tidyverse.qmd
chapters:
- 107-beyond_base_r.qmd
- 110-tidyverse_basic.qmd
- 120-tidyverse_advanced.qmd
- part: 205-eda.qmd
chapters:
- 210-desc_stats.qmd
- 220-base_viz.qmd
- 230-ggplot2.qmd
- 240-dynamic_viz.qmd
- 250-quarto.qmd
- part: 305-hyp_test.qmd
chapters:
- 310-infer_stats.qmd
- 320-ttest.qmd
- 325-chisq.qmd
- 330-cov_cor.qmd
- 340-lm.qmd
- 350-anova.qmd
- 360-glm.qmd
- 370-multivariate.qmd
- 410-planning.qmd
- part: 905-tasks_solutions.qmd
chapters:
- 910-tasks.qmd
- 920-solutions.qmd
- 950-references.qmd
bibliography: references.bib
csl: apa.csl
format:
html:
theme: cosmo
cover-image: images/R_stats_pozdniakov_cover.png
code-link: false
css:
- callout-custom.css
- fonts.css
- md-result.css
mainfont: "Source Sans 3"
monofont: "Source Code Pro"
pdf:
# в LaTeX-книге глава — уровень 0, поэтому глубина нумерации на единицу меньше, чем в HTML (общий number-depth: 3 ниже)
number-depth: 2
documentclass: book
classoption: [openany]
mainfont: "SourceSans3"
mainfontoptions:
- Path=assets/fonts/source-sans-3/
- Extension=.otf
- UprightFont=*-Regular
- BoldFont=*-Bold
- ItalicFont=*-It
- BoldItalicFont=*-BoldIt
monofont: "SourceCodePro"
monofontoptions:
- Path=assets/fonts/source-code-pro/
- Extension=.otf
- UprightFont=*-Regular
- BoldFont=*-Bold
- ItalicFont=*-It
- BoldItalicFont=*-BoldIt
- Scale=MatchLowercase
colorlinks: true
code-overflow: wrap
include-in-header:
text: |
\usepackage{fvextra}
\fvset{breaklines=true, breakanywhere=true, fontsize=\small}
\RecustomVerbatimEnvironment{verbatim}{Verbatim}{breaklines,breakanywhere,fontsize=\small}
\raggedbottom
% меньше строк, вылезающих за правое поле
\emergencystretch=3em
% заголовки всех уровней — Montserrat Bold
\usepackage{sectsty}
\newfontfamily\headingfont{Montserrat-Bold}[Path=assets/fonts/montserrat/, Extension=.ttf, BoldFont=Montserrat-Bold]
\allsectionsfont{\headingfont\raggedright}
% sectsty переопределяет \paragraph/\subparagraph и отменяет pandoc'овский вариант «отдельной строкой»:
% заголовок 5–6 уровня становится «в строку» и внутри рамки md-result пропадает — возвращаем вариант pandoc
\makeatletter
\let\oldparagraph\paragraph
\renewcommand{\paragraph}{\@ifstar\xxxParagraphStar\xxxParagraphNoStar}
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}{\@ifstar\xxxSubParagraphStar\xxxSubParagraphNoStar}
\makeatother
% оглавление: шире поля под номера, чтобы «17.10» не слипалось с названием
\usepackage[titles]{tocloft}
\setlength{\cftchapnumwidth}{2.2em}
\setlength{\cftsecindent}{2.2em}
\setlength{\cftsecnumwidth}{3.2em}
\setlength{\cftsubsecindent}{5.4em}
\setlength{\cftsubsecnumwidth}{3.8em}
% рамка «Получаем» для Markdown-примеров в 250 (фильтр md-result.lua)
% (tcolorbox загружаем здесь раньше Quarto, поэтому библиотеки skins и breakable — за нас: Quarto их не догрузит)
\usepackage{tcolorbox}
\tcbuselibrary{skins,breakable}
\makeatletter
\newtcolorbox{mdresult}{breakable, parbox=false, before upper={\def\@mpfn{footnote}\def\thempfn{\thefootnote}}, colback=black!2, colframe=black!40, boxrule=0.4pt, arc=1.5pt, left=6pt, right=6pt, top=6pt, bottom=4pt, title={Получаем}, fonttitle=\small, coltitle=black!70, colbacktitle=black!8, toptitle=1pt, bottomtitle=1pt}
\makeatother
% сноски из рамки — вниз страницы с обычным номером, а не вниз рамки с буквой
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{mdresult}
% soul (pandoc: \ul, \st) под XeLaTeX теряет кириллицу — заменяем на ulem
\usepackage[normalem]{ulem}
\AtBeginDocument{\renewcommand{\ul}[1]{\uline{#1}}\renewcommand{\st}[1]{\sout{#1}}}
\renewcommand{\labelitemi}{{\large\textbullet}}
\renewcommand{\labelitemii}{{\large\textendash}}
\AtBeginDocument{\tcbset{fonttitle=\bfseries, opacitybacktitle=1}}
\AtBeginDocument{%
\let\qExclTriangle\faExclamationTriangle%
\renewcommand{\faExclamation}{\qExclTriangle}%
\renewcommand{\faLightbulb}{\faGem}%
\renewcommand{\faExclamationTriangle}{\faRocket}%
\renewcommand{\faInfo}{\faDumbbell}%
\renewcommand{\faFire}{\faFrog}%
}
\AtBeginDocument{%
\definecolor{quarto-callout-tip-color}{HTML}{17A2B8}%
\definecolor{quarto-callout-tip-color-frame}{HTML}{17A2B8}%
\definecolor{quarto-callout-caution-color}{HTML}{00A047}%
\definecolor{quarto-callout-caution-color-frame}{HTML}{00A047}%
}
epub:
cover-image: images/R_stats_pozdniakov_cover.png
css:
- epub-styles.css
- callout-custom.css
- md-result.css
pdf-engine: xelatex
prefer-html: false
editor: visual
callout-appearance: default
callout-icon: true
# execute:
# execute_notebooks: force
# allow_errors: true
# cache: true
# Результаты выполнения глав хранятся в _freeze/ и пересчитываются только при изменении главы;
# полный пересчет — удалить _freeze/ и отрендерить заново
# заголовки 4-го уровня (элементы Markdown в 250) — без номеров; в оглавление и так не входят
number-depth: 3
filters:
- md-result.lua
execute:
freeze: auto
author:
- name:
given: Иван
family: Поздняков
literal: И.С. Поздняков
orcid: 0000-0002-2450-7004
email: bucherr@yandex.ru