-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Made example contents working as expected and visible #575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rabinadk1
wants to merge
4
commits into
luizdepra:main
Choose a base branch
from
rabinadk1:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ author: Hugo Authors | |
title: Math Typesetting | ||
date: 2019-03-08 | ||
description: A brief guide to setup KaTeX | ||
math: true | ||
katex: true | ||
--- | ||
|
||
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. | ||
|
@@ -21,27 +21,13 @@ In this example we will be using [KaTeX](https://katex.org/) | |
{{ end }} | ||
``` | ||
|
||
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration | ||
- To enable KaTex on a per page basis include the parameter `math: true` in content files | ||
- To enable KaTex on a per page basis include the parameter `katex: true` in content files | ||
|
||
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) | ||
|
||
{{< math.inline >}} | ||
{{ if or .Page.Params.math .Site.Params.math }} | ||
<!-- KaTeX --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous"> | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script> | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> | ||
{{ end }} | ||
{{</ math.inline >}} | ||
|
||
### Examples | ||
|
||
{{< math.inline >}} | ||
<p> | ||
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) | ||
</p> | ||
{{</ math.inline >}} | ||
Inline math: $(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…)$ | ||
|
||
Block math: | ||
$$ | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ author: Hugo Authors | |
title: Configuração de Equações Matemáticas | ||
date: 2019-03-08 | ||
description: Um guia rápido sobre utilizar KaTeX | ||
math: true | ||
katex: true | ||
--- | ||
|
||
Em um projeto Hugo as Notações Matemáticas podem ser usadas com a ajuda de bibliotecas JavaScript de terceiros. | ||
|
@@ -21,27 +21,13 @@ Nesse exemplo usaremos o [KaTeX](https://katex.org/). | |
{{ end }} | ||
``` | ||
|
||
- Para ativar o KaTex globalmente defina o parâmetro `math` como `true` na confgiuração do projeto | ||
- Para ativar o KaTex em páginas específicas inclua o parâmetro `math: true` nos arquivos de conteúdo | ||
- Para ativar o KaTex em páginas específicas inclua o parâmetro `katex: true` nos arquivos de conteúdo | ||
|
||
**Nota:** Use a referência online [Supported TeX Functions](https://katex.org/docs/supported.html) como base para criar notações matemáticas. | ||
|
||
{{< math.inline >}} | ||
{{ if or .Page.Params.math .Site.Params.math }} | ||
<!-- KaTeX --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous"> | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script> | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> | ||
{{ end }} | ||
{{</ math.inline >}} | ||
|
||
### Examples | ||
|
||
{{< math.inline >}} | ||
<p> | ||
Notação inline: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) | ||
</p> | ||
{{</ math.inline >}} | ||
Notação inline: $(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…)$ | ||
|
||
Notação em bloco: | ||
$$ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks fine. I'm only against this addition. This is not a mandatory configuration for this theme.
Please, could you remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing it will not render the blog posts provided correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I met the same problem thought it is not a big deal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to come back here.