Skip to content

Commit 5f3f397

Browse files
add chemical formulas, script settings, and table orientation
1 parent 1cfaf05 commit 5f3f397

File tree

1 file changed

+94
-3
lines changed

1 file changed

+94
-3
lines changed

README.md

Lines changed: 94 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
author: André Dietrich
44
5-
date: 23/10/2024
6-
version: 29.0.1
5+
date: 06/03/2025
6+
version: 30.0.0
77
language: en
88
narrator: UK English Female
99
@@ -2749,6 +2749,30 @@ Passing macros as rendering options and defining local ones currently result in
27492749
</section>
27502750

27512751

2752+
### Chemical Formulas
2753+
2754+
--{{0}}--
2755+
LiaScript now supports rendering chemical formulas using KaTeX!
2756+
With this update, you can include chemical equations in your slides using the `mhchem` macros.
2757+
2758+
--{{1}}--
2759+
To display chemical equations, simply wrap your formula using the `\ce{...}` command. For example:
2760+
2761+
{{1}}
2762+
``` latex
2763+
$\ce{CO2 + C -> 2 CO}$
2764+
```
2765+
2766+
--{{2}}--
2767+
This will render as:
2768+
2769+
{{2}}
2770+
$\ce{CO2 + C -> 2 CO}$
2771+
2772+
{{3}}
2773+
> For further details on the syntax and additional features provided by `mhchem`, please refer to the [official mhchem documentation](https://mhchem.github.io/MathJax-mhchem/).
2774+
2775+
27522776
## Footnotes
27532777

27542778
--{{0}}--
@@ -6786,6 +6810,31 @@ Simply set `data-type="none"` to prevent any kind of visualization for the corre
67866810
| Item 13 | Item 14 |
67876811
```
67886812

6813+
{{10}}
6814+
* __`data-orientation`__:
6815+
6816+
Depending on the default setting for a diagram it is possible to switch between `vertical` and `horizontal` orientation.
6817+
6818+
```markdown
6819+
<!-- data-orientation="horizontal" -->
6820+
| Animal | weight in kg | Lifespan years | Mitogen |
6821+
| --------------- | ------------:| --------------:| -------:|
6822+
| Mouse | 0.028 | 2 | 95 |
6823+
| Flying squirrel | 0.085 | 15 | 50 |
6824+
| Brown bat | 0.020 | 30 | 10 |
6825+
| Sheep | 90 | 12 | 95 |
6826+
| Human | 68 | 70 | 10 |
6827+
```
6828+
6829+
<!-- data-orientation="horizontal" -->
6830+
| Animal | weight in kg | Lifespan years | Mitogen |
6831+
| --------------- | ------------:| --------------:| -------:|
6832+
| Mouse | 0.028 | 2 | 95 |
6833+
| Flying squirrel | 0.085 | 15 | 50 |
6834+
| Brown bat | 0.020 | 30 | 10 |
6835+
| Sheep | 90 | 12 | 95 |
6836+
| Human | 68 | 70 | 10 |
6837+
67896838
### Custom Diagrams with ECharts
67906839

67916840
--{{0}}--
@@ -11682,6 +11731,39 @@ is switched of furthermore there is **no gray background** displayed.
1168211731
{{5}}
1168311732
This is a script: <script modify="false">12</script>
1168411733

11734+
--{{6}}--
11735+
Additionally you can use the `modify` parameter reveal only a certain part of your code.
11736+
By double-clicking the user can still modify this part, but the rest of the code is hidden.
11737+
This feat is especially usefull when executing another programming language from a string.
11738+
11739+
{{5}}
11740+
``` html
11741+
<script modify="// pattern\n" type="text/python">
11742+
console.log("some hidden functionality")
11743+
var a = 12
11744+
11745+
// pattern
11746+
console.log("not hidden functionality", a)
11747+
// pattern
11748+
11749+
console.warn("hidden again")
11750+
a
11751+
</script>
11752+
```
11753+
11754+
{{5}}
11755+
<script modify="// pattern\n" type="text/python">
11756+
console.log("some hidden functionality")
11757+
var a = 12
11758+
11759+
// pattern
11760+
console.log("not hidden functionality", a)
11761+
// pattern
11762+
11763+
console.warn("hidden again")
11764+
a
11765+
</script>
11766+
1168511767
{{6}}
1168611768
__`worker`__
1168711769

@@ -11690,6 +11772,15 @@ If your script involves heavy computation that might impact the overall performa
1169011772
This will ensure the script is executed in a worker thread.
1169111773
__Note that when using a worker thread, modifying the DOM is not possible.__
1169211774

11775+
{{7}}
11776+
__`type`__
11777+
11778+
--{{7}}--
11779+
This parameter is used to define the type of the script, which is used to determine the syntax highlighting and the execution environment.
11780+
The default value is `text/javascript`, but you can also use `text/python` or `text/ruby` to execute code in different languages.
11781+
Thereby `text/` is optional and can be omitted.
11782+
This parameter makes only sense in combination with partial `modify`.
11783+
1169311784
### Internationalization API
1169411785

1169511786
--{{0}}--
@@ -11797,7 +11888,7 @@ if (LIA.classroom.connected){
1179711888
LIA.classroom.publish("wave", "@0")
1179811889
}
1179911890
"@0"
11800-
</script>
11891+
</>
1180111892
@end
1180211893
-->
1180311894

0 commit comments

Comments
 (0)