Coder Social home page Coder Social logo

avitase / feynmaker Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 24 KB

Docker container that helps to create Feynman diagrams as PDF files with the Feynmf LaTeX package.

Dockerfile 2.04% Makefile 0.98% TeX 94.63% Shell 2.35%
docker-container feynman-diagrams feynmf

feynmaker's Introduction

Feynmaker

Docker Build Status

The container exposes a way to create Feynman diagrams as PDF files using the famous Feynmf package. The idea is to mount your current directory to /input (read-only) and the desired output directory for the PDF file to /output. Say you want to generate a Feynman diagram from example.tex:

> cat example.tex
\begin{fmfgraph*}(35,25)
    \fmfbottom{i1,d1,o1}
    \fmftop{i2,d2,o2}
    \fmf{fermion}{i1,v1}
    \fmf{fermion,label=$\uquark,,\cquark,,\tquark$,label.side=left}{v1,v2}
    \fmf{fermion}{v2,o1}

    \fmf{fermion}{v3,i2}
    \fmf{fermion,label=$\uquarkbar,,\cquarkbar,,\tquarkbar$,label.side=left}{v4,v3}
    \fmf{fermion}{o2,v4}

    \fmfv{l=$\bquarkbar$,l.a=180}{i2}
    \fmfv{l=$\dquark$,l.a=180}{i1}
    \fmfv{l=$\bquark$,l.a=0}{o1}
    \fmfv{l=$\dquarkbar$,l.a=0}{o2}

    \fmffreeze

    \fmf{photon,label=$W$}{v3,v1}
    \fmf{photon,label=$W$}{v2,v4}

    \fmfdotn{v}{4}
\end{fmfgraph*}

by calling ./feynmaker.sh example.tex. This will wrap the content of example.tex with the template defined in template.tex and run the necessary latex, mpost and pdflatex commands for you and eventually exports the resulting PDF file to your current working directory (this is the default for the mount point of /output, defined in feynmaker.sh.)

> rm -f exmaple.pdf
> ./feynmaker.sh example.tex > /dev/null && ls -1t | head -n1
example.pdf

You can specify a dedicated build directory by passing --output-dir=my-fancy-build-directory to ./feynmaker.sh. This directory will be mounted to /output/ and inhabit your desired PDF file.

Docker Pull Command

The container is accessible via the Docker Hub: docker pull avitase/feynmaker. You can create your own Dockerfile and install additional dependencies of your project via apt-get or define your own template file.

feynmaker's People

Contributors

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