From: Markus Hubig <mhubig@gmail.com>
To: ConTeXt ML <ntg-context@ntg.nl>
Subject: Problem with codelistings and linenumbers
Date: Fri, 7 Sep 2012 18:32:09 +0200 [thread overview]
Message-ID: <20120907181640.D7915AE3-89EA-403E-A018-0F20584CC374.mhubig@imko.de> (raw)
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
___________________________________________________________________________________
reply other threads:[~2012-09-07 16:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120907181640.D7915AE3-89EA-403E-A018-0F20584CC374.mhubig@imko.de \
--to=mhubig@gmail.com \
--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).