Giter VIP home page Giter VIP logo

latex2blender's Introduction

latex2blender

Blender add-on to render LaTeX and import it into Blender. See the wiki for more details, including how to install and use.

This Blender add-on is designed to import LaTeX graphics into Blender as mesh objects. In the 3D Viewport with object mode selected, latex2blender appears as a panel in the sidebar. Type "n" to open the sidebar.

Requirements

This add-on works as a normal Blender add-on, but it requires the following be installed on your computer.

  1. latex -- The add-on uses the local LaTeX installation to compile entered LaTeX code.
  2. dvisvgm -- The add-on uses this tool to convert LaTeX outputted .dvi into an .svg file

License

This code is licensed under GPLv3 in order to be compatible with Blender's licensing.

latex2blender's People

Contributors

ghseeli avatar peterkj1 avatar someguynamedjosh 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

latex2blender's Issues

drawing new stroke within Compiled Gpencil is too big "600 scaled"

issue 1)also if we complie new Gpencil then we go to draw mode and we add to existed material(fill) a check in stroke type => fill+ stroke , the stroke became too big and the viewport tooooo slow .
https://user-images.githubusercontent.com/55538193/178109034-f76cfa4b-8e3b-4dc7-bd01-abfc9d64e9e5.mp4

issue 2) if we compile new Gpencil then go to draw mode and trying to add new stroke the stroke drawed is to big .
THE PROBLEME is Gpencil is by default scaled by 600X which is not normal .

Tikz fails to render?

I was expecting this great plugin to also work for tikz pictures, but seems like it renders garbage like [circle,draw,alias=A] at (0,0) {A}; \node[circle,draw,alias=B] at (1.5cm,0cm) {B}; \draw[-latex] (A) -- (B);} instead of the proper diagram:

Custom preambule:

\usepackage{tikz}
\usetikzlibrary{positioning}

Text to render:

\tikz{ \node[circle,draw,alias=A] at (0,0) {A};  \node[circle,draw,alias=B] at (1.5cm,0cm) {B};  \draw[-latex] (A) -- (B);}

Update object without creating a new one

First, thanks a lot for this great addon. I would like to animate latex expressions (notably visibility, scale, position), unfortunately, once the animation is done, I can't easily update it: creating "Compile Latex Code" always create a new object.

For now, one solution is to create (and animate) a new Geometry Node that uses Object info to refer to the old object, but it would be cool to have a more direct solution in Latex2blender directly, replacing the current object and keeping the animations on it.

Also, it could be cool to pre-fill the text with the formula used for the current node (made possible for instance by storing it in a custom property). For now, as far as I see, one must retype everything.

EDIT
A workaround for the first issue is to create a new object (so you still have to retype the whole expression from scratch), and then copy/paste the mesh data into the original animated object:

image

But it does not solve the second issue: I still need to type again the whole expression.

Strange sqrt?

I'm not sure why, but when I generate something like $\sqrt{2}$, the top horizontal bar is strange (seems like the bottom-left point of the horizontal line is missing):

image

or maybe the point is present, but not linked correctly:

image

compare with a normal sqrt:

image

Tested with 6b4c3c8

Complilation Error, Allow Option for Custom Path to dvisvgm?

Platform: Windows 10
Blender: version 3.1.2

error

Hello, I installed MiKTeX and also TeXLive but despite that the addon will not run the sample example. Would it be possible to have an option in the addon preferences to link to the location where dvisvgm is? I'm not sure what path it is expecting but I tried both TeX installations with default settings and the addon still gives the same error.

Latex2blender : $\mapsto$

I recently came across your Blender AddOn Latex2Blender and I've found it most useful.
I may have uncovered a bug but I'm not certain if it’s not me doing something wrong.

The Latex code $\mapsto$ does not seem to compile correctly.

Thank you.

Possibility of using the plugin as pure python i.e. no UI

I have a dream of using this plugin with python. However I'm having some issues controlling the plugin with Python.
For example, I would love to be able to write

import bpy
# make text obj
equation = latex2blender("$\sqrt{2}$")

so far it was not possible for me to control the plugin with python (issue1 and issue2), I was wondering if it's possible to get the "pure" inner workings of the plugin, that is simply just a function that makes a 3d latex object , but without any of the UI tools?

Is it possible to make this plugin into a simple python function that should not be installed for example.

I hope it makes sense, I would love your input on this.

Add shadeless material

The image as plane plugin proposes to use a shadeless material, which basically does not reflect the light and respects then quite accurately the color of the image. The shader is not trivial (it's like 10 nodes, one can check by creating a new image on a plane with a shadeless material), and it would therefore be cool to propose in latex2blender a way to automatically add this material.

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.