You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -27,11 +27,11 @@ Such a URL returns a PNG containing math rendered by LaTeX.
27
27
28
28
Prior to the existence of this microservice, we called `wp.com/latex.php` for our math needs. _(Thanks WordPress!)_
29
29
30
-
Pressbooks users wanted a [MathJax](https://www.mathjax.org/) solution.
30
+
Pressbooks users wanted a [MathJax](https://www.mathjax.org/) solution.
31
31
32
32
MathJax's [CommonHTML output](http://docs.mathjax.org/en/latest/options/output-processors/CommonHTML.html) works great in webbooks, but not in PDFs, EPUBs, MOBIs, ...
33
33
34
-
Nowadays, Pressbooks uses CommonHTML output in webbooks, SVGs in PDFs, and PNGs in MOBI/EPUBs.
34
+
Nowadays, Pressbooks uses CommonHTML output in webbooks, SVGs in PDFs, and PNGs in MOBI/EPUBs.
35
35
36
36
The SVGs and PNGs are generated as follows:
37
37
@@ -53,23 +53,94 @@ Mix and match `fg=<RRGGBB>`, `font=<string>` and `dpi=<number>` as needed.
The `isBase64` parameter can be set to either `true` or `1`. For URL safety, the base64 encoded formulas above don't include padding characters (`==`).
73
+
74
+
### Base64 Encoding Examples
75
+
76
+
Here are some examples of formulas and their URL-safe base64 encoded versions (without padding):
Where `us-east-1` is your AWS region and `yourself` corresponds to an identity in your `~/.aws/credentials` file.
166
+
Where `us-east-1` is your AWS region and `yourself` corresponds to an identity in your `~/.aws/credentials` file.
96
167
97
168
If everything goes well, the above command will finish after a few moments and print a response with a URL. Use in Pressbooks as the value for `PB_MATHJAX_URL`
98
169
99
170
More info: https://claudiajs.com/tutorials/installing.htmlhttps://github.com/claudiajs/claudia/blob/master/docs/
100
171
172
+
If you are deploying not for the first time, use
173
+
174
+
```
175
+
rm -rf node_modules package-lock.json
176
+
npm install --arch=x64 --platform=linux
177
+
claudia update --use-local-dependencies
178
+
```
179
+
180
+
This will download the dependencies needed for Linux and deploy to AWS Lambda.
0 commit comments