Code Monkey home page Code Monkey logo

pylatex_ext's Introduction

pylatex_ext

🔌Extension of pylatex

Download

It has not been uploaded to pypi, download it from github.

What am I proud of?

class Slash:
    """Shorthand for Command.
    
    Make defining command more eazy.
    """

    escape = False

    def __getattr__(self, command):
        def f(*args, **kwargs):
            args = Arguments(*args)
            args.escape = self.escape
            return Command(command, arguments=args, **kwargs)
        return f

__ = Slash()  # __.frac('x', 'y').dumps() == '\frac{x}{y}'

def diff(y, x='x'):
    r"""Generate Latex code r'\frac{d y}{d x}'.

    Arguments:
        y {str} -- dependent variable

    Keyword Arguments:
        x {str} -- independent variable (default: {'x'})

    Returns:
        Command
    """
    return __.frac(
        (__.mathrm('d').dumps()) + y, (__.mathrm('d').dumps()) + x)

Application

I make a system to produce exam paper (with or without answer) with pylatex_ext

pylatex_ext's People

Contributors

freakwill avatar

Watchers

 avatar  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.