Code Monkey home page Code Monkey logo

cl-latex's Introduction

cl-latex (0.1alpha)

This library produces latex code from s-expr similiar to cl-who for html.

License: cc-by-sa 3.0
Author:  Alexander Weigl <[email protected]>
Date: 2011-07-08

Example

(with-latex-output (*standard-output*)
  (:documentclass "report")
  "\n"
  (:usepackage "xcolor")
  (:author "Lisp")
  (:date   today)
  (env :document ()
     (:textbf "My first document")
     (env :center ()
          "With \verb+esc+ you escape the latex characters: "
          (esc "& _ # { }"))))

How it works:

(with-latex-output (stream) &body latex-expression)

Every s-expr in latex-expression will be converted to a princ command. stream is a stream that should be used by princ. A summary of latex-expression and the translation:

 (:command "A" "B" "C")          
                           => \command{A}{B}{C}
 (env :center ( ("A") ("B") ) …) 
                           => \begin{center}[A]{B} … \end{center}
 (esc "A & B")            
                           => A \& B

Every other s-expr is put into the output untouched. A multiple print of literal strings will be optimize into one call to princ.

cl-latex's People

Contributors

wadoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tiancheng-luo

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.