Code Monkey home page Code Monkey logo

Comments (4)

MattFlower avatar MattFlower commented on August 22, 2024

This would depend a bit on what you mean.

If you are talking about about code blocks having LaTeX support, that would be pretty easy to do and I’d be happy to give you some guidance on how to make the change in organized to support it.

If you are talking about LaTeX export, that’s going to have to wait a bit. I have plans to allow exporting to HTML and maybe PDF at some undetermined point in the future. Getting there is going to require some design work and refactoring on my part to avoid something that’s impossible to maintain. My work on Organized is adhoc, uneven, and mostly done on a train, so no guarantees when that will happen.

from organized.

nsaphra avatar nsaphra commented on August 22, 2024

from organized.

MattFlower avatar MattFlower commented on August 22, 2024

Sure, I'd be happy to accept a PR on this.

Organized relies on other plugins for highlighting support. For example in Java, it relies on https://github.com/atom/language-java to do the highlighting. To make highlighting work in organized, we need to instruct organized/atom to know that the code inside a code block is actually LaTeX code. This amounts to mapping the latex part of

```latex
```

To something that knows the grammar of LaTeX. To do that, modify organized.cson and copy one of the existing blocks that does this. For example, "java.code.block.organized". Choose a string to identify LaTeX code (latex sounds good to me) and search/replace.

The tricky part here is the part that says "source.java". That refers to the scope name for a plugin that understands the grammar of the language you are adding. You'll need to figure out what the scope name of your plugin is. If you happened to use this plugin, you'd find the scope name in one of these files. I'm going to guess you want the scope "text.tex.latex" from latex.cson, but you are the expert here - I haven't touched TeX since years started with the number 19.

You could conceivably add the ability to execute LaTeX code blocks as well. If you are interested in that, you'd need to change codeblock.coffee. The changes would be as follows:

  1. If LaTeX really cares what the extensions are on files (some compilers or interpreters do), modify the execute method to put an extension on there.
  2. Modify the executionEngine method to support LaTeX. More than likely, you'll be like every other language and you'll just be a one liner.

Good luck -- it would be fantastic to see a PR on this.

from organized.

clsmt avatar clsmt commented on August 22, 2024

Maybe use mathjax to do in-line rendering? Similar to what they've done with markdown preview plus. It's really neat.

from organized.

Related Issues (20)

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.