You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vincent Dörig 1898af9c31
fix: 'Dark Mode' toc entry in wrong order
5 months ago
.github feat: add funding.yml 2 years ago
fonts feat: add `Libertinus` as alternative typeface (#35) 2 years ago
lang Added Dutch language support (#46) 6 months ago
prism Support for dark mode (#48) 6 months ago
.gitignore Add gitignore 3 years ago 1.8.0 6 months ago
LICENSE Add LICENSE 3 years ago Add sidenotes (#28) 3 years ago
elements.html chore: replace sa script with plausible 3 years ago
index.html fix: 'Dark Mode' toc entry in wrong order 5 months ago
languages.html Added Dutch language support (#46) 6 months ago
package-lock.json 1.8.0 6 months ago
package.json 1.8.0 6 months ago
style.css Support for dark mode (#48) 6 months ago
style.min.css Support for dark mode (#48) 6 months ago
vercel.json Fix license link, add vercel config for clean URLs 3 years ago


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="" />

or use a CDN like Unpkg:

<link rel="stylesheet" href="" />

Using NPM/Yarn


npm install latex.css


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.


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="" />

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.


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


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.


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