No description
Find a file
2025-05-15 08:36:53 +02:00
fonts feat: add Libertinus as alternative typeface (#35) 2020-12-15 08:20:52 +01:00
lang fix: add missing polish translations (#84) 2025-02-16 21:38:19 +01:00
prism fix: rework text document justification (#79) 2025-02-18 12:16:42 +01:00
.gitignore Use Vite as build tool (#52) 2023-03-06 08:13:25 +01:00
CHANGELOG.md chore: remove empty bullet point in changelog 2025-05-15 08:36:53 +02:00
elements.html fix(elements.html): follow section heading good practices (#76) 2024-12-25 12:07:08 +01:00
index.html fix: rework text document justification (#79) 2025-02-18 12:16:42 +01:00
languages.html chore: move all .now.sh references to .vercel.app 2024-06-27 11:19:34 +02:00
LICENSE Add LICENSE 2020-05-21 10:22:00 +02:00
package-lock.json 1.13.0 2025-05-15 08:34:08 +02:00
package.json 1.13.0 2025-05-15 08:34:08 +02:00
README.md chore: move all .now.sh references to .vercel.app 2024-06-27 11:19:34 +02:00
style.css fix: rework text document justification (#79) 2025-02-18 12:16:42 +01:00
vercel.json Fix license link, add vercel config for clean URLs 2020-05-23 13:34:35 +02:00
vite.config.js Use Vite as build tool (#52) 2023-03-06 08:13:25 +01:00

LaTeX.CSS

License: MIT latex.css on NPM

LaTeX.css is a minimal, almost class-less CSS library which makes any website look like a LaTeX document. It is based on @davidrzs' latexCSS.

Getting Started

Add the following code in the head of your project.

<link rel="stylesheet" href="https://latex.vercel.app/style.min.css" />

or use a CDN like Unpkg:

<link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" />

Using NPM/Yarn

NPM:

npm install latex.css

Yarn:

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.

Languages

The labels of theorems, definitions, lemmas and proofs can be changed to other supported languages by including the following snippet in addition to the main CSS file.

<link rel="stylesheet" href="https://latex.vercel.app/lang/es.css" />

and changing the html lang attribute:

<html lang="es">

Have a look at the language support page for more info and a demo of the different languages.

Contributing

Contributions, feedback and issues are welcome. Feel free to fork, comment, critique, or submit a pull request.

Acknowledgements

This project is based on David Zollikofer's project latexCSS.

Most of the CSS reset is based on Andy Bell's Modern CSS Reset.

The sample HTML5 markup test page is based on html5-test-page by @cbracco.

The idea of sidenotes was taken and adpated from Tufte CSS.

License

This project is open source and available under the MIT License.