Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Eduardo Ochs <eduardoochs <at> gmail.com>
Subject: [ANN] Dednat5 - a LaTeX preprocessor to generate diagrams
Newsgroups: gmane.comp.lang.lua.general
Date: Monday 25th April 2011 08:00:13 UTC (over 6 years ago)
Hello list,

I'd like to announce the new version of dednat4 - called, not very
surprisingly, "dednat5". Dednat4 and dednat5 are preprocessors for
LaTeX that let us define diagrams and derivations trees inside comment
blocks in a .tex file using a two-dimensional syntax. Here's an
example. If the file "foo.tex" contains this,

  --snip--snip--
  \documentclass{article}
  \input foo.dnt
  \begin{document}

  A diagram:
  %
  %D diagram currying
  %D 2Dx     100     +20
  %D 2D 100 a,b <=== a
  %D 2D      -       -
  %D 2D      |  <->  |
  %D 2D      v       v
  %D 2D +20  c ==> b|->c
  %D 2D
  %D (( a,b a c b|->c
  %D    @ 0 @ 1 <=
  %D    @ 0 @ 2 |-> @ 1 @ 3 |->
  %D    @ 2 @ 3 =>
  %D ))
  %D enddiagram
  %D
  $$\diag{currying}$$

  A tree:
  %:
  %:    1  2  3
  %:    =======+
  %:     1+2+3
  %:  --------app
  %:  f(1+2+3)
  %:
  %:  ^f(1+2+3)
  %:
  $$\ded{f(1+2+3)}$$

  \end{document}
  --snip--snip--

Then running "dednat5.lua foo.tex" produces a file "foo.dnt", that
gives the right meanings for "\diag{currying}" and "\ded{f(1+2+3)}" -
so, after it is created running "latex foo.tex" works as expected.

The system is easy to extend - lines starting with "%L" are
interpreted by the preprocessor as Lua code, and executed immediately
- and one of the examples included in the current version shows how to
define dynamically support for a new kind of diagram.

For those who are interested these two URLs are currently the best
starting points:

  http://angg.twu.net/dednat5/README.html
  http://angg.twu.net/dednat4.html

The documentation is still quite preliminary, but it will get better.
8-)

  Cheers,
    Eduardo Ochs
    [email protected]
    http://angg.twu.net/
 
CD: 4ms