Download the PHP package akram-zaitout/laravel-katex without Composer

On this page you can find all versions of the php package akram-zaitout/laravel-katex. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-katex

Laravel KaTeX

Latest Version on Packagist Total Downloads License

A comprehensive, production-ready Laravel package for rendering beautiful mathematical expressions using KaTeX. Native PHP implementation with dependency injection, following Laravel best practices.

✨ Features

πŸ“‹ Requirements

πŸ“¦ Installation

Install the package via Composer:

Publish Configuration (Optional)

This creates config/katex.php where you can customize all aspects of the package.

Publish Views (Optional)

πŸš€ Quick Start

Basic Setup

In your Blade layout file (e.g., resources/views/layouts/app.blade.php):

Using Blade Directives

πŸ“– Usage

1. Blade Directives

@katexStyles

Renders the KaTeX CSS stylesheet:

@katexScripts

Renders KaTeX JavaScript with optional configuration:

@katex

Renders inline mathematical expressions:

@katexBlock

Renders display mode (block) mathematical expressions:

2. Facade

Use the Katex facade for programmatic access:

3. Helper Functions

4. Blade Component

5. Service Injection

βš™οΈ Configuration

Environment Variables

Set these in your .env file:

Configuration File

Publish and edit config/katex.php:

🌍 Local Asset Management (Offline Support)

This package supports downloading KaTeX assets to your local application, allowing you to run without external CDN dependencies. This is perfect for offline environments, intranets, or strict privacy compliance/GDPR.

1. Download Assets

Run the artisan command to download CSS, JS, and font files to public/vendor/katex:

You can also specify a specific version:

2. Enable Local Assets

Update your .env file to tell the package to use the local files:

Or configure it in config/katex.php:

πŸŽ“ Examples

πŸ”’ Security

XSS Protection

All user input is automatically escaped using Laravel's e() helper:

Subresource Integrity

SRI hashes ensure CDN files haven't been tampered with:

Trust Settings

By default, \url and \href commands are disabled. Enable only if needed:

πŸ“ License

This package is open-sourced software licensed under the MIT license.


Made with ❀️ by Akram Zaitout


All versions of laravel-katex with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/contracts Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package akram-zaitout/laravel-katex contains the following files

Loading the files please wait ...