From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/67327 Path: news.gmane.org!not-for-mail From: Ulrike Fischer Newsgroups: gmane.comp.tex.context Subject: Re: search path for require(...) Date: Thu, 24 Mar 2011 11:34:21 +0100 Message-ID: References: <55a1sy0sjbc.dlg@nililand.de> <20110324101400.GC3626@orcus> Reply-To: news3@nililand.de, mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-13" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1300962904 13004 80.91.229.12 (24 Mar 2011 10:35:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Mar 2011 10:35:04 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 24 11:35:00 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q2hsZ-0006fQ-Ts for gctc-ntg-context-518@m.gmane.org; Thu, 24 Mar 2011 11:35:00 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 88D39CAB42; Thu, 24 Mar 2011 11:34:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Sk7uK2jTWUtQ; Thu, 24 Mar 2011 11:34:42 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B7F59CAB21; Thu, 24 Mar 2011 11:34:42 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3AC3DCAB21 for ; Thu, 24 Mar 2011 11:34:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FPwNdXCeVPs0 for ; Thu, 24 Mar 2011 11:34:30 +0100 (CET) Original-Received: from filter4-nij.mf.surf.net (filter4-nij.mf.surf.net [195.169.124.155]) by balder.ntg.nl (Postfix) with ESMTP id 1C40FCAAFF for ; Thu, 24 Mar 2011 11:34:30 +0100 (CET) Original-Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by filter4-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p2OAYg4v024254 for ; Thu, 24 Mar 2011 11:34:43 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q2hsI-0006WG-9p for ntg-context@ntg.nl; Thu, 24 Mar 2011 11:34:42 +0100 Original-Received: from p5dd1c773.dip.t-dialin.net ([93.209.199.115]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Mar 2011 11:34:42 +0100 Original-Received: from news3 by p5dd1c773.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Mar 2011 11:34:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 55 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p5dd1c773.dip.t-dialin.net User-Agent: 40tude_Dialog/2.0.15.41de X-Bayes-Prob: 0.0776 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.91.229.12; country=NO; latitude=62.0000; longitude=10.0000; http://maps.google.com/maps?q=62.0000,10.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04EmWyHCS - 460b0bbf6aed - 20110324 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.155 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:67327 Archived-At: Am Thu, 24 Mar 2011 11:14:00 +0100 schrieb Philipp Gesang: >> I'm trying to store the virtual lua chess fonts I'm currently >> creating so that latex and context can use them. = >> = >> 1. At first I stored the vf-chess-XX.lua in tex/luatex. This works >> for latex but not for context. tex/generic works for both. = >> = >> 2. My fonts loads a lua-file which should be shared by all fonts >> with = >> = >> chessfss=3Drequire('chessfss') >> = >> latex finds the chessfss.lua without problems in various locations >> (e.g. tex/generic) but context not. How can I solve this problem? > = > Hi Ulrike, > = > see also: > http://www.ntg.nl/pipermail/ntg-context/2010/047721.html Ah. chessfss =3D require('chessfss.lua') works in context. And it seems to work with latex too (I had somewhere in the back of my mind the thought that the ".lua" extension breaks with latex but can't reproduce it currently). = > (You=FFre going to have to declare the table =B4chessfss=A1 globally > for this to work.) The chessfss.lua has a "return Table" at the end which declares the table chessfss. = To quote from http://lua-users.org/wiki/LuaModuleFunctionCritiqued: "The problems above can be avoided by not using the module function but instead defining modules in the following simple way: [*1][*2] = -- hello/world.lua local M =3D {} local function test(n) print(n) end function M.test1() test(123) end function M.test2() M.test1(); M.test1() end return M and importing modules this way: = local MT =3D require "hello.world" MT.test2()" -- = Ulrike Fischer = ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________