jektex 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/jektex/jektex.rb +3 -3
- data/lib/jektex/katex.min.js +1 -1
- data/lib/jektex/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c8a9820fea56e754c67d39351bba20c1f21cfd91f1ac99a0543aca9f455d4cb
|
4
|
+
data.tar.gz: a0b680d4a6ee949e57b9b79e29054c81884d171cfb0923025ffa36bb646f1a30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f899741e534e393bdef3424e4760c7a7779a8868ef62d00b9f4b90b89bd4d670d985031a2acd14202ecc0245057fb569248687f677bf255a2eefb77f234321
|
7
|
+
data.tar.gz: 92fb84bf319058a0f6b3fa77283e54289e20438b1684b82374a31312de5b944ce1751cd356f09552ae9f1575f337af100c836ef675af8749ef59986ea6c24c6a
|
data/README.md
CHANGED
@@ -23,14 +23,14 @@ Jektex supports both the built-in Kramdown math notation, and the newer LaTeX-on
|
|
23
23
|
|
24
24
|
### Kramdown notation
|
25
25
|
**Inline formula**
|
26
|
-
Put formula between two pairs of
|
26
|
+
Put formula between two pairs of dollar signs (`$$`) inside of paragraph.
|
27
27
|
```latex
|
28
28
|
Lorem ipsum dolor sit amet, consectetur $$e^{i\theta}=\cos(\theta)+i\sin(\theta)$$
|
29
29
|
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
30
30
|
```
|
31
31
|
|
32
32
|
**Display formula**
|
33
|
-
Put formula between two pairs of
|
33
|
+
Put formula between two pairs of dollar signs (`$$`) and surround it with two empty lines.
|
34
34
|
```latex
|
35
35
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
36
36
|
incididunt ut labore et dolore magna aliqua.
|
@@ -178,9 +178,9 @@ plugins:
|
|
178
178
|
|
179
179
|
and don't forget to add `katex.min.css` to you HTML head:
|
180
180
|
```html
|
181
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.
|
181
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-MlJdn/WNKDGXveldHDdyRP1R4CTHr3FeuDNfhsLPYrq2t0UBkUdK2jyTnXPEK1NQ" crossorigin="anonymous">
|
182
182
|
```
|
183
|
-
It is much better practice to download the [**css** file](https://cdn.jsdelivr.net/npm/katex@0.
|
183
|
+
It is much better practice to download the [**css** file](https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css) and load it as an asset from your server directly.
|
184
184
|
You can find more information on [KaTeX's website](https://katex.org/docs/browser.html).
|
185
185
|
|
186
186
|
## Contributions and bug reports
|
data/lib/jektex/jektex.rb
CHANGED
@@ -85,7 +85,7 @@ def escape_method(type, expression, doc_path)
|
|
85
85
|
|
86
86
|
# use it if it exists
|
87
87
|
if($cache.has_key?(expression_hash) && !contains_updated_global_macro?(expression))
|
88
|
-
# check if
|
88
|
+
# check if expression contains updated macro
|
89
89
|
$count_newly_generated_expressions += 1
|
90
90
|
print_stats unless $silent
|
91
91
|
return $cache[expression_hash]
|
@@ -166,7 +166,7 @@ $path_to_cache = File.join(config["cache_dir"].to_s, CACHE_FILE) if config.has_k
|
|
166
166
|
end
|
167
167
|
end
|
168
168
|
|
169
|
-
# check
|
169
|
+
# check if silent mode is activated
|
170
170
|
$silent = config["silent"] if config.has_key?("silent")
|
171
171
|
# make list of updated macros
|
172
172
|
$updated_global_macros = get_list_of_updated_global_macros($global_macros, $cache["cached_global_macros"])
|
@@ -197,7 +197,7 @@ Jekyll::Hooks.register :site, :after_reset do
|
|
197
197
|
end
|
198
198
|
|
199
199
|
Jekyll::Hooks.register :site, :post_write do
|
200
|
-
# print stats once more to prevent them from being
|
200
|
+
# print stats once more to prevent them from being overwritten by error log
|
201
201
|
print_stats unless $silent
|
202
202
|
# print new line to prevent overwriting previous output
|
203
203
|
print "\n" unless $silent
|