ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: ConTeXt meeting Lua tutorials
Date: Mon, 23 Aug 2010 20:22:19 +0200	[thread overview]
Message-ID: <4C72BC5B.80107@elvenkind.com> (raw)
In-Reply-To: <AANLkTinUBnRzPYdE7=8YuqN8xXm-sBbNqyR72+Oxe3=6@mail.gmail.com>

On 08/23/2010 06:37 PM, Mojca Miklavec wrote:
> [the following is just some brainstorming]
>
>
> For fonts, agreed with Luigi, it would be nice to see some lua code that
> a) takes a bunch of fonts as input (like:
> regular/italic/bold/bolditalic/script) and writes some simple sentence
> with all variants; switching options on and off (after thinking a bit,
> this can just as well be done in almost-plain-TeX in LuaTeX, so maybe
> it's not such a good idea)

This teaches nothing that really needs the lua font interface, so I
do not think that is such a good idea either.

> b) takes a font as input and makes a really nice graphical representation:
> - font name (under different OS systems?), file name, ...
> - available features
> - glyph repertoire (index/Unicode point/name/big drawing)
> - alternatives of the same glyph (under small caps or when alternative
> styles play some role), ... [i know it's incomplete]
> - ...
> - takes some input string and writes out that sentence under different
> permutations of available features (with some user's help)

This sounds interesting (and, also important, doable up to a reasonable
point within the available time).

> c) shows some OpenType math tricks (visually?) or even does the same
> as showttf/poin b, but for math (challenge :) :) :)

OpenType Math really uses next to no lua code, it is almost all coded
in the executable proper, so it would be hard to do something
illustrative that is not overly complex on purpose at the same time.
As a beginner's tutorial, that is probably a step too far.

Myself, I was thinking of how to create a virtual font on the fly.
but b) definitely sounds interesting.

> One of possible ideas for an advanced example (just brainstorming; you
> need to judge whether it makes sense or not; it might be too long&
> complicated, but it would be instructive to see both parsing and
> drawing at the same time):
> - parse some very simple text input
> - draw the image with mplib
> For example, one could try to parse:
>      http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html
> (but with some strict restrictions, like: no cycles allowed, no
> reactions, ... only element names, =, # and parenthesis with at most
> one branch; no nested ones)
> and then try to draw a full circle for every element and connect the
> circles with single/double/triple lines (no attempt for optimal
> placement and nothing complicated).

Should be ok, if I cheat a bit on the creation of metapost macros.
I had a somewhat similar idea myself, for parsing turtle graphics,
but that needed quite a bit of lpeg for which we may not have enough
time, so I had almost given up on parsing stuff. this chemistry stuff
is doable within the time constraints, I think.

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2010-08-23 18:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-21 11:48 Taco Hoekwater
2010-08-21 12:43 ` luigi scarso
2010-08-22 14:37 ` Henning Hraban Ramm
2010-08-23 13:47   ` Hans Hagen
2010-08-23 14:37     ` Henning Hraban Ramm
2010-08-23 16:37 ` Mojca Miklavec
2010-08-23 18:22   ` Taco Hoekwater [this message]
2010-08-23 21:39     ` luigi scarso
2010-08-24  3:31     ` David Rogers
2010-08-23 22:36 ` Aditya Mahajan
2010-08-24 18:37 ` Oliver Buerschaper
2010-08-25  8:05   ` Steffen Wolfrum
2010-08-25  9:17     ` Hans Hagen
2010-08-25 10:46       ` John Haltiwanger
2010-08-25 10:46       ` Khaled Hosny
2010-09-01 19:34         ` Steffen Wolfrum
     [not found]       ` <98D0BF51-278A-4DE1-8834-283DD2E035B5@post.werksatz.com>
     [not found]         ` <4C74E444.5040501@wxs.nl>
     [not found]           ` <530D2CCA-5CE5-45BB-A407-640108712EFC@post.werksatz.com>
2010-08-25 11:11             ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C72BC5B.80107@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).