Add multilanguage support (#12)

This commit is contained in:
benhid 2020-05-25 11:47:45 +02:00 committed by GitHub
parent 6cf91f8c4c
commit 32bef2db6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -37,6 +37,20 @@ yarn add latex.css
Add any optional classnames to elements with special styles (author subtitle, abstract, lemmas, theorems, etc.). A list of supported class-based elements can be found [here](https://latex.now.sh/#class-based-elements).
## Languages
The labels of theorems, definitions, lemmas and proofs can be changed to other [supported languages](lang) by including the following snippet in addition to the main CSS file.
```html
<link rel="stylesheet" href="https://latex.now.sh/lang/es.css" />
```
and changing the html `lang` attribute:
```html
<html lang="es">
```
## Contributing
Contributions, feedback and issues are welcome. Feel free to fork, comment, critique, or submit a pull request.

4
lang/es.css Normal file
View File

@ -0,0 +1,4 @@
:lang(es) .theorem::before { content: 'Teorema ' counter(theorem) '. ' !important; }
:lang(es) .lemma::before { content: 'Lema ' counter(theorem) '. ' !important; }
:lang(es) .proof::before { content: 'Demostración.' attr(title) !important; }
:lang(es) .definition::before { content: 'Definición ' counter(definition) '. ' !important; }