forked from alex-shpak/hugo-book
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
16 changed files
with
1,136 additions
and
643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
--- | ||
title: KaTeX | ||
--- | ||
# KaTeX | ||
|
||
KaTeX shortcode let you render math typesetting in markdown document. See [KaTeX](https://katex.org/) | ||
|
||
## Example | ||
{{< columns >}} | ||
|
||
<div class="book-columns flex flex-wrap"> | ||
<div class="flex-even markdown-inner"> | ||
|
||
```latex | ||
{{</*/* katex [display] [class="text-center"] */*/>}} | ||
{{</* katex display=true class="optional" >}} | ||
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi | ||
{{</*/* /katex */*/>}} | ||
{{< /katex */>}} | ||
``` | ||
|
||
<---> | ||
</div> | ||
<div class="flex-even markdown-inner"> | ||
|
||
{{< katex display >}} | ||
{{< katex display=true class="optional" >}} | ||
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi | ||
{{< /katex >}} | ||
|
||
{{< /columns >}} | ||
</div> | ||
</div> | ||
|
||
## Display Mode Example | ||
|
||
Here is some inline example: {{< katex >}}\pi(x){{< /katex >}}, rendered in the same line. And below is `display` example, having `display: block` | ||
{{< katex display >}} | ||
{{< katex display=true >}} | ||
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi | ||
{{< /katex >}} | ||
Text continues here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{- .Inner -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{{- if not (.Page.Scratch.Get "katex") -}} | ||
<!-- Include katext only first time --> | ||
<!-- Include katex only first time --> | ||
<link rel="stylesheet" href="{{ "katex/katex.min.css" | relURL }}" /> | ||
<script defer src="{{ "katex/katex.min.js" | relURL }}"></script> | ||
<script defer src="{{ "katex/auto-render.min.js" | relURL }}" onload="renderMathInElement(document.body);"></script> | ||
{{- .Page.Scratch.Set "katex" true -}} | ||
{{- end -}} | ||
|
||
<span {{- with .Get "class" }} class="{{ . }}"{{ end }}> | ||
{{ cond (in .Params "display") "\\[" "\\(" -}} | ||
{{ with .Get "display" }}\[{{else}}\({{end}} | ||
{{- trim .Inner "\n" -}} | ||
{{- cond (in .Params "display") "\\]" "\\)" }} | ||
{{ with .Get "display" }}\]{{else}}\){{end}} | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.