Skip to content

Commit ad55921

Browse files
committed
Tidy-up index.
1 parent 73ad335 commit ad55921

File tree

10 files changed

+46
-423
lines changed

10 files changed

+46
-423
lines changed

docs/404.html

Lines changed: 1 addition & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -54,70 +54,6 @@
5454
<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
5555

5656

57-
<style type="text/css">
58-
pre > code.sourceCode { white-space: pre; position: relative; }
59-
pre > code.sourceCode > span { line-height: 1.25; }
60-
pre > code.sourceCode > span:empty { height: 1.2em; }
61-
.sourceCode { overflow: visible; }
62-
code.sourceCode > span { color: inherit; text-decoration: inherit; }
63-
pre.sourceCode { margin: 0; }
64-
@media screen {
65-
div.sourceCode { overflow: auto; }
66-
}
67-
@media print {
68-
pre > code.sourceCode { white-space: pre-wrap; }
69-
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
70-
}
71-
pre.numberSource code
72-
{ counter-reset: source-line 0; }
73-
pre.numberSource code > span
74-
{ position: relative; left: -4em; counter-increment: source-line; }
75-
pre.numberSource code > span > a:first-child::before
76-
{ content: counter(source-line);
77-
position: relative; left: -1em; text-align: right; vertical-align: baseline;
78-
border: none; display: inline-block;
79-
-webkit-touch-callout: none; -webkit-user-select: none;
80-
-khtml-user-select: none; -moz-user-select: none;
81-
-ms-user-select: none; user-select: none;
82-
padding: 0 4px; width: 4em;
83-
color: #aaaaaa;
84-
}
85-
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
86-
div.sourceCode
87-
{ }
88-
@media screen {
89-
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
90-
}
91-
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
92-
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
93-
code span.at { color: #7d9029; } /* Attribute */
94-
code span.bn { color: #40a070; } /* BaseN */
95-
code span.bu { color: #008000; } /* BuiltIn */
96-
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
97-
code span.ch { color: #4070a0; } /* Char */
98-
code span.cn { color: #880000; } /* Constant */
99-
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
100-
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
101-
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
102-
code span.dt { color: #902000; } /* DataType */
103-
code span.dv { color: #40a070; } /* DecVal */
104-
code span.er { color: #ff0000; font-weight: bold; } /* Error */
105-
code span.ex { } /* Extension */
106-
code span.fl { color: #40a070; } /* Float */
107-
code span.fu { color: #06287e; } /* Function */
108-
code span.im { color: #008000; font-weight: bold; } /* Import */
109-
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
110-
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
111-
code span.op { color: #666666; } /* Operator */
112-
code span.ot { color: #007020; } /* Other */
113-
code span.pp { color: #bc7a00; } /* Preprocessor */
114-
code span.sc { color: #4070a0; } /* SpecialChar */
115-
code span.ss { color: #bb6688; } /* SpecialString */
116-
code span.st { color: #4070a0; } /* String */
117-
code span.va { color: #19177c; } /* Variable */
118-
code span.vs { color: #4070a0; } /* VerbatimString */
119-
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
120-
</style>
12157

12258
<style type="text/css">
12359

@@ -140,13 +76,7 @@
14076
<li><a href="./">A Minimal Book Example</a></li>
14177

14278
<li class="divider"></li>
143-
<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> About</a>
144-
<ul>
145-
<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#usage"><i class="fa fa-check"></i><b>1.1</b> Usage</a></li>
146-
<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#render-book"><i class="fa fa-check"></i><b>1.2</b> Render book</a></li>
147-
<li class="chapter" data-level="1.3" data-path="index.html"><a href="index.html#preview-book"><i class="fa fa-check"></i><b>1.3</b> Preview book</a></li>
148-
</ul></li>
149-
<li class="chapter" data-level="2" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>2</b> Introduction</a></li>
79+
<li class="chapter" data-level="1" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
15080
<li class="chapter" data-level="" data-path="references.html"><a href="references.html"><i class="fa fa-check"></i>References</a></li>
15181
<li class="divider"></li>
15282
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
@@ -234,20 +164,6 @@ <h1>Page not found</h1>
234164
});
235165
</script>
236166

237-
<!-- dynamically load mathjax for compatibility with self-contained -->
238-
<script>
239-
(function () {
240-
var script = document.createElement("script");
241-
script.type = "text/javascript";
242-
var src = "true";
243-
if (src === "" || src === "true") src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/latest.js?config=TeX-MML-AM_CHTML";
244-
if (location.protocol !== "file:")
245-
if (/^https?:/.test(src))
246-
src = src.replace(/^https?:/, '');
247-
script.src = src;
248-
document.getElementsByTagName("head")[0].appendChild(script);
249-
})();
250-
</script>
251167
</body>
252168

253169
</html>

docs/_main.epub

-2.03 KB
Binary file not shown.

docs/_main.pdf

-16.5 KB
Binary file not shown.

docs/_main.tex

Lines changed: 16 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
% Options for packages loaded elsewhere
22
\PassOptionsToPackage{unicode}{hyperref}
33
\PassOptionsToPackage{hyphens}{url}
4+
%
45
\documentclass[
56
]{book}
6-
\usepackage{xcolor}
77
\usepackage{amsmath,amssymb}
8-
\setcounter{secnumdepth}{5}
98
\usepackage{iftex}
109
\ifPDFTeX
1110
\usepackage[T1]{fontenc}
@@ -36,46 +35,7 @@
3635
}{% if KOMA class
3736
\KOMAoptions{parskip=half}}
3837
\makeatother
39-
\usepackage{color}
40-
\usepackage{fancyvrb}
41-
\newcommand{\VerbBar}{|}
42-
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
43-
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
44-
% Add ',fontsize=\small' for more characters per line
45-
\usepackage{framed}
46-
\definecolor{shadecolor}{RGB}{248,248,248}
47-
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
48-
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.94,0.16,0.16}{#1}}
49-
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
50-
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}}
51-
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
52-
\newcommand{\BuiltInTok}[1]{#1}
53-
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
54-
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
55-
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
56-
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}}
57-
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
58-
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}}
59-
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
60-
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
61-
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.64,0.00,0.00}{\textbf{#1}}}
62-
\newcommand{\ExtensionTok}[1]{#1}
63-
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
64-
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
65-
\newcommand{\ImportTok}[1]{#1}
66-
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
67-
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
68-
\newcommand{\NormalTok}[1]{#1}
69-
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{#1}}}
70-
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}}
71-
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
72-
\newcommand{\RegionMarkerTok}[1]{#1}
73-
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{#1}}}
74-
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
75-
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
76-
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
77-
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
78-
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
38+
\usepackage{xcolor}
7939
\usepackage{longtable,booktabs,array}
8040
\usepackage{calc} % for calculating minipage widths
8141
% Correct order of tables after \paragraph or \subparagraph
@@ -88,25 +48,27 @@
8848
\makesavenoteenv{longtable}
8949
\usepackage{graphicx}
9050
\makeatletter
91-
\newsavebox\pandoc@box
92-
\newcommand*\pandocbounded[1]{% scales image to fit in text height/width
93-
\sbox\pandoc@box{#1}%
94-
\Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
95-
\Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
96-
\ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both
97-
\ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}%
98-
\else\usebox{\pandoc@box}%
99-
\fi%
100-
}
51+
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
52+
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
53+
\makeatother
54+
% Scale images if necessary, so that they will not overflow the page
55+
% margins by default, and it is still possible to overwrite the defaults
56+
% using explicit options in \includegraphics[width, height, ...]{}
57+
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
10158
% Set default figure placement to htbp
59+
\makeatletter
10260
\def\fps@figure{htbp}
10361
\makeatother
10462
\setlength{\emergencystretch}{3em} % prevent overfull lines
10563
\providecommand{\tightlist}{%
10664
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
65+
\setcounter{secnumdepth}{5}
66+
\usepackage{booktabs}
67+
\ifLuaTeX
68+
\usepackage{selnolig} % disable illegal ligatures
69+
\fi
10770
\usepackage[]{natbib}
10871
\bibliographystyle{plainnat}
109-
\usepackage{booktabs}
11072
\usepackage{bookmark}
11173
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
11274
\urlstyle{same}
@@ -127,50 +89,6 @@
12789
\setcounter{tocdepth}{1}
12890
\tableofcontents
12991
}
130-
\chapter{About}\label{about}
131-
132-
This is a \emph{sample} book written in \textbf{Markdown}. You can use anything that Pandoc's Markdown supports; for example, a math equation \(a^2 + b^2 = c^2\).
133-
134-
\section{Usage}\label{usage}
135-
136-
Each \textbf{bookdown} chapter is an .Rmd file, and each .Rmd file can contain one (and only one) chapter. A chapter \emph{must} start with a first-level heading: \texttt{\#\ A\ good\ chapter}, and can contain one (and only one) first-level heading.
137-
138-
Use second-level and higher headings within chapters like: \texttt{\#\#\ A\ short\ section} or \texttt{\#\#\#\ An\ even\ shorter\ section}.
139-
140-
The \texttt{index.Rmd} file is required, and is also your first book chapter. It will be the homepage when you render the book.
141-
142-
\section{Render book}\label{render-book}
143-
144-
You can render the HTML version of this example book without changing anything:
145-
146-
\begin{enumerate}
147-
\def\labelenumi{\arabic{enumi}.}
148-
\item
149-
Find the \textbf{Build} pane in the RStudio IDE, and
150-
\item
151-
Click on \textbf{Build Book}, then select your output format, or select ``All formats'' if you'd like to use multiple formats from the same book source files.
152-
\end{enumerate}
153-
154-
Or build the book from the R console:
155-
156-
\begin{Shaded}
157-
\begin{Highlighting}[]
158-
\NormalTok{bookdown}\SpecialCharTok{::}\FunctionTok{render\_book}\NormalTok{()}
159-
\end{Highlighting}
160-
\end{Shaded}
161-
162-
To render this example to PDF as a \texttt{bookdown::pdf\_book}, you'll need to install XeLaTeX. You are recommended to install TinyTeX (which includes XeLaTeX): \url{https://yihui.org/tinytex/}.
163-
164-
\section{Preview book}\label{preview-book}
165-
166-
As you work, you may start a local server to live preview this HTML book. This preview will update as you edit the book when you save individual .Rmd files. You can start the server in a work session by using the RStudio add-in ``Preview book'', or from the R console:
167-
168-
\begin{Shaded}
169-
\begin{Highlighting}[]
170-
\NormalTok{bookdown}\SpecialCharTok{::}\FunctionTok{serve\_book}\NormalTok{()}
171-
\end{Highlighting}
172-
\end{Shaded}
173-
17492
\chapter{Introduction}\label{introduction}
17593

17694
Vince Smith 2017
@@ -189,6 +107,6 @@ \chapter{Introduction}\label{introduction}
189107

190108
It is still early days for the Open Hardware movement, particularly in the biological sciences where specialist skills in niche areas are still required to develop and deploy systems. My hope is that books like this can help seed the same transformation which has taken place in other stages of the scientific process, so that the emphasis on development switches to the building of open platforms for hardware development, rather than bespoke products and proprietary systems.
191109

192-
\bibliography{book.bib,packages.bib}
110+
\bibliography{book.bib,packages.bib}
193111

194112
\end{document}

docs/index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@
140140
<li><a href="./">A Minimal Book Example</a></li>
141141

142142
<li class="divider"></li>
143-
<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> About</a>
143+
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>About</a>
144144
<ul>
145-
<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#usage"><i class="fa fa-check"></i><b>1.1</b> Usage</a></li>
146-
<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#render-book"><i class="fa fa-check"></i><b>1.2</b> Render book</a></li>
147-
<li class="chapter" data-level="1.3" data-path="index.html"><a href="index.html#preview-book"><i class="fa fa-check"></i><b>1.3</b> Preview book</a></li>
145+
<li class="chapter" data-level="0.1" data-path="index.html"><a href="index.html#usage"><i class="fa fa-check"></i><b>0.1</b> Usage</a></li>
146+
<li class="chapter" data-level="0.2" data-path="index.html"><a href="index.html#render-book"><i class="fa fa-check"></i><b>0.2</b> Render book</a></li>
147+
<li class="chapter" data-level="0.3" data-path="index.html"><a href="index.html#preview-book"><i class="fa fa-check"></i><b>0.3</b> Preview book</a></li>
148148
</ul></li>
149-
<li class="chapter" data-level="2" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>2</b> Introduction</a></li>
149+
<li class="chapter" data-level="1" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
150150
<li class="chapter" data-level="" data-path="references.html"><a href="references.html"><i class="fa fa-check"></i>References</a></li>
151151
<li class="divider"></li>
152152
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
@@ -173,17 +173,17 @@ <h1 class="title">Arduino for biologists and environmental scientists</h1>
173173
<p class="author"><em>Ed Baked (Ed.)</em></p>
174174
<p class="date"><em>2025-02-11</em></p>
175175
</div>
176-
<div id="about" class="section level1 hasAnchor" number="1">
177-
<h1><span class="header-section-number">Chapter 1</span> About<a href="index.html#about" class="anchor-section" aria-label="Anchor link to header"></a></h1>
176+
<div id="about" class="section level1 unnumbered hasAnchor">
177+
<h1>About<a href="index.html#about" class="anchor-section" aria-label="Anchor link to header"></a></h1>
178178
<p>This is a <em>sample</em> book written in <strong>Markdown</strong>. You can use anything that Pandoc’s Markdown supports; for example, a math equation <span class="math inline">\(a^2 + b^2 = c^2\)</span>.</p>
179-
<div id="usage" class="section level2 hasAnchor" number="1.1">
180-
<h2><span class="header-section-number">1.1</span> Usage<a href="index.html#usage" class="anchor-section" aria-label="Anchor link to header"></a></h2>
179+
<div id="usage" class="section level2 hasAnchor" number="0.1">
180+
<h2><span class="header-section-number">0.1</span> Usage<a href="index.html#usage" class="anchor-section" aria-label="Anchor link to header"></a></h2>
181181
<p>Each <strong>bookdown</strong> chapter is an .Rmd file, and each .Rmd file can contain one (and only one) chapter. A chapter <em>must</em> start with a first-level heading: <code># A good chapter</code>, and can contain one (and only one) first-level heading.</p>
182182
<p>Use second-level and higher headings within chapters like: <code>## A short section</code> or <code>### An even shorter section</code>.</p>
183183
<p>The <code>index.Rmd</code> file is required, and is also your first book chapter. It will be the homepage when you render the book.</p>
184184
</div>
185-
<div id="render-book" class="section level2 hasAnchor" number="1.2">
186-
<h2><span class="header-section-number">1.2</span> Render book<a href="index.html#render-book" class="anchor-section" aria-label="Anchor link to header"></a></h2>
185+
<div id="render-book" class="section level2 hasAnchor" number="0.2">
186+
<h2><span class="header-section-number">0.2</span> Render book<a href="index.html#render-book" class="anchor-section" aria-label="Anchor link to header"></a></h2>
187187
<p>You can render the HTML version of this example book without changing anything:</p>
188188
<ol style="list-style-type: decimal">
189189
<li><p>Find the <strong>Build</strong> pane in the RStudio IDE, and</p></li>
@@ -193,8 +193,8 @@ <h2><span class="header-section-number">1.2</span> Render book<a href="index.htm
193193
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="index.html#cb1-1" tabindex="-1"></a>bookdown<span class="sc">::</span><span class="fu">render_book</span>()</span></code></pre></div>
194194
<p>To render this example to PDF as a <code>bookdown::pdf_book</code>, you’ll need to install XeLaTeX. You are recommended to install TinyTeX (which includes XeLaTeX): <a href="https://yihui.org/tinytex/" class="uri">https://yihui.org/tinytex/</a>.</p>
195195
</div>
196-
<div id="preview-book" class="section level2 hasAnchor" number="1.3">
197-
<h2><span class="header-section-number">1.3</span> Preview book<a href="index.html#preview-book" class="anchor-section" aria-label="Anchor link to header"></a></h2>
196+
<div id="preview-book" class="section level2 hasAnchor" number="0.3">
197+
<h2><span class="header-section-number">0.3</span> Preview book<a href="index.html#preview-book" class="anchor-section" aria-label="Anchor link to header"></a></h2>
198198
<p>As you work, you may start a local server to live preview this HTML book. This preview will update as you edit the book when you save individual .Rmd files. You can start the server in a work session by using the RStudio add-in “Preview book”, or from the R console:</p>
199199
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb2-1"><a href="index.html#cb2-1" tabindex="-1"></a>bookdown<span class="sc">::</span><span class="fu">serve_book</span>()</span></code></pre></div>
200200

0 commit comments

Comments
 (0)