From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/37050 Path: news.gmane.org!not-for-mail From: Vyatcheslav Yatskovsky Newsgroups: gmane.comp.tex.context Subject: Success Story - II Date: Thu, 25 Oct 2007 22:30:17 +0300 Message-ID: <136784908.20071025223017@gmail.com> References: Reply-To: Yatskovsky , mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1193340649 14833 80.91.229.12 (25 Oct 2007 19:30:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Oct 2007 19:30:49 +0000 (UTC) To: "ntg-context-request@ntg.nl" Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 25 21:30:50 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1Il8Po-00053u-1Y for gctc-ntg-context-518@m.gmane.org; Thu, 25 Oct 2007 21:30:48 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 71BE41FC77; Thu, 25 Oct 2007 21:30:39 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02552-09-14; Thu, 25 Oct 2007 21:30:30 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 535C01FC6A; Thu, 25 Oct 2007 21:30:30 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 905E01FC6A for ; Thu, 25 Oct 2007 21:30:26 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02549-02-14 for ; Thu, 25 Oct 2007 21:30:18 +0200 (CEST) Original-Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by ronja.ntg.nl (Postfix) with ESMTP id D49F01FC3E for ; Thu, 25 Oct 2007 21:30:17 +0200 (CEST) Original-Received: by ug-out-1314.google.com with SMTP id h2so576778ugf for ; Thu, 25 Oct 2007 12:30:17 -0700 (PDT) Original-Received: by 10.66.225.17 with SMTP id x17mr3577945ugg.1193340617317; Thu, 25 Oct 2007 12:30:17 -0700 (PDT) Original-Received: from blackless.pitfall.volia.net ( [77.121.156.6]) by mx.google.com with ESMTPS id y34sm3075765iky.2007.10.25.12.30.15 (version=SSLv3 cipher=OTHER); Thu, 25 Oct 2007 12:30:16 -0700 (PDT) X-Mailer: The Bat! (v3.99.25) Professional X-Priority: 3 (Normal) In-Reply-To: X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:37050 Archived-At: Hello Happy to report that Luatex made my life easier once again. :) I've made another test papers for my students, with varying problems, and it was possible only due to Lua emedded code. Examples: Perform logical AND, OR and XOR under the following pair of hexadecimal numbers: \startluacode n = math.random(10,255) m = math.random(10,255) tex.print(string.format("%X, %X", n, m)) \stopluacode Encode your Name and Surname as a \startluacode a = {'null-terminated', 'dollar-terminated', 'Pascal'} tex.print( string.format('%s string.', a[math.random(1,3)]) ); \stopluacode Lucky, the discussion about Lua reference started in the list today, because I need more knowledge of Lua to make even more flexible assignments. Best regards, Vyatcheslav ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________