Skip to content

Commit

Permalink
Merge pull request #693 from LouiseSteward/mathjax-search-results
Browse files Browse the repository at this point in the history
Fix mathjax appearing in search results
  • Loading branch information
LouiseSteward committed May 15, 2024
2 parents 21939cd + 2a20ef7 commit 2f42c3f
Show file tree
Hide file tree
Showing 24 changed files with 72 additions and 47 deletions.
2 changes: 1 addition & 1 deletion _api/content/book/0-0-cover/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":0,"url":"book/0-0-cover.html","title":"Cover – Template","description":"The Electric Book's blank template.","content":"<img src='images/web/cover.jpg' sizes='auto' srcset='images/web/cover-320.jpg 320w, images/web/cover-640.jpg 640w, images/web/cover-1024.jpg 1024w, images/web/cover-2048.jpg 2048w' class='cover' alt='Template' />"}
{"id":0,"url":"book/0-0-cover.html","title":"Cover – Template","description":"The Electric Book's blank template.","content":""}
2 changes: 1 addition & 1 deletion _api/content/book/0-1-titlepage/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":1,"url":"book/0-1-titlepage.html","title":"Title page – Template","description":"The Electric Book's blank template.","content":"Template <img src='../assets/images/web/logo.svg' class='title-page-logo inject-svg' alt='' />"}
{"id":1,"url":"book/0-1-titlepage.html","title":"Title page – Template","description":"The Electric Book's blank template.","content":"Template"}
2 changes: 1 addition & 1 deletion _api/content/book/0-2-copyright/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":2,"url":"book/0-2-copyright.html","title":"Copyright – Template","description":"The Electric Book's blank template.","content":"Copyright Template ISBN (Print): 1715767931 ISBN (PDF): 1715767931 ISBN (Ebook): 1715767931 ISBN (Online): 1715767931 All rights reserved. No part of this book may be reproduced or transmitted in any form or by any electronic or mechanical means, including photocopying and recording, or any other information storage or retrieval system, without written permission from the publisher."}
{"id":2,"url":"book/0-2-copyright.html","title":"Copyright – Template","description":"The Electric Book's blank template.","content":"Copyright Template ISBN (Print): 1715767931 ISBN (PDF): 1715767931 ISBN (Ebook): 1715767931 ISBN (Online): 1715767931 All rights reserved. No part of this book may be reproduced or transmitted in any form or by any electronic or mechanical means, including photocopying and recording, or any other information storage or retrieval system, without written permission from the publisher."}
2 changes: 1 addition & 1 deletion _api/content/book/index/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":6,"url":"book/index.html","title":"Template","description":"The Electric Book's blank template.","content":"<img src='images/web/cover.jpg' sizes='auto' srcset='images/web/cover-320.jpg 320w, images/web/cover-640.jpg 640w, images/web/cover-1024.jpg 1024w, images/web/cover-2048.jpg 2048w' class='cover' alt='Template' />"}
{"id":6,"url":"book/index.html","title":"Template","description":"The Electric Book's blank template.","content":""}
2 changes: 1 addition & 1 deletion _api/content/samples/00-03-title-page/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":9,"url":"samples/00-03-title-page.html","title":"Title page – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"Samples Sample content for Electric Book print, epub and web output Arthur Attwell <img src='../assets/images/web/logo.svg' class='title-page-logo inject-svg' alt='' />"}
{"id":9,"url":"samples/00-03-title-page.html","title":"Title page – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"Samples Sample content for Electric Book print, epub and web output Arthur Attwell"}
2 changes: 1 addition & 1 deletion _api/content/samples/00-08-frontispiece-page/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":14,"url":"samples/00-08-frontispiece-page.html","title":"Frontispiece – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"<img src='images/web/count-of-monte-christo-1.jpg' srcset='images/web/count-of-monte-christo-1-320.jpg 320w, images/web/count-of-monte-christo-1-640.jpg 640w, images/web/count-of-monte-christo-1-1024.jpg 1024w, images/web/count-of-monte-christo-1.jpg 1280w' sizes='(min-width: 600px) 1300px, 100vw' alt='Illustration of Edmond Dantès' /> Look at this lovely picture from The Count of Monte Christo for the frontispiece of our sample book."}
{"id":14,"url":"samples/00-08-frontispiece-page.html","title":"Frontispiece – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"<img src='images/web/count-of-monte-christo-1.jpg' srcset='images/web/count-of-monte-christo-1-320.jpg 320w, images/web/count-of-monte-christo-1-640.jpg 640w, images/web/count-of-monte-christo-1-1024.jpg 1024w, images/web/count-of-monte-christo-1.jpg 1280w' sizes='(min-width: 600px) 1300px, 100vw' alt='Illustration of Edmond Dantès' /> Look at this lovely picture from The Count of Monte Christo for the frontispiece of our sample book."}
2 changes: 1 addition & 1 deletion _api/content/samples/02-01-plain-images/index.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _api/content/samples/02-02-figures/index.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _api/content/samples/03-02-maths/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":34,"url":"samples/03-02-maths.html","title":"Mathematics – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"Mathematics Jekyll uses MathJax, which the Electric Book workflow supports. LaTeX-style maths via MathJax can be inline (E=mc2E = mc^2) or displayed: Pt+1−Pt=b+ds(Pt−¯P)P_{t+1} - P_t=frac{b+d}{s}(P_t-overline{P}) The maths above and below is borrowed and adapted from The Economy by CORE. Pt+2−Pt+1=b+ds(Pt+1−¯P)P_{t+2} - P_{t+1}=frac{b+d}{s}(P_{t+1}-overline{P}) It follows from Pt=¯P−sb+dEtP_{t} = overset{overline{}}{P} - frac{s}{b + d}E_{t} , Et=Pt+1−PtE_{t} = P_{t + 1} - P_{t} and the equation above that Pt+2−Pt+1Pt+1−Pt=Pt+1−¯PPt−¯P=Rbegin{align} frac{P_{t+2} - P_{t+1}}{P_{t+1} - P_{t}} &= frac{P_{t+1}-overline{P}}{ P_{t}-overline{P}} &= R end{align}"}
{"id":34,"url":"samples/03-02-maths.html","title":"Mathematics – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"Mathematics Jekyll uses MathJax, which the Electric Book workflow supports. LaTeX-style maths via MathJax can be inline (E=mc2E = mc^2) or displayed: Pt+1−Pt=b+ds(Pt−¯P)P_{t+1} - P_t=frac{b+d}{s}(P_t-overline{P}) The maths above and below is borrowed and adapted from The Economy by CORE. Pt+2−Pt+1=b+ds(Pt+1−¯P)P_{t+2} - P_{t+1}=frac{b+d}{s}(P_{t+1}-overline{P}) It follows from Pt=¯P−sb+dEtP_{t} = overset{overline{}}{P} - frac{s}{b + d}E_{t} , Et=Pt+1−PtE_{t} = P_{t + 1} - P_{t} and the equation above that Pt+2−Pt+1Pt+1−Pt=Pt+1−¯PPt−¯P=Rbegin{align} frac{P_{t+2} - P_{t+1}}{P_{t+1} - P_{t}} &= frac{P_{t+1}-overline{P}}{ P_{t}-overline{P}} &= R end{align}"}
2 changes: 1 addition & 1 deletion _api/content/samples/04-03-audio/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":38,"url":"samples/04-03-audio.html","title":"Audio – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"Audio We don’t yet provide an easy include tag for audio. Instead, you can manually embed audio using HTML. Here’s an embed from SoundCloud."}
{"id":38,"url":"samples/04-03-audio.html","title":"Audio – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"Audio We don’t yet provide an easy include tag for audio. Instead, you can manually embed audio using HTML."}
2 changes: 1 addition & 1 deletion _api/content/samples/04-04-iframes/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":39,"url":"samples/04-04-iframes.html","title":"iFrames – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"iFrames You can embed an iFrame in a book, for instance an embeddable quiz like Betterquiz. At this stage, it’s best to use Liquid control flow tags to show text-only alternatives in PDF and epub, and embedded iFrames only in web output. Here’s an iFrame showing the modern book production process."}
{"id":39,"url":"samples/04-04-iframes.html","title":"iFrames – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"iFrames You can embed an iFrame in a book, for instance an embeddable quiz like Betterquiz. At this stage, it’s best to use Liquid control flow tags to show text-only alternatives in PDF and epub, and embedded iFrames only in web output."}
2 changes: 1 addition & 1 deletion _api/content/samples/04-05-slides/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":40,"url":"samples/04-05-slides.html","title":"Slides – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"Slides You can gather a number of figures into a set of slides. On the web and in apps, you can click through the slides. In print, you’ll see one summary slide, and step-by-step text below the image describing each stage in the slide sequence. In epub, you’ll see the summary slide, then each slide in turn, with its slide caption. See the docs for how to create a slide sequence like this. <img src='images/web/cats-a.jpg' srcset='images/web/cats-a-320.jpg 320w, images/web/cats-a-640.jpg 640w, images/web/cats-a-1024.jpg 1024w, images/web/cats-a.jpg 1280w' sizes='(min-width: 600px) 1300px, 100vw' alt='Simple ovals capture main body parts: A series of ovals of varying sizes positioned at important junctions and capturing some of the main body parts. The particular orientations and combinations of these primitives indicate different body poses and leads to an animation of natural-looking movements.' /> Simple ovals capture main body parts Ovals of varying sizes positioned at important junctions and capturing some of the main body parts. The particular orientations and combinations of these primitives indicate different body poses and leads to an animation of natural-looking movements. <img src='images/web/cats-b.jpg' srcset='images/web/cats-b-320.jpg 320w, images/web/cats-b-640.jpg 640w, images/web/cats-b-1024.jpg 1024w, images/web/cats-b.jpg 1280w' sizes='(min-width: 600px) 1300px, 100vw' alt='Adding detail: Details and shading are added to the original ovals.' /> Adding detail Details are added and some shading is shown. <img src='images/web/cats-c.jpg' srcset='images/web/cats-c-320.jpg 320w, images/web/cats-c-640.jpg 640w, images/web/cats-c-1024.jpg 1024w, images/web/cats-c.jpg 1280w' sizes='(min-width: 600px) 1300px, 100vw' alt='Further detail and shadows: Some of the initial primitive outlines are erased, and further details and shadows are added.' /> Further detail and shadows Some of the initial primitive outlines are erased, and further details and shadows are added. Slide 1 Three stages of an artistic way to draw animal shapes. ‘Medialness and the Perception of Visual Art’, Frederic Fol Leymarie and Prashant Aparajeya, in Art & Perception 5:2."}
{"id":40,"url":"samples/04-05-slides.html","title":"Slides – Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"Slides You can gather a number of figures into a set of slides. On the web and in apps, you can click through the slides. In print, you’ll see one summary slide, and step-by-step text below the image describing each stage in the slide sequence. In epub, you’ll see the summary slide, then each slide in turn, with its slide caption. See the docs for how to create a slide sequence like this. <img src='images/web/cats-a.jpg' srcset='images/web/cats-a-320.jpg 320w, images/web/cats-a-640.jpg 640w, images/web/cats-a-1024.jpg 1024w, images/web/cats-a.jpg 1280w' sizes='(min-width: 600px) 1300px, 100vw' alt='Simple ovals capture main body parts: A series of ovals of varying sizes positioned at important junctions and capturing some of the main body parts. The particular orientations and combinations of these primitives indicate different body poses and leads to an animation of natural-looking movements.' /> Simple ovals capture main body parts Ovals of varying sizes positioned at important junctions and capturing some of the main body parts. The particular orientations and combinations of these primitives indicate different body poses and leads to an animation of natural-looking movements. <img src='images/web/cats-b.jpg' srcset='images/web/cats-b-320.jpg 320w, images/web/cats-b-640.jpg 640w, images/web/cats-b-1024.jpg 1024w, images/web/cats-b.jpg 1280w' sizes='(min-width: 600px) 1300px, 100vw' alt='Adding detail: Details and shading are added to the original ovals.' /> Adding detail Details are added and some shading is shown. <img src='images/web/cats-c.jpg' srcset='images/web/cats-c-320.jpg 320w, images/web/cats-c-640.jpg 640w, images/web/cats-c-1024.jpg 1024w, images/web/cats-c.jpg 1280w' sizes='(min-width: 600px) 1300px, 100vw' alt='Further detail and shadows: Some of the initial primitive outlines are erased, and further details and shadows are added.' /> Further detail and shadows Some of the initial primitive outlines are erased, and further details and shadows are added. Slide 1 Three stages of an artistic way to draw animal shapes. ‘Medialness and the Perception of Visual Art’, Frederic Fol Leymarie and Prashant Aparajeya, in Art & Perception 5:2."}
2 changes: 1 addition & 1 deletion _api/content/samples/es/00-00-cover/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":44,"url":"samples/es/00-00-cover.html","title":"La tapa – Muestras","description":"Ejemplos de contenido","content":"<img src='../es/images/web/cover.jpg' sizes='auto' srcset='../es/images/web/cover-320.jpg 320w, ../es/images/web/cover-640.jpg 640w, ../es/images/web/cover-1024.jpg 1024w, ../es/images/web/cover-2048.jpg 2048w' class='cover' alt='Muestras' />"}
{"id":44,"url":"samples/es/00-00-cover.html","title":"La tapa – Muestras","description":"Ejemplos de contenido","content":""}
2 changes: 1 addition & 1 deletion _api/content/samples/es/00-03-title-page/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":45,"url":"samples/es/00-03-title-page.html","title":"La portada – Muestras","description":"Ejemplos de contenido","content":"Muestras Ejemplos de contenido Arthur Attwell <img src='../../assets/images/web/logo.svg' class='title-page-logo inject-svg' alt='' />"}
{"id":45,"url":"samples/es/00-03-title-page.html","title":"La portada – Muestras","description":"Ejemplos de contenido","content":"Muestras Ejemplos de contenido Arthur Attwell"}
2 changes: 1 addition & 1 deletion _api/content/samples/es/00-04-copyright-page/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":46,"url":"samples/es/00-04-copyright-page.html","title":"Derechos – Muestras","description":"Ejemplos de contenido","content":"Derechos Muestras © Arthur Attwell ISBN (Print): 1715767931 ISBN (Digital download): 1715767931 ISBN (Digital download): 1715767931 ISBN (Digital online): 1715767931 This work is licensed under a Creative Commons Attribution 4.0 International License. This means you are free to share (copy and redistribute the material in any medium or format) and adapt it (remix, transform, and build upon the material) for any purpose, even commercially, as long as you give appropriate credit, with a link to your source, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use."}
{"id":46,"url":"samples/es/00-04-copyright-page.html","title":"Derechos – Muestras","description":"Ejemplos de contenido","content":"Derechos Muestras © Arthur Attwell ISBN (Print): 1715767931 ISBN (Digital download): 1715767931 ISBN (Digital download): 1715767931 ISBN (Digital online): 1715767931 This work is licensed under a Creative Commons Attribution 4.0 International License. This means you are free to share (copy and redistribute the material in any medium or format) and adapt it (remix, transform, and build upon the material) for any purpose, even commercially, as long as you give appropriate credit, with a link to your source, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use."}
2 changes: 1 addition & 1 deletion _api/content/samples/fr/00-00-cover/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":52,"url":"samples/fr/00-00-cover.html","title":"Couverture – Échantillons","description":"Exemples de contenu pour le livre électrique","content":"<img src='../fr/images/web/cover.jpg' sizes='auto' srcset='../fr/images/web/cover-320.jpg 320w, ../fr/images/web/cover-640.jpg 640w, ../fr/images/web/cover-1024.jpg 1024w, ../fr/images/web/cover-2048.jpg 2048w' class='cover' alt='Échantillons' />"}
{"id":52,"url":"samples/fr/00-00-cover.html","title":"Couverture – Échantillons","description":"Exemples de contenu pour le livre électrique","content":""}
2 changes: 1 addition & 1 deletion _api/content/samples/fr/00-03-title-page/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":53,"url":"samples/fr/00-03-title-page.html","title":"Name – Échantillons","description":"Exemples de contenu pour le livre électrique","content":"Échantillons Exemples de contenu pour le livre électrique Arthur Attwell <img src='../../assets/images/web/logo.svg' class='title-page-logo inject-svg' alt='' />"}
{"id":53,"url":"samples/fr/00-03-title-page.html","title":"Name – Échantillons","description":"Exemples de contenu pour le livre électrique","content":"Échantillons Exemples de contenu pour le livre électrique Arthur Attwell"}
2 changes: 1 addition & 1 deletion _api/content/samples/fr/00-04-copyright-page/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":54,"url":"samples/fr/00-04-copyright-page.html","title":"Droits – Échantillons","description":"Exemples de contenu pour le livre électrique","content":"Droits Échantillons © Arthur Attwell ISBN (Print): 1715767931 ISBN (Digital download): 1715767931 ISBN (Digital download): 1715767931 ISBN (Digital online): 1715767931 This work is licensed under a Creative Commons Attribution 4.0 International License. This means you are free to share (copy and redistribute the material in any medium or format) and adapt it (remix, transform, and build upon the material) for any purpose, even commercially, as long as you give appropriate credit, with a link to your source, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use."}
{"id":54,"url":"samples/fr/00-04-copyright-page.html","title":"Droits – Échantillons","description":"Exemples de contenu pour le livre électrique","content":"Droits Échantillons © Arthur Attwell ISBN (Print): 1715767931 ISBN (Digital download): 1715767931 ISBN (Digital download): 1715767931 ISBN (Digital online): 1715767931 This work is licensed under a Creative Commons Attribution 4.0 International License. This means you are free to share (copy and redistribute the material in any medium or format) and adapt it (remix, transform, and build upon the material) for any purpose, even commercially, as long as you give appropriate credit, with a link to your source, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use."}
2 changes: 1 addition & 1 deletion _api/content/samples/fr/03-02-maths/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":62,"url":"samples/fr/03-02-maths.html","title":"Mathématiques – Échantillons","description":"Exemples de contenu pour le livre électrique","content":"Mathématiques Jekyll utilise MathJax, que nous soutenons. Mathématiques créées avec LaTeX: E=mc2E = mc^2"}
{"id":62,"url":"samples/fr/03-02-maths.html","title":"Mathématiques – Échantillons","description":"Exemples de contenu pour le livre électrique","content":"Mathématiques Jekyll utilise MathJax, que nous soutenons. Mathématiques créées avec LaTeX: E = mc^2E = mc^2"}
2 changes: 1 addition & 1 deletion _api/content/samples/index/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":64,"url":"samples/index.html","title":"Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":"<img src='images/web/cover.jpg' sizes='auto' srcset='images/web/cover-320.jpg 320w, images/web/cover-640.jpg 640w, images/web/cover-1024.jpg 1024w, images/web/cover-2048.jpg 2048w' class='cover' alt='Samples' />"}
{"id":64,"url":"samples/index.html","title":"Samples","description":"Sample content demonstrating Electric Book support for a wide range of book features.","content":""}
3 changes: 3 additions & 0 deletions _includes/mathjax-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
}
}
});
MathJax.Hub.Queue(function () {
document.body.setAttribute('data-mathjax-rendered', 'true')
})
</script>
<script id="MathJax"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML">
Expand Down
Loading

0 comments on commit 2f42c3f

Please sign in to comment.