Coder Social home page Coder Social logo

latex-sketch-plugin's Introduction

Latex Sketch Plugin

This plugin brings LaTeX functionalities to Sketch. It allows us to write mathematical formulas directly inside Sketch. The implementation is based on MathJax's API.

This plugin was developed during Sketch Plugin Hackathon, Berlin, 27 + 28 October 2017.

Installation

The pluging can be downloaded from the Release page.

For Sketch version below 61.1

The latest version that supports Sketch version below 61.1 is v0.5.2.

CLI Commands

# build with hot reload
npm run watch

# build for production
npm run build

# for publishing
skpm publish minor

Debugging

To view the output of your console.log, you have a few different options:

  • Open Console.app and look for the sketch logs
  • Use Safari's web inspector to debug your plugin's javascript context
  • Look at the ~/Library/Logs/com.bohemiancoding.sketch3/Plugin Output.log file

Skpm provides a convenient way to do the latter:

skpm log

The -f option causes skpm log to not stop when the end of logs is reached, but rather to wait for additional data to be appended to the input

Contributor

  • Andrew Nicolaou

Acknoledgements

  • Pieter Omvlee and Mathieu Dutour for supports during the hackathon.
  • Roy van Rooijen, Sergi Miral, IXDS Berlin and all people behind Design Tools Berlin for organizing this hackathon.

License

MIT

latex-sketch-plugin's People

Contributors

dependabot[bot] avatar p16i avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

latex-sketch-plugin's Issues

simplify processing

MathJax team member here. I just stumbled up on this thanks to a pointer from a developer.

You can simplify returnSVG by configuring MathJax's SVG output, cf. http://docs.mathjax.org/en/latest/options/output-processors/SVG.html

  • useGlobalCache: false will add the paths to the SVG for re-sue. If use elements are a problem more generally, set useFontCache:false .
  • blacker: 0 will set the stroke-width to 0 (or of course any other value you like) so you don't have rewrite that.

I would probably drop the Preview output processor (which only runs on the first expression anyway but adds jitter).

There is no .sketchplugin in the package

Hi
I check thoroughly in the package but can not find the .sketchplugin file as the note said: "double click to install". Is there another way to install it?

improve the readme or make the plugin more easily accessible

Many designers won't know how to use npm, and will wonder how to actually install the plugin. It took me a minute to figure it out, because I was in design mode, and looking for the simple, design friendly solution. I only figured it out when I tried to install it as a developper
Some designers may not even have node or npm installed, they don't always know what a CLI even is, and if they do, they might not know that they have to cd into the right folder if they're a CLI novice.

Ideally, the plugin would be included in a runnable form in this repo, or at least there should be clear instructions for how to actually install the plugin, rather than just say "run this in the CLI"

insert button obscured

The latex starts obscuring the insert button once it goes past a certain length. Is there a way around this?
screen shot 2018-03-30 at 5 00 10 pm

I can't find the .Sketchplugin file in any of the versions

Thanks for this amazing plugin. I can't seem to be able to install it though.

When I download it I can't find any .sketchplugin files. There's only one file called demo.sketch and doesn't install the plugin. I tried copying some files to the Sketch plugin folder and nothing happens either. I would appreciate your help and please excuse my ignorance if the solution is simple.

Thank you very much!
Gabriel

Broken in Sketch 86?

Hi. This plugin seems to be broken in Sketch version 86. When I try to activate it with no artboard selected, it rightly says "Please select an artboard 🎨" When I then select an artboard and activate the plugin, nothing happens. No error message, nothing. Inspecting the log file in ~/Library/Logs/com.bohemiancoding.sketch3, it shows the following error:

Error: An Obj-C exception occurred.
at [native code] (/)
at f (/Users/august/Library/Application Support/com.bohemiancoding.sketch3/Plugins/latex-sketch-plugin.sketchplugin/Contents/Sketch/__insert.js:1:1894)
at /Users/august/Library/Application Support/com.bohemiancoding.sketch3/Plugins/latex-sketch-plugin.sketchplugin/Contents/Sketch/__insert.js:1:12247
at __skpm_run (/Users/august/Library/Application Support/com.bohemiancoding.sketch3/Plugins/latex-sketch-plugin.sketchplugin/Contents/Sketch/__insert.js:1:35027)
at __skpm_run[native code] (/)
nativeException: No structure encoding found for CGRect

I hope you can help. This plugin is super useful to me! ✨

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.