Giter Club home page Giter Club logo

lateq-public's Introduction

LaTeQ

LaTeX equations generator for Jupyter Notebooks


Important Notes

For examples of use view the Tests.ipynb file For ease of use, run the CMD_gen.py file, that will open a GUI window helping in the generation of the command, outputting it to the clipboard


How to Use

  1. Download the repo.
  2. Open a new Jupyter Notebook file and import the repo.

    an example of how to import the repo exists in the Tests.ipynb file, however you will need to either have the current file in the same dir, or import the repo from the different dir of which the file currently is in.

  3. Run the CMD_gen.py file in a different window.
  4. Enter the relevant inputs:
    • var: the output of the equation {string}.
    • eq: the actual equation {string}.

      if there are variables in the equation, you should put them as a string inside the eq string. meaning: eq=f'A+B'. for more info open the Tests.ipynb file.

    • copy: should the equation be copied to the clipboard {True/False}.
    • auto_units: should the script automatically add scientific units to the final answer {True/False}.

      for example, if the var is $V_0$, it will add $[V]$. auto units work only if the number is to the power bigger than $-12$ and smaller than $12$.

    • units: manual units {string}.

      only works if auto_units is false.

    • eng: should the script automatically add engineering notation to the final answer {True/False}.

      for example, if the final answer is $1000 [V]$, it will add $1 [kV]$.

    • phasor: should the script automatically format all of the numbers as phasors {True/False}.

      phasor, units and eng do not work together.

    • two_line: should the script make each step it's own line {True/False}.

      for calculations with only numbers and no variables, this must be False. for example for the following equation: $1 + 2 + 3$, this will not work if it is True.

    • declare: declare a new variable {True/False}.

      only mark True if the variable has not been set yet in the script.

    • fin_ans: should the script automatically add a box marking the answer {True/False}.

      mainly for marking an import / the final calculation of a question.

    • temp: temporary caculation {0/1/2}.

      for use examples check the Tests.ipynb file.

    • out: should the output be markdown or latex {Markdown/String}.

      String is latex output.

  5. Press OK

    the entire command will be entered in your clipboard.

  6. Go to the Jupyter Notebook and paste the command in a python cell.
  7. Run the cell.

    of course after running the cell importing the repo.

Unusual Use Cases

Numpy

For the numpy package, just import it as np, and use the np. in the string of eq.

Symbols

Work partially.

Matrices

Work for simple cases (add/sub/multiply).

Negative Power

Does not work well, however dividing by the number instead works as expected.

meaning instead of multiplying by $10^-6$ just divide by $10^6$

lateq-public's People

Contributors

guyhorn5 avatar

Watchers

 avatar

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.