Skip to content

Commit 9a0b861

Browse files
committed
Converting links to footnotes
1 parent 2776034 commit 9a0b861

22 files changed

+84
-91
lines changed

basics.tex

+1-2
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,7 @@ \section{Exercises}\label{s:basics-exercises}
585585
(You might notice that \texttt{typeof\ typeof} is syntactically invalid.
586586
In such circumstances,
587587
an internet search engine is your friend,
588-
as is the Mozilla Developer Network\index{Mozilla Developer Network} (MDN) JavaScript reference
589-
at \url{https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference}.
588+
as is the \hreffoot{https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference}{Mozilla Developer Network}\index{Mozilla Developer Network} JavaScript reference.
590589
591590
\exercise{Fill in the Blanks}
592591

capstone.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ \chapter{Capstone Project}\label{s:capstone}
22

33
It's time to bring everything together in an extended example:
44
a (slightly) interactive visualization of species data from
5-
\url{https://figshare.com/articles/Portal_Project_Teaching_Database/1314459}.
5+
the \hreffoot{https://figshare.com/articles/Portal\_Project\_Teaching\_Database/1314459}{Portal Project Teaching Database}.
66
Our plan is to:
77

88
\begin{itemize}
@@ -716,9 +716,9 @@ \section{Running It}\label{s:capstone-run}
716716
717717
\noindent
718718
The ``Learn More'' link given with the error message takes us to
719-
\href{https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin}{this page},
719+
\hreffoot{https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin}{this page},
720720
which uses many science words we don't know.
721-
A web search turns up \href{https://en.wikipedia.org/wiki/Cross-origin_resource_sharing}{this article on Wikipedia},
721+
A web search turns up \hreffoot{https://en.wikipedia.org/wiki/Cross-origin\_resource\_sharing}{this article on Wikipedia},
722722
which tells us that \gref{g:cors}{cross-origin resource sharing} (CORS)\index{CORS}
723723
is a security mechanism.
724724
If a page loads some JavaScript,

collab.tex

+8-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ \section{Licensing Software}\label{s:collab-software}
2929

3030
That is easier said than done,
3131
not least because the law hasn't kept up with everyday practice.
32-
\cite{Mori2012} and \href{http://www.astrobetter.com/blog/2014/03/10/the-whys-and-hows-of-licensing-scientific-code/}{this blog post}
32+
\cite{Mori2012} and \hreffoot{http://www.astrobetter.com/blog/2014/03/10/the-whys-and-hows-of-licensing-scientific-code/}{this blog post}
3333
are good starting points from a scientist's point of view,
3434
while \cite{Lind2008} is a deeper dive for those who want details.
3535
In brief,
@@ -55,8 +55,8 @@ \section{Licensing Software}\label{s:collab-software}
5555

5656
To make license selection as easy as possible,
5757
GitHub allows you to select one of the most common licenses when creating a repository.
58-
The Open Source Initiative maintains \href{http://opensource.org/licenses}{a list of licenses},
59-
and \href{http://choosealicense.com/}{choosealicense.com} will help you find a license that suits your needs.
58+
The Open Source Initiative maintains \hreffoot{http://opensource.org/licenses}{a list of licenses},
59+
and \hreffoot{http://choosealicense.com/}{choosealicense.com} will help you find a license that suits your needs.
6060
Some of the things you will need to think about are:
6161

6262
\begin{enumerate}
@@ -87,7 +87,7 @@ \section{Licensing Software}\label{s:collab-software}
8787
Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL
8888
along with build \& install instructions.
8989

90-
--- \href{https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)}{tl;dr}
90+
--- \hreffoot{https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)}{tl;dr}
9191
\end{quote}
9292

9393
We recommend the MIT license:
@@ -99,7 +99,7 @@ \section{Licensing Data and Documentation}\label{s:collab-datadocs}
9999

100100
The MIT license and the GPL apply to software.
101101
When it comes to data and reports,
102-
the most widely used family of licenses are those produced by \href{https://creativecommons.org/}{Creative Commons},
102+
the most widely used family of licenses are those produced by \hreffoot{https://creativecommons.org/}{Creative Commons},
103103
which have been written and checked by lawyers and are well understood by the community.
104104

105105
The most liberal license is referred to as \gref{g:cc-0}{CC-0},
@@ -175,8 +175,9 @@ \section{Code of Conduct}\label{s:collab-conduct}
175175

176176
Just as you shouldn't write your own license for a project,
177177
you probably shouldn't write your own Code of Conduct.
178-
We recommend using the \href{https://www.contributor-covenant.org}{Contributor Covenant} for development projects
179-
and the \href{http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy}{model code of conduct} from the \href{http://geekfeminism.wikia.com/}{Geek Feminism Wiki} for in-person events.
178+
We recommend using the \hreffoot{https://www.contributor-covenant.org}{Contributor Covenant} for development projects
179+
and the \hreffoot{http://geekfeminism.wikia.com/wiki/Conference\_anti-harassment/Policy}{model code of conduct}
180+
from the \hreffoot{http://geekfeminism.wikia.com/}{Geek Feminism Wiki} for in-person events.
180181
Both have been thought through carefully and revised in the light of experience,
181182
and both are now used widely enough that
182183
many potential participants in your project will not need to have them explained.

conduct.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ \section{Scope}\label{s:conduct-scope}
7171
\section{Enforcement}\label{s:conduct-enforcement}
7272

7373
Instances of abusive, harassing, or otherwise unacceptable behavior
74-
may be reported by \href{[email protected]}{emailing the project team}. All
74+
may be reported by \hreffoot{[email protected]}{emailing the project team}. All
7575
complaints will be reviewed and investigated and will result in a
7676
response that is deemed necessary and appropriate to the
7777
circumstances. The project team is obligated to maintain
@@ -85,4 +85,4 @@ \section{Enforcement}\label{s:conduct-enforcement}
8585
\section{Attribution}\label{s:conduct-attribution}
8686

8787
This Code of Conduct is adapted from
88-
the \href{https://www.contributor-covenant.org}{Contributor Covenant} version 1.4.
88+
the \hreffoot{https://www.contributor-covenant.org}{Contributor Covenant} version 1.4.

contributing.tex

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ \chapter{Contributing}\label{s:contributing}
22

33
Contributions of all kinds are welcome, from errata and minor improvements to
44
entirely new sections and chapters: please
5-
\href{mailto:[email protected]}{email us} or submit an issue or pull
6-
request to \href{https://github.com/software-tools-in-javascript/js4ds/}{our
5+
submit an issue or pull request to \hreffoot{https://github.com/software-tools-in-javascript/js4ds/}{our
76
GitHub repository}. Everyone whose work is incorporated will be acknowledged;
87
please note that all contributors are required to abide by our Code of Conduct
98
(\appref{s:conduct}). Please note that we use Simplified English rather than
109
Traditional English, i.e., American rather than British spelling and grammar. We
11-
encourage translations; if you would like to take this on, please
12-
\href{mailto:[email protected]}{email us}.
10+
encourage translations; if you would like to take this on, please \hreffoot{[email protected]}{email us}.
1311

1412
If you wish to report errata or suggest improvements to wording, please include
1513
the chapter name in the first line of the body of your report (e.g., \texttt{Testing\ Data\ Analysis}).

dataforge.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ \section{Subsets}\label{s:dataforge-subset}
449449
You may have noticed that the color values in the table above are strings rather than numbers.
450450
If we want Data-Forge to convert values to more useful types,\index{dataframe!type conversion}
451451
we can use the methods \texttt{parseDates}, \texttt{parseFloats}, and so on.
452-
The program below does this for data about earthquakes in August 2016,
453-
a subset of the dataset which can be found at \url{https://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php}:
452+
The program below does this for a subset of
453+
\hreffoot{https://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php}{USGS data about earthquakes in August 2016}:
454454

455455
\begin{minted}{js}
456456
const fs = require('fs')

dataman.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ \section{Data Formats}\label{s:dataman-formats}
9494
\section{Slicing Data}\label{s:dataman-slicing}
9595

9696
The data we will use as an example is available in a variety of formats
97-
from \url{https://figshare.com/articles/Portal_Project_Teaching_Database/1314459}.
97+
from the \hreffoot{https://figshare.com/articles/Portal\_Project\_Teaching\_Database/1314459}{Portal Project Teaching Database}.
9898
We will focus on \texttt{surveys.csv},
9999
which has over 35,500 records.
100100
That's a lot to look at,
@@ -192,7 +192,7 @@ \section{Data Manager}\label{s:dataman-manager}
192192
to particular columns.
193193
\end{enumerate}
194194

195-
We will use \href{https://www.papaparse.com/}{PapaParse}\index{PapaParse} to parse our CSV,
195+
We will use \hreffoot{https://www.papaparse.com/}{PapaParse}\index{PapaParse} to parse our CSV,
196196
so our first step is to install it:
197197

198198
\begin{minted}{shell}
@@ -382,7 +382,7 @@ \section{Exercises}\label{s:dataman-exercises}
382382
a pseudo-random number generator will always produce the same sequence of values.
383383
384384
There is no way to set a seed for \texttt{Math.random} out of the box,
385-
but the \href{https://www.npmjs.com/package/seedrandom}{seedrandom} package provides an add-on function for this purpose.
385+
but the \hreffoot{https://www.npmjs.com/package/seedrandom}{seedrandom} package provides an add-on function for this purpose.
386386
Install the package and modify the slice selection utility
387387
so that it takes a word or phrase as a command-line argument
388388
and uses it to seed the random number generator.
@@ -421,7 +421,7 @@ \section{Exercises}\label{s:dataman-exercises}
421421
\exercise{Handling Command-Line Arguments}
422422
423423
Read the documentation for
424-
the \href{https://www.npmjs.com/package/command-line-args}{\texttt{command-line-args}} package
424+
the \hreffoot{https://www.npmjs.com/package/command-line-args}{\texttt{command-line-args}} package
425425
and rewrite the data slicing script to use it instead of \texttt{process.argv.slice}.
426426
427427
\section*{Key Points}

db.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ \chapter{Using a Database}\label{s:db}
1616
We will use a SQL database because it's still the most common choice,
1717
but we won't try to introduce SQL itself:
1818
for that,
19-
see \href{https://swcarpentry.github.io/sql-novice-survey/}{this short tutorial}.
19+
see \hreffoot{https://swcarpentry.github.io/sql-novice-survey/}{this short tutorial}.
2020

2121
As an example problem,
2222
we will store information about workshops.

deploy.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ \chapter{Deploying}\label{s:deploy}
66
particularly because it shouldn't be done without thinking carefully about security,
77
but there are now a few entry-level platforms you can try out.
88

9-
One of the simplest of these platforms is \href{https://glitch.com/}{Glitch},
9+
One of the simplest of these platforms is \hreffoot{https://glitch.com/}{Glitch},
1010
which is designed to help students build their first interactive websites.
1111
It isn't designed to host large, high-traffic applications,
1212
but is great for prototyping and classroom use.

dynamic.tex

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ \chapter{Dynamic Pages}\label{s:dynamic}
1111
the HTML is generated on the \gref{g:server}{server},
1212
and it was popular because that's where the data was,
1313
and that was the only place complex code could be run.
14-
(This tutorial uses a templating tool called \href{https://jekyllrb.com/}{Jekyll}.
15-
It's clumsy and limited, but it's the default on \href{http://github.com/}{GitHub}.)
14+
(This tutorial uses a templating tool called \hreffoot{https://jekyllrb.com/}{Jekyll}.
15+
It's clumsy and limited, but it's the default on \hreffoot{http://github.com/}{GitHub}.)
1616

1717
Server-side generation can be done statically or dynamically,
1818
i.e.,
@@ -37,7 +37,7 @@ \chapter{Dynamic Pages}\label{s:dynamic}
3737

3838
Many (many) JavaScript frameworks for client-side page generation have been created,
3939
and more are probably being developed right now.
40-
We have chosen \href{https://reactjs.org/}{React}\index{React} because it is freely available,
40+
We have chosen \hreffoot{https://reactjs.org/}{React}\index{React} because it is freely available,
4141
widely used,
4242
well documented,
4343
simpler than many alternatives,
@@ -140,7 +140,7 @@ \section{Hello, World}\label{s:dynamic-hello}
140140
\section{JSX}\label{s:dynamic-jsx}
141141
142142
Writing nested functions is a clumsy way to write HTML,
143-
so most React programmers use a tool called \href{https://reactjs.org/docs/introducing-jsx.html}{JSX}\index{JSX}
143+
so most React programmers use a tool called \hreffoot{https://reactjs.org/docs/introducing-jsx.html}{JSX}\index{JSX}
144144
that translates HTML into JavaScript function calls.
145145
And yes,
146146
those JavaScript function calls then produce HTML---it's a funny world.
@@ -169,7 +169,7 @@ \section{JSX}\label{s:dynamic-jsx}
169169
\end{minted}
170170
171171
Along with the two React libraries,
172-
this page includes a tool called \href{https://babeljs.io/}{Babel}\index{Babel}
172+
this page includes a tool called \hreffoot{https://babeljs.io/}{Babel}\index{Babel}
173173
to translate a mixed of HTML and JavaScript into pure JavaScript.
174174
To trigger translation,
175175
we add the attribute \texttt{type="text/babel"} to the \texttt{script} tag.
@@ -299,9 +299,9 @@ \section{Developing with Parcel}\label{s:dynamic-parcel}
299299
As with front-end frameworks,
300300
there are many to choose from,
301301
and new ones are being added almost weekly.
302-
\href{https://webpack.js.org/}{Webpack}\index{Webpack} is probably the most widely used,
302+
\hreffoot{https://webpack.js.org/}{Webpack}\index{Webpack} is probably the most widely used,
303303
but it is rather complex,
304-
so we will use \href{https://parceljs.org/}{Parcel},\index{Parcel}
304+
so we will use \hreffoot{https://parceljs.org/}{Parcel},\index{Parcel}
305305
which is younger and therefore not yet bloated
306306
(but give it time).
307307
@@ -362,7 +362,7 @@ \section{Developing with Parcel}\label{s:dynamic-parcel}
362362
Parcel also caches things in \texttt{./.cache} so that it doesn't need to do redundant work;
363363
both directories are normally added to \texttt{.gitignore}.
364364
To learn more about Parcel,
365-
see \href{https://medium.com/codingthesmartway-com-blog/getting-started-with-parcel-197eb85a2c8c}{this short tutorial}.
365+
see \hreffoot{https://medium.com/codingthesmartway-com-blog/getting-started-with-parcel-197eb85a2c8c}{this short tutorial}.
366366
367367
\figpdf{figures/dynamic-parcel.pdf}{What Goes Where with Parcel}{f:dynamic-parcel}
368368

finale.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ \chapter{Finale}\label{s:finale}
1818
as a data store.
1919
Beyond that,
2020
you could look at more advanced techniques in JavaScript \cite{Have2018},
21-
explore the full power of the \href{https://d3js.org/}{D3} library for interactive visualization \cite{Meek2017},
21+
explore the full power of the \hreffoot{https://d3js.org/}{D3} library for interactive visualization \cite{Meek2017},
2222
dive into data wrangling \cite{Davi2018},
2323
or start over completely the way JavaScript programmers do every eight months
24-
and rewrite everything with \href{https://developer.mozilla.org/en-US/docs/Web/Web_Components}{Web Components}.
24+
and rewrite everything with \hreffoot{https://developer.mozilla.org/en-US/docs/Web/Web\_Components}{Web Components}.
2525
Whatever you do,
2626
we hope that this tutorial has helped you get started.
2727

2828
Contributions of all kinds are welcome,
2929
from errata and minor improvements to entirely new sections and chapters.
30-
Please \href{https://github.com/software-tools-in-javascript/js4ds/issues}{file an issue}
31-
or \href{https://github.com/software-tools-in-javascript/js4ds/pulls}{submit a pull request}
32-
in \href{https://github.com/software-tools-in-javascript/js4ds/}{our GitHub repository}.
30+
Please \hreffoot{https://github.com/software-tools-in-javascript/js4ds/issues}{file an issue}
31+
or \hreffoot{https://github.com/software-tools-in-javascript/js4ds/pulls}{submit a pull request}
32+
in \hreffoot{https://github.com/software-tools-in-javascript/js4ds/}{our GitHub repository}.
3333
Everyone whose work is incorporated will be acknowledged.
3434
Please see the contributors's guide for more information,
3535
and please note that all contributors are required to abide by

glossary.tex

-2
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,6 @@ \chapter{Glossary}\label{s:gloss}
578578
A pattern for matching text, written as text itself. Regular expressions
579579
are sometimes called ``regexp'', ``regex'', or ``RE'', and are as powerful as
580580
they are cryptic.
581-
See \href{https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions}{this documentation}
582-
for more details.
583581

584582
\gitem{g:relational-database}{relational database}
585583
A database that organizes information into \grefcross{g:table}{tables}, each of which

htmlcss.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ \section{Cascading Style Sheets}\label{s:htmlcss-css}
485485
A detailed discussion of the order of precedence for CSS rules
486486
is outside the scope of this tutorial. We recommend that those
487487
likely to work often with stylesheets read (and consider bookmarking)
488-
\href{https://www.w3schools.com/css/css_specificity.asp}{this W3Schools page}.
488+
\hreffoot{https://www.w3schools.com/css/css\_specificity.asp}{this W3Schools page}.
489489
490490
One other thing CSS can do is match specific elements.
491491
We can label particular elements uniquely within a page using the \texttt{id} attribute,\index{element!ID}
@@ -539,7 +539,7 @@ \section{Bootstrap}\label{s:htmlcss-bootstrap}
539539
540540
CSS can become very complicated very quickly,
541541
so most people use a framework to take care of the details.
542-
One of the most popular is \href{https://getbootstrap.com/}{Bootstrap}\index{Bootstrap}
542+
One of the most popular is \hreffoot{https://getbootstrap.com/}{Bootstrap}\index{Bootstrap}
543543
(which is what we're using to style this website).
544544
Here's the entire source of a page that uses Bootstrap
545545
to create a two-column layout with a banner at the top:

interactive.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ \section{Fetching Data}\label{s:interactive-fetching}
542542
\texttt{React} will complain if we don't provide a unique key\index{React!need for unique keys}
543543
to distinguish elements that we create,
544544
since having these keys helps it keep track of the component-to-DOM relationship,
545-
which in turn \href{https://stackoverflow.com/questions/28329382/understanding-unique-keys-for-array-children-in-react-js}{makes updates much more efficient}.
545+
which in turn \hreffoot{https://stackoverflow.com/questions/28329382/understanding-unique-keys-for-array-children-in-react-js}{makes updates much more efficient}.
546546
Since each asteroid's name is supposed to be unique,
547547
we use that name as the key for each table row.
548548
@@ -779,7 +779,7 @@ \section{Exercises}\label{s:interactive-exercises}
779779
780780
Are the curly braces necessary when exporting from a component file?
781781
What happens if you remove them?
782-
Read this \href{http://2ality.com/2014/09/es6-modules-final.html}{blogpost} and then consider whether it might
782+
Read this \hreffoot{http://2ality.com/2014/09/es6-modules-final.html}{blogpost} and then consider whether it might
783783
have been more appropriate to use default exports and imports
784784
in the examples above.
785785

0 commit comments

Comments
 (0)