From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45935 Path: news.gmane.org!not-for-mail From: "luigi scarso" Newsgroups: gmane.comp.tex.context Subject: Re: printing tab in lua: print('a\tb') fails Date: Thu, 27 Nov 2008 12:48:41 +0100 Message-ID: References: <6faad9f00811261107k2c6d4d1bof2cecc9fb0e6f67b@mail.gmail.com> <77677541-9A74-4E38-95DE-835B5ABFDD79@gmail.com> <6faad9f00811270029l5f059665tbe66d7b6a73ec33e@mail.gmail.com> <115224fb0811270102g102c4bbfpd80b0d7e54f7165c@mail.gmail.com> <115224fb0811270217l22b82206o2f2ff9ce61aa96bc@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0464940660==" X-Trace: ger.gmane.org 1227786630 17064 80.91.229.12 (27 Nov 2008 11:50:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Nov 2008 11:50:30 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 27 12:51:34 2008 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 1L5fP9-0006UI-QN for gctc-ntg-context-518@m.gmane.org; Thu, 27 Nov 2008 12:51:31 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 15FF51FBAA; Thu, 27 Nov 2008 12:50:20 +0100 (CET) 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 14226-02; Thu, 27 Nov 2008 12:49:26 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5F65D1FB77; Thu, 27 Nov 2008 12:49:26 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 33AB01FB77 for ; Thu, 27 Nov 2008 12:49:20 +0100 (CET) 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 15334-01-3 for ; Thu, 27 Nov 2008 12:48:42 +0100 (CET) Original-Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.189]) by ronja.ntg.nl (Postfix) with ESMTP id 8D95F1FB5B for ; Thu, 27 Nov 2008 12:48:41 +0100 (CET) Original-Received: by fk-out-0910.google.com with SMTP id 18so881906fks.2 for ; Thu, 27 Nov 2008 03:48:41 -0800 (PST) Original-Received: by 10.181.209.5 with SMTP id l5mr1613862bkq.86.1227786521116; Thu, 27 Nov 2008 03:48:41 -0800 (PST) Original-Received: by 10.180.231.2 with HTTP; Thu, 27 Nov 2008 03:48:41 -0800 (PST) In-Reply-To: <115224fb0811270217l22b82206o2f2ff9ce61aa96bc@mail.gmail.com> 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:45935 Archived-At: --===============0464940660== Content-Type: multipart/alternative; boundary="----=_Part_38043_26638784.1227786521125" ------=_Part_38043_26638784.1227786521125 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline > > > Correction: > > -- works as comments in luacode > % is used to format strings > It's a bit different: code below is ok, and TeX comment is seen "before" lua comment . Only Hello! is print on pdf %%%%%%%%%%%%%%%%%% \def\Foo{% \startluacode -- this is a lua comment %% this is a TeX comment \stopluacode } \starttext Hello ! \Foo \stoptext %%%%%%%%%%%%%%%%%%% This is wrong %%%%%%%%%%%%%%%%%% \starttext Hello ! \startluacode -- this is a lua comment %% this is a TeX comment \stopluacode \stoptext %%%%%%%%%%%%%%%%%%% ! LuaTeX error
:3: unexpected symbol near '%'. \@@expanded ... comment %% this is a TeX comment } l.6 \stopluacode ? -- luigi ------=_Part_38043_26638784.1227786521125 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline

Correction:

-- works as comments in luacode
% is used to format strings


It's a bit different: code below is ok, and TeX comment is seen "before" lua comment .
Only Hello! is print on pdf

%%%%%%%%%%%%%%%%%%
 \def\Foo{%
\startluacode
-- this is a lua comment
%%  this is a TeX comment
\stopluacode
}

\starttext
Hello !
\Foo
\stoptext
%%%%%%%%%%%%%%%%%%%




This is wrong

%%%%%%%%%%%%%%%%%%
\starttext
Hello !
\startluacode
-- this is a lua comment
%%  this is a TeX comment
\stopluacode
\stoptext
%%%%%%%%%%%%%%%%%%%



! LuaTeX error <main ctx instance>:3: unexpected symbol near '%'.
\@@expanded ... comment
%% this is a TeX comment
}
                                                 
l.6 \stopluacode
               
?




--
luigi

------=_Part_38043_26638784.1227786521125-- --===============0464940660== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0464940660==--