ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: User-Defined Commands With Key-Value Options
Date: Mon, 20 Jul 2015 00:50:03 +0200	[thread overview]
Message-ID: <55AC299B.9040508@wxs.nl> (raw)
In-Reply-To: <CACdMS+FZ++rJ7psJ7XMi6ONKpnjp_F8QxF9SM_jLHs511TTPuQ@mail.gmail.com>

On 7/19/2015 1:24 PM, Joas Yannick wrote:
> Dear everyone,
>
> I am currently typesetting the old (published in 1707) French Bible of
> David Martin using
> ConTeXt MkIV. The source code looks like this:
>
> \startproduct martin1707
>      \startproject bibles % Page layout, fonts, language, etc.
>      \startbiblebook[number={1}, name={Genéſe}, abbreviation={Gen.},
> title={Le premier livre de Moyſe dit la Genéſe}]
>          \startbiblechapter[number={1}]
>              \startbibleverse[number={1}]
>                  Au commencement Dieu créa les cieux & la terre.
>              \stopbibleverse
>          \stopbiblechapter
>      \stopbiblebook
>      \startbiblebook[number={45}, name={Romains}, abbreviation={Rom.},
> title={Epiſtre de ſaint Paul apoſtre aux romains}]
>          \startbiblechapter[number={12}]
>              \startbibleverse[number={1}]
>                  Je vous exhorte donc, \bibleaddition{mes} fréres, par les
>                  compaſſions de Dieu, que vous préſentiez vos corps en
> ſacrifice
>                  vivant, ſaint, agréable à Dieu, \bibleaddition{qui eſt}
> vôtre
>                  raiſonnable ſervice.
>              \stopbibleverse
>              \startbibleverse[number={2}]
>                  Et ne vous conformez point à ce préſent ſiecle, mais ſoyez
>                  transformez par le renouvellement de vôtre entendement,
> afin que
>                  vous éprouviez quelle eſt la volonté de Dieu, bonne, &
> agréable,
>                  & parfaite.
>              \stopbibleverse
>          \stopbiblechapter
>      \stopbiblebook
> \stopproduct
>
> As you may know, all the Bibles are divided into books, and each book
> into chapters, and
> each chapter into verses. The purpose of \startbiblebook,
> \startbiblechapter, and \startbibleverse
> is to control the formatting thereof respectively (as \startsection,
> \startsubsection, etc., control
> the formatting of sections, subsections, etc.)
>
> Now, as you see. these commands are user-defined commands with key-value
> options. My
> goal is to define the way they do the formatting with Lua. But I do not
> know how to do. I
> know a bit about programming, so learning Lua is not a problem.

So how would you like to use lua? Is the data stored in lua?

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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:[~2015-07-19 22:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-19 11:24 Joas Yannick
2015-07-19 22:50 ` Hans Hagen [this message]
2015-07-20  9:28 Joas Yannick
2015-07-22  9:20 Joas Yannick
2015-07-23 20:32 ` Rik
2015-07-25  7:47 Joas Yannick

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=55AC299B.9040508@wxs.nl \
    --to=pragma@wxs.nl \
    --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).