Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Print PDF' output using AH Formatter #604

Open
wants to merge 96 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
ee43f73
Add monetization meta tag to head.html
LouiseSteward Oct 27, 2020
e99b98b
Add Google Analytics for deploy preview
LouiseSteward Nov 3, 2020
05e6351
Add monetization listener js
LouiseSteward Nov 3, 2020
76ebd6d
Update bundle
LouiseSteward Nov 3, 2020
af69498
Add non-interaction argument to gtag event
LouiseSteward Nov 3, 2020
712e66d
Try Universal Analytics property
LouiseSteward Nov 4, 2020
c0029a3
Add debug logs
LouiseSteward Nov 4, 2020
b39e649
Add timeout
LouiseSteward Nov 4, 2020
171d6d3
Change bookTitle call
LouiseSteward Nov 4, 2020
b37d766
Add logging to txt file
LouiseSteward Nov 5, 2020
5df9b76
Finalize monetization tracking protocol
LouiseSteward Nov 10, 2020
f4b20e8
Remove Google Analytics
LouiseSteward Nov 10, 2020
e6a9032
Add switch for monetization in settings.yml
LouiseSteward Nov 11, 2020
0df6ce3
'xslt3' for running XSLT; 'node-libtidy', etc., for MathJax XHTML.
tgraham-antenna Sep 27, 2021
d1e99a7
Generate XHTML from MathJax so later XSLT does not fall over.
tgraham-antenna Sep 27, 2021
58ef106
Add '1a' option to generate print PDF using AH Formatter.
tgraham-antenna Sep 27, 2021
0feb80a
Can format maths as SVG instead of built-in MathML 3.0 rendering.
tgraham-antenna Sep 28, 2021
1067daa
Add <thead> so header repeats at page break.
tgraham-antenna Sep 28, 2021
cfa5ee2
'-ah-flush-zone' and '-ah-adjust-last-line-spacing'.
tgraham-antenna Sep 29, 2021
8c9ef0b
Add notes on debugging the Windows app
LaurenEllwood Oct 21, 2021
2360e6f
Merge pull request #606 from LaurenEllwood/master
LaurenEllwood Oct 21, 2021
dc1b508
Remove monetization tracking code
LouiseSteward Nov 2, 2021
924985d
Turn off monetization for the template
LouiseSteward Nov 2, 2021
6117b36
Add docs for monetization
LouiseSteward Nov 2, 2021
014d2be
Merge pull request #505 from LouiseSteward/test-web-monetization
LouiseSteward Nov 2, 2021
f9b587e
Fix redirecting link
arthurattwell Nov 4, 2021
2f3c4d3
Replace hard-coded legacy values with variables
arthurattwell Nov 4, 2021
a8b753e
Fix links
arthurattwell Nov 4, 2021
d33f3da
Fix link
arthurattwell Nov 4, 2021
33a211e
Merge pull request #608 from electricbookworks/fix-links
arthurattwell Nov 4, 2021
72ca601
Enable extra images and excluding images from modification
arthurattwell Nov 5, 2021
04adb98
Create documentation
arthurattwell Nov 8, 2021
af4cf5a
Refine SVG and 'all' modification checking
arthurattwell Nov 8, 2021
09500bb
Add newly processed images
arthurattwell Nov 8, 2021
6c2dd51
Merge pull request #609 from electricbookworks/image-settings
arthurattwell Nov 10, 2021
60b529b
Enable adding functions to manipulate specific SVGs
arthurattwell Nov 18, 2021
c63dfda
Remove debugging statement
arthurattwell Nov 19, 2021
b97e059
Allow one function for all SVGs in a book
arthurattwell Nov 19, 2021
753c3b8
Improve file naming and structure system
arthurattwell Nov 19, 2021
47634d3
Add docs
arthurattwell Nov 19, 2021
3176141
Add to files.txt, track potentially empty, necessary folders
arthurattwell Nov 19, 2021
3bf637b
Do not trigger accordion close on ctrl+click
arthurattwell Nov 22, 2021
e2c4af3
Merge pull request #611 from electricbookworks/fix-new-tab-click
arthurattwell Nov 23, 2021
8ebdbed
Strip HTML before truncating excerpts
arthurattwell Nov 28, 2021
5467f9e
Merge pull request #612 from electricbookworks/strip-html-in-search-r…
arthurattwell Nov 28, 2021
743c118
Update search index
arthurattwell Nov 29, 2021
b7efc86
Merge pull request #613 from electricbookworks/update-search-index
arthurattwell Nov 29, 2021
9a7b7f6
Also highlight search-query-stems in pages linked from search
arthurattwell Nov 29, 2021
dc96da8
Merge pull request #614 from electricbookworks/smarter-search-highlig…
arthurattwell Nov 30, 2021
e530634
Merge pull request #610 from electricbookworks/svg-manipulation
arthurattwell Dec 5, 2021
2ffccb7
Move JS options to editable settings
arthurattwell Dec 5, 2021
385b87a
Enable placing 'jump to result' box in settings
arthurattwell Dec 5, 2021
aeadbbf
Replace ugly placeholder cover with inoffensive alternative
arthurattwell Dec 5, 2021
490acab
Merge pull request #616 from electricbookworks/template-cover
arthurattwell Dec 5, 2021
c1c1537
Only load local modules if they exist
arthurattwell Dec 5, 2021
f4a579d
Merge pull request #617 from electricbookworks/check-local-modules
arthurattwell Dec 6, 2021
a6c4dfa
Merge pull request #615 from electricbookworks/search-and-accordion
arthurattwell Dec 6, 2021
136640d
Update accordion docs since #615
arthurattwell Dec 9, 2021
cdcffc8
Merge pull request #619 from electricbookworks/fix-accordion-docs
arthurattwell Dec 9, 2021
be50eb6
Fix accordion docs since #615
arthurattwell Dec 9, 2021
5236409
Merge pull request #620 from electricbookworks/fixes-accordion-docs
arthurattwell Dec 9, 2021
013bfd6
Do not bubble show-hide click events
arthurattwell Dec 13, 2021
ae57c3d
Merge pull request #621 from electricbookworks/prevent-show-hide-bubb…
arthurattwell Dec 13, 2021
a479e03
Fix pagination label that read 'previous' not 'next'
arthurattwell Dec 14, 2021
3c3c44d
Merge pull request #622 from electricbookworks/fix-pagination-label
arthurattwell Dec 14, 2021
3b3c05b
Improve layout when printing from browser
arthurattwell Dec 22, 2021
cc68ebf
Merge pull request #623 from electricbookworks/web-printout-styles
arthurattwell Jan 10, 2022
ad154b5
Avoid initialising multiple times
arthurattwell Jan 18, 2022
051ccdf
Merge pull request #625 from electricbookworks/fix-bookmark-listener
arthurattwell Jan 21, 2022
782e18d
Make check for image script more robust
arthurattwell Jan 24, 2022
aed0909
Merge pull request #627 from electricbookworks/fix-image-script-check
arthurattwell Jan 25, 2022
224c5db
htmltidy was dropping empty lines in verses.
tgraham-antenna Jan 27, 2022
cf5c0ed
Line numbers for verses is useful in education.
tgraham-antenna Jan 27, 2022
89bf82b
Dashes, italics, and small-caps closer to original.
tgraham-antenna Feb 3, 2022
e9d90eb
Small-caps at start of first line.
tgraham-antenna Feb 3, 2022
5f9d0bc
CSS keywords for small-caps, all-small-caps, and oldstyle-nums.
tgraham-antenna Feb 3, 2022
000f16d
Add flag for docx export
arthurattwell Feb 11, 2022
cb8b2cc
Merge pull request #628 from electricbookworks/docx-export-flag
arthurattwell Feb 11, 2022
686f610
Don't hard code publisher-logo image on title page
arthurattwell Feb 11, 2022
63e2bd0
Merge pull request #629 from electricbookworks/abstract-title-page-logo
arthurattwell Feb 11, 2022
76b61cf
Check for book folder before all_svg
arthurattwell Feb 22, 2022
24bae16
Merge pull request #632 from electricbookworks/fix-all_svg-check
arthurattwell Feb 22, 2022
1c0f136
Fix: hide menu when clicking in in-page nav link
arthurattwell Feb 23, 2022
38799cc
Merge pull request #633 from electricbookworks/fix-in-page-nav-links
arthurattwell Feb 23, 2022
b7a0322
'xslt3' for running XSLT; 'node-libtidy', etc., for MathJax XHTML.
tgraham-antenna Sep 27, 2021
baa2e24
Generate XHTML from MathJax so later XSLT does not fall over.
tgraham-antenna Sep 27, 2021
b3505e1
Add '1a' option to generate print PDF using AH Formatter.
tgraham-antenna Sep 27, 2021
cc592fd
Can format maths as SVG instead of built-in MathML 3.0 rendering.
tgraham-antenna Sep 28, 2021
3cc006e
Add <thead> so header repeats at page break.
tgraham-antenna Sep 28, 2021
5ae14ab
'-ah-flush-zone' and '-ah-adjust-last-line-spacing'.
tgraham-antenna Sep 29, 2021
9e484ea
htmltidy was dropping empty lines in verses.
tgraham-antenna Jan 27, 2022
75a93b2
Line numbers for verses is useful in education.
tgraham-antenna Jan 27, 2022
82d75fc
Dashes, italics, and small-caps closer to original.
tgraham-antenna Feb 3, 2022
06772e3
Small-caps at start of first line.
tgraham-antenna Feb 3, 2022
a82325a
CSS keywords for small-caps, all-small-caps, and oldstyle-nums.
tgraham-antenna Feb 3, 2022
5af8cc0
Merge branch 'ahf' of https://github.com/tgraham-antenna/electric-boo…
tgraham-antenna May 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A Jekyll template for creating books in multiple formats:
- the content files in `book/text`
3. Run the `run-` script for your operating system.

[Read the guide](https://electricbookworks.github.io/electric-book) for much more. The guide is also an example of the template in action.
[Read the guide](https://electricbookworks.github.io/electric-book/) for much more. The guide is also an example of the template in action.

## Dependencies

Expand Down
2 changes: 1 addition & 1 deletion _app/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ layout: min
{{ project-description }}
{% endif %}
</description>
<author email="[email protected]" href="https://fireandlion.com/">
<author email="{{ site.data.meta.email }}" href="{{ site.data.meta.url }}">
{% if site.build-language and site.build-language != "" %}
{{ site.data.locales[site.build-language].project.organisation }}
{% else %}
Expand Down
4 changes: 4 additions & 0 deletions _configs/_config.docx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Config flags for export to .docx

export:
format: docx
139 changes: 139 additions & 0 deletions _configs/_config.print-ahf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Set site.output == "print-ahf"
output: "print-ahf"
# Set site.image-set == "images/print-pdf"
image-set: "images/print-pdf"
# Turn off documentation
collections:
docs:
output: false
exclude:
# The usual excludes from _config.yml
- run-linux.sh
- run-mac.command
- run-windows.bat
- Gemfile
- Gemfile.lock
- README*
- LICENSE*
- CHANGELOG*
- node_modules
- eslint.json
- gulpfile.js
- package.json
- package-lock.json
- CNAME
- .sass-cache

# Included as-is in other files, no need to process
- /assets/js/annotation.js
- /assets/js/polyfills.js
- /assets/js/utilities.js
- /assets/js/settings.js
- /assets/js/locales.js
- /assets/js/setup.js
- /assets/js/mark-parents.js
- /assets/js/mark.min.js
- /assets/js/redact.js
- /assets/js/search-store.js
- /assets/js/search-terms.js
- /assets/js/nav.js
- /assets/js/videos.js
- /assets/js/mcqs.js
- /assets/js/select-list.js
- /assets/js/tables.js
- /assets/js/footnote-popups.js
- /assets/js/show-hide.js
- /assets/js/elasticlunr.min.js
- /assets/js/elasticlunr-setup.js
- /assets/js/svg-management.js
- /assets/js/svg-inject.min.js
- /assets/js/lazyload.js
- /assets/js/accordion.js
- /assets/js/heading-titles.js
- /assets/js/rotate.js
- /assets/js/footnotes.js
- /assets/js/shift-elements.js
- /assets/js/page-reference.js
- /assets/js/bookmarks.js

# Exclude files we don't need for print-ahf
- about.md
- contact.md
- index.md
- search.md
- sitemap.xml
- /assets/styles
- /assets/js/accordion.js
- /assets/js/annotation.js
- /assets/js/elasticlunr-setup.js
- /assets/js/elasticlunr.min.js
- /assets/js/mark.min.js
- /assets/js/mcqs.js
- /assets/js/nav.js
- /assets/js/render-search-index.js
- /assets/js/search-index.js
- /assets/js/search-results.js
- /assets/js/search-store.js
- /assets/js/search-terms.js
- /assets/js/videos.js
- /*/package.opf
- /*/toc.ncx
- /*/styles/screen-pdf.scss
- /*/styles/web.scss
- /*/styles/epub.scss
- /*/styles/app.scss
- /*/index.md
- /*/images/screen-pdf
- /*/images/web
- /*/images/epub
- /*/images/app

# Temporarily exclude these and keep_files them below
# for faster builds where you don't need to refresh these.
# - /assets/fonts
# - /book/fonts
# - /book/styles
# - /samples/text/00-00-cover
# - /samples/text/00-01-halftitle-page
# - /samples/text/00-02-previous-publications-page
# - /samples/text/00-03-title-page
# - /samples/text/00-04-copyright-page
# - /samples/text/00-05-contents-page
# - /samples/text/00-06-dedication-page
# - /samples/text/00-07-epigraph-page
# - /samples/text/00-08-frontispiece-page
# - /samples/text/00-09-frontmatter
# - /samples/text/01-00-text
# - /samples/text/01-01-plain-text
# - /samples/text/01-02-headings
# - /samples/text/01-03-quotes
# - /samples/text/01-04-lists
# - /samples/text/01-05-tables
# - /samples/text/01-06-boxes
# - /samples/text/01-07-notes
# - /samples/text/01-08-dividers
# - /samples/text/01-09-poetry
# - /samples/text/01-10-questions
# - /samples/text/02-00-images
# - /samples/text/02-01-plain-images
# - /samples/text/02-02-figures
# - /samples/text/03-00-code-and-maths
# - /samples/text/03-01-code
# - /samples/text/03-02-maths
# - /samples/text/04-00-interactivity
# - /samples/text/04-01-links-buttons
# - /samples/text/04-02-video
# - /samples/text/04-03-audio
# - /samples/text/04-04-iframes
# - /samples/text/04-05-slides
# - /samples/text/10-00-indexes
# - /samples/text/10-01-traditional-index
# - /samples/text/10-02-dynamic-index
# - /samples/text/question-01

# Populate the keep_files list for temporary faster builds
# or to keep previously generated files for other formats.
keep_files:
# - assets/fonts
# - book/fonts
# - book/styles
22 changes: 13 additions & 9 deletions _data/images.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# Image settings
# --------------
# This file sets non-default settings for specific images.
# Add your book directory, then each image at a "-".
# For each image, you can set a colorspace (e.g. "gray", "cmyk")
# or set it to not be modified by automated image processessing.
# Possible formats: print-pdf, screen-pdf, web, epub, app
# See the docs for more detail: /docs/images/image-conversions.html#image-settings
#
# E.g.
# - file: "duckrabbit.jpg"
# print-pdf:
# colorspace: "gray"
#
# Possible values
# - print-PDF colorspace: cmyk | gray
# book:
# - file: "duckrabbit.jpg"
# print-pdf:
# colorspace: "gray"
#
# To apply settings to all images at once,
# use "all" instead of a filename.
# E.g.
# - file: "all"
# print-pdf:
# colorspace: "gray"
# book:
# - file: "all"
# print-pdf:
# colorspace: "gray"
37 changes: 37 additions & 0 deletions _data/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ web:
# particular heading level? Default h2, set in accordion.js.
# Set this to true to enable, or false to disable.
accordion: false
# Set the heading level that defines an accordion section
accordion-level: h3
# Should opening a new section close the others?
accordion-auto-close: false
# Enable annotation
# You can have annotation on for development and/or for live.
# Set each to either true or false
Expand Down Expand Up @@ -123,6 +127,25 @@ web:
nav:
home:
expand-books: false
# --------------
# Search
# --------------
search:
# Set where you want the 'Jump to first result' box
# to show on pages linked from search results.
# Define this as a querySelector string, targeting
# the element before which the box should be shown.
# Or for the main page heading, use the default 'mainHeading'.
jump-box-location: "mainHeading"
# --------------
# Monetization
# --------------
# If your book is going to use web monetization, add your
# ILP pointer here. See _docs/advanced/monetization.md
# for more information about web monetization.
monetization:
enabled: false
ilp-pointer: ""

# ----------------------------------------------------------
# Epub settings
Expand Down Expand Up @@ -193,6 +216,10 @@ app:
# particular heading level? Default h2, set in accordion.js.
# Set this to true to enable, or false to disable.
accordion: false
# Set the heading level that defines an accordion section
accordion-level: h3
# Should opening a new section close the others?
accordion-auto-close: false
# -----------------
# Bookmarks
# -----------------
Expand All @@ -213,6 +240,16 @@ app:
nav:
home:
expand-books: false
# --------------
# Search
# --------------
search:
# Set where you want the 'Jump to first result' box
# to show on pages linked from search results.
# Define this as a querySelector string, targeting
# the element before which the box should be shown.
# Or for the main page heading, use the default 'mainHeading'.
jump-box-location: "mainHeading"

# ----------------------------------------------------------
# External media settings
Expand Down
4 changes: 4 additions & 0 deletions _docs/advanced/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ To limit a script to a given output format, use `site.output`:
All scripts to be used in your epub should be included in `assets/js/bundle.js`, and not added to pages as separate files. This is because you must not have any scripts in your epub that you aren't using, or it won't validate; and we only support including `bundle.js` in epub output.

If you don't want any Javsacript at all in your epub, you can disable it in `_data/settings.yml` by setting `epub` > `javascript` > `enabled` to `false`.You should then also exclude `assets/js/bundle.js` in the exclude list in `_configs/_config.epub.yml`.

## Manipulating SVGs

To script SVG manipulation during `gulp` preprocessing, see ['SVG processing'](../images/svg-processing.html) in the Images section.
11 changes: 11 additions & 0 deletions _docs/advanced/monetization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Web monetization
categories: advanced
---

# Web monetization
{:.no_toc}

[Web monetization](https://webmonetization.org/) allows content creators to be compensated for their work, without tracking user data or including advertisements on their sites, using the Interledger protocol for funds transfer.

Once you have set up an [ILP-enabled wallet](https://webmonetization.org/#wallets), you can activate web monetization on your ebook by pasting your ILP pointer in the "ilp-pointer" field in _data/settings.yml, and changing the "enabled" field to "true".
2 changes: 1 addition & 1 deletion _docs/editing/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ and after the last figure add

`</div>`

The template's interactive slides were developed in partnership between [The CORE Project](https://core-econ.org) and [Electric Book Works](https://electricbookworks).
The template's interactive slides were developed in partnership between [The CORE Project](https://www.core-econ.org) and [Electric Book Works](https://electricbookworks).
Loading