Permalink
Browse files

HTMLBook build fixes

  • Loading branch information...
stefanv committed Jan 11, 2017
1 parent 9468af3 commit 94644f84f2cebd9a97b6607034814dc4ec1b0c04
Showing with 20 additions and 3 deletions.
  1. +6 −0 .gitmodules
  2. +10 −2 Makefile
  3. +1 −0 OReilly_HTMLBook
  4. +2 −1 markdown/ch1.markdown
  5. +1 −0 markdown/preface.markdown
@@ -0,0 +1,6 @@
[submodule "HTMLBook"]
path = OReilly_HTMLBook
url = git@github.com:oreillymedia/HTMLBook
[submodule "OReilly_HTMLBook"]
path = OReilly_HTMLBook
url = git@github.com:oreillymedia/HTMLBook
@@ -56,9 +56,17 @@ $(BUILD_HTML)/%.html: $(BUILD_NB)/%.ipynb $(BUILD_HTML)/custom.css
jupyter nbconvert --to html $< --stdout > $@
tools/html_image_embedder.py $@ > $@.embed && mv $@.embed $@

$(BUILD_HTMLBOOK)/%.xml: $(BUILD_NB)/%.ipynb
OReilly_HTMLBook:
git submodule init && git submodule update

$(BUILD_HTMLBOOK)/%.xml: $(BUILD_NB)/%.ipynb OReilly_HTMLBook
jupyter nbconvert --to=mdoutput --output="$(notdir $@)" --output-dir=$(BUILD_HTMLBOOK) $<
htmlbook -s $@.md -o $@

TITLE=`cat $@.md | grep -e '^# ' | head -n 1 | sed 's/^# //'` ; \
htmlbook -c -s $@.md -o $@ -t "$$TITLE" ; \

xmllint --schema OReilly_HTMLBook/schema/htmlbook.xsd --noout $@

rm $@.md

$(BUILD_HTML)/custom.css:
Submodule OReilly_HTMLBook added at 14fdea
@@ -68,6 +68,7 @@ This molecule has a repetitive backbone on which lie chemical groups called *bas
There are four kinds of bases, abbreviated to A, C, G, and T, constituting an alphabet with which information is stored.

![The chemical structure of DNA](https://upload.wikimedia.org/wikipedia/commons/e/e4/DNA_chemical_structure.svg)

*Image by Madeleine Price Ball, used under the terms of the CC0 public domain license*

To access this information, the DNA is *transcribed* into a sister molecule called *messenger ribonucleic acid*, or mRNA.
@@ -474,7 +475,7 @@ import warnings
warnings.filterwarnings('ignore', '.*Axes.*compatible.*tight_layout.*')
```

> ## Tip: A quick note on plotting {.callout}
> **Tip: A quick note on plotting {.callout}**
>
> As a short aside, the code above does a few neat things to make our plots
> prettier. First, `%matplotlib inline` is a Jupyter notebook
@@ -374,6 +374,7 @@ There are a whole bunch of other great GitHub features, but we will leave many t
In essence, GitHub has democratized software development. It has substantially reduced the barrier to entry.

![The impact of GitHub](https://jakevdp.github.io/figures/author_count.png)

**[Used with permission of the author, Jake VanderPlas]**

### Make your Mark on the SciPy Ecosystem

0 comments on commit 94644f8

Please sign in to comment.