Socket
Socket
Sign inDemoInstall

@cartamd/plugin-tikz

Package Overview
Dependencies
117
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cartamd/plugin-tikz

This plugin adds support for **PGF/TikZ** illustrations thanks to [TikzJax](https://tikzjax.com/). It uses the code generated for the [Obsidian-TikZ plugin](https://github.com/artisticat1/obsidian-tikzjax). Install it using:


Version published
Weekly downloads
74
decreased by-49.66%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Carta TikZ Plugin

This plugin adds support for PGF/TikZ illustrations thanks to TikzJax. It uses the code generated for the Obsidian-TikZ plugin. Install it using:

npm i @cartamd/plugin-tikz

Important Notes

  1. This plugin requires the import of a heavy library (~7Mb), which is dynamically imported at runtime;
  2. Generated images are not ssr compatible, as they are rendered in the browser;
  3. You need to update your sanitizer to allow the specific tag: <div type="text/tikz">.

Setup

<script lang="ts">
	import { Carta, MarkdownEditor } from 'carta-md';
	import { tikz } from '@cartamd/plugin-tikz';

	import '@cartamd/plugin-tikz/fonts.css';

	const carta = new Carta({
		extensions: [tikz()]
	});
</script>

<MarkdownEditor {carta} />

Documentation

Checkout the docs for examples, options and more.

Keywords

FAQs

Last updated on 15 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc