From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78162 Path: news.gmane.org!not-for-mail From: Markus Hubig Newsgroups: gmane.comp.tex.context Subject: Problem with codelistings and linenumbers Date: Fri, 7 Sep 2012 18:32:09 +0200 Message-ID: <20120907181640.D7915AE3-89EA-403E-A018-0F20584CC374.mhubig@imko.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347035548 929 80.91.229.3 (7 Sep 2012 16:32:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2012 16:32:28 +0000 (UTC) To: ConTeXt ML Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 07 18:32:28 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TA1Tn-00060T-6U for gctc-ntg-context-518@m.gmane.org; Fri, 07 Sep 2012 18:32:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BD238101EF; Fri, 7 Sep 2012 18:32:23 +0200 (CEST) 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 F2JDGkRU3saM; Fri, 7 Sep 2012 18:32:18 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 10219101E5; Fri, 7 Sep 2012 18:32:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C14EC101E5 for ; Fri, 7 Sep 2012 18:32:16 +0200 (CEST) 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 1AGkCw-oiIve for ; Fri, 7 Sep 2012 18:32:15 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 5ADE9101DD for ; Fri, 7 Sep 2012 18:32:15 +0200 (CEST) Original-Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q87GUn1x024999 for ; Fri, 7 Sep 2012 18:30:49 +0200 Original-Received: by eeke49 with SMTP id e49so1523389eek.14 for ; Fri, 07 Sep 2012 09:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=eCfT3yPNlGPoU58aXsJbuy68y5O6FTc2GgiuPSEr4PA=; b=l8NCwV2W98q/VNhgIi2hLI3o0K+2pB5n/BkYdGeap+4pAqT9X4O/gM7UTlUif4J2+A 9QSsDp5lgubEfNQyxsKZNSP3bITGH6hsqNCXeq/z7N5H55W26guCl3zHK5oR8qaHmmXA JF2Dn0/4x3B7N/PVdOUitg+JJM5EiD5CyrLpUSKsnmWov8uA2UzmqY0S+Z7+BrK1Nwpf yMh8SfGoeSoLV53SXUPgfNqhp9phdIUL3qI6Wx1oP+OuAVDbYqYm3d96Aa4eY6g08ih4 hFtHd3XxfLHKD/r296fBjw7HrRBrfU9P1li8c4cshYcRpo+/Yd2NXHtQ4/mWurz8AnHn Fvwg== Original-Received: by 10.14.184.134 with SMTP id s6mr8910670eem.46.1347035534043; Fri, 07 Sep 2012 09:32:14 -0700 (PDT) Original-Received: from mh.fritz.box (HSI-KBW-091-089-005-227.hsi2.kabelbw.de. [91.89.5.227]) by mx.google.com with ESMTPS id e7sm16133214eep.2.2012.09.07.09.32.11 (version=SSLv3 cipher=OTHER); Fri, 07 Sep 2012 09:32:13 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WHUguNUu - da0f0ef1bed9 - 20120907 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:78162 Archived-At: Hi @all, I'm trying to put some codelistings into my ConTeXt file, but I don't get line numbers. Im using a resend version of ConTeXt: | ConTeXt ver: 2012.09.06 23:03 MKIV fmt: 2012.9.7 int: english/english Here is the setup for my code environment: | \definefloat [listing] [listings] | \setupfloat [listing] [topframe=on, bottomframe=on] | \setupheadtext [listings=Quellcodelistings] | | \defineblank [aroundcode] [medium] | \definetyping [code] | \setuptyping [code] | [option=color, bodyfont=8.0pt, margin=yes, | before={\blank[aroundcode]\startlinenumbering}, | after={\blank[aroundcode]\stoplinenumbering}] And here is an example, how I use it. I place it into a floating environment so I can have a nice Listion of my code sippets with \completelistoflistings. | \placelisting [here] [lst:bb] | {Beispiel eines bitbake Rezeptes (zlib_1.2.7.bb)} | {\startcode | SUMMARY = "Zlib Compression Library" | DESCRIPTION = "Zlib is a general-purpose, patent-free, lossless data \ | compression library which is used by many different programs." | HOMEPAGE = "http://zlib.net/" | SECTION = "libs" | | LICENSE = "Zlib" | LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=94d1b5a..." | | SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.bz2 \ | file://remove.ldconfig.call.patch \ | " | SRC_URI[md5sum] = "2ab442d1691..." | SRC_URI[sha256sum] = "49e2e9658df..." | | do_configure (){ | ./configure --prefix=${prefix} --shared --libdir=${libdir} | } | | do_compile (){ | oe_runmake | } | | do_install() { | oe_runmake DESTDIR = ${D} install | } | \stopcode} You can have a look at the result here: https://dl.dropbox.com/u/2721576/code.pdf Besides the lack of the linenumbers you may notice the slightly bigger space between the top line and the code and the bottom line and the code. At the moment I'm adding the line numbers by hand ... Cheers, Markus ___________________________________________________________________________________ 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 ___________________________________________________________________________________