Giter VIP home page Giter VIP logo

cats's Introduction

cats

Buildchain to generate commutative diagrams inside Pandoc markdown with LaTeX + Tikz.

In addition to the Haskell infastructure for Pandoc you will need:

  • One of the following TeX compilers: pdflatex, xetex, lualatex
  • inkscape
  • ghostscript

Installation

$ cd cats
$ cabal install

Usage

You want to compile this:

    The following diagram proves the existence and uniqueness of the
    canonical duality between coherent sheaves on spectral sites of stacks
    of quotient moduli spaces of pointed curves with fixed ultragenus and
    the category of categories fibered in megaloid over an abelian smooth
    autoisotropic of general type category:

    ```commute
    \node (P) {$P$};
    \node (B) [right of=P] {$B$};
    \node (A) [below of=P] {$A$};
    \node (C) [below of=B] {$C$};
    \node (P1) [node distance=1.4cm, left of=P, above of=P] {$\hat{P}$};
    \draw[->] (P) to node {$f$} (B);
    \draw[->] (P) to node [swap] {$g$} (A);
    \draw[->] (A) to node [swap] {$f$} (C);
    \draw[->] (B) to node {$g$} (C);
    \draw[->, bend right] (P1) to node [swap] {$\hat{g}$} (A);
    \draw[->, bend left] (P1) to node {$\hat{f}$} (B);
    \draw[->, dashed] (P1) to node {$k$} (P);
    ```

    As a consequence, the isotrivial families of superconnected unimodular
    curves are self-dual with respect to the motivic theory of ultrafilters.
    The entirety of mathematics and logic then trivially follows as a
    consequence. The proof is left to the reader.

Into this:

Illustration

You can either invoke from the commandline.

$ cat yourfile | cats

Or integrate with your existing Pandoc program:

import Data.Pandoc.Tikz

doTikz :: Block -> IO Block

In your CWD you will need two files. The preamble.tex and a postamble.tex as well as any libraries needed by these files.

For example, for a simple commutative diagram using preview package. The preamble is:

\documentclass{article}
\include{preview}
\usepackage[pdftex,active,tightpage]{preview}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{preview}
\begin{tikzpicture}[node distance=2cm, auto]

And the postamble:

\end{tikzpicture}
\end{preview}
\end{document}

Path Munging

Depending on your TeX distribution you may have to modify TEXINPUTS to include various Tikz or preview libraries.

$ export TEXINPUTS=./texinclude:$TEXINPUTS

Hakyll Integration

cats's People

Contributors

christian-marie avatar sdiehl 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

Watchers

 avatar  avatar  avatar  avatar

cats's Issues

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.