% luamesh: compute and draw meshes with lua, luamplib and tikz
%
% Originally written by Maxime Chupin <mc@melusine.eu.org>,
% 2010.
%
% Distributed under the terms of the GNU free documentation licence:
%   http://www.gnu.org/licenses/fdl.html
% without any invariant section or cover text.

\documentclass{lltxdoc}
\usepackage{tcolorbox}
\title{\Verb+luamesh+: compute and draw meshes with \lualatex}
\author{Maxime Chupin \email{mc@melusine.eu.org}}
\date{\today}



\tcbuselibrary{listings,breakable}

\definecolor{vert}{rgb}{0.1,0.4,0.1}
\definecolor{bleu}{rgb}{0.1,0.1,0.4}
\lstset{
  numberstyle=\footnotesize\color{vert},
  keywordstyle=\ttfamily\bfseries\color{blue},
  basicstyle=\ttfamily\footnotesize,
  commentstyle=\itshape\color{vert},
  stringstyle=\ttfamily,
  showstringspaces=false,
  language=[LaTeX]TeX,
  breaklines=true,
  breakindent=30pt,
  defaultdialect=[LaTeX]TeX,
  % frame=tb
}

\lstdefinelanguage{lua}
{morekeywords={for,end,function,do,if,else,elseif,then,
    tex.print,tex.sprint,io.read,io.open,string.find,string.explode,require},
  morecomment=[l]{--},
  morecomment=[s]{--[[}{]]},
  morestring=[b]''
}

\newtcblisting{Exemple}{%
  arc=0pt,outer arc=0pt,
  colback=red!2!white,
  colframe=red!75!black,
  breakable,
  boxsep=0pt,left=5pt,right=5pt,top=5pt,bottom=5pt, bottomtitle =
  3pt, toptitle=3pt,
  boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, toprule at break =
  0pt, bottomrule at break = 0pt,
  listing options={breaklines},
}

\newtcblisting{commandshell}{colback=black,colupper=white,colframe=black,
  arc=0pt,
  listing only,boxsep=0pt,listing
  options={style=tcblatex,language=sh},
  every listing line={\textcolor{red}{\small\ttfamily\bfseries user \$> }}}

\newtcblisting{latexcode}{
  arc=0pt,
  listing only,boxsep=0pt,listing
  options={style=tcblatex}}


\newcommand\luamesh{\Verb+luamesh+\xspace}

\begin{document}

\maketitle

\begin{abstract}
  The package \Verb|luamesh| allows to compute and draw triangulation
  of Delaunay. The algorithm is written with lua, and depending of the
  choice of the ``engine'', the draw is done by MetaPost (with
  \Verb|luamplib|) or by \Verb|tikz|.

  The Delaunay triangulation algorithm is the Bowyer and Watson
  algorithm. Several macros are provided to draw the global mesh, the
  set of points, a particular step of the algorithm.
\end{abstract}

\section{Installation}

\subsection{With Linux}

To install \luamesh with \TeX live, you have to create the local
\Verb+texmf+ directory in your \Verb+home+.

\begin{commandshell}
mkdir ~/texmf
\end{commandshell}

Then we have to files to place in the correct directories. First, the
\Verb+luamesh.sty+ file must be in the directory:
\begin{center}
  \Verb+~/texmf/tex/latex/luamesh/+
\end{center}
and secondly, the \Verb+luamesh.lua+ must be in the directory:
\begin{center}
  \Verb+~/texmf/scripts/luamesh/+
\end{center}

Once you have done this, \luamesh can be included in your document
with
\begin{latexcode}
\usepackage{luamesh}
\end{latexcode}


\section{The Macros}



\subsection{Draw a Complete Mesh}

\subsection{Draw the Set of Points}

\subsection{Draw a Step of the Bowyer and Watson Algorithm}

\section{Gallery of Examples}

\end{document}



%%% Local Variables:
%%% flyspell-mode: 1
%%% ispell-local-dictionary: "american"
%%% End:
