From: nico <nicolas.marsgui@libertysurf.fr>
Subject: typing and linenumbering
Date: Wed, 15 Mar 2006 23:02:27 +0100 [thread overview]
Message-ID: <ops6g56d0i9niby6@localhost> (raw)
Hello,
I would like to print some listings, with their line numbers. To achieve
this I use the following combination on framedtext, typing and
linenumbering stuff.
The output is pretty as I wish, but unfortunately the line numbers are
*not* the numbers of the listing lines, but the numbers of the lines once
wrapped in the frame. In the example below the first line is very long
(the "blah blah" line), but in the output it is shown as 4 lines (with 4
line numbers).
Is there a way to achieve this in a more integrated way with the typing
environment? The other side effect of the method used is that it changes
the linenumbering behaviour outside the typing environment. I tried the
"reset" option, but it doesn't change the intext location. Is there a
possibility to come back to default settings?
Last but not least, is it possible to customize the wrapping behaviour so
that an arbitrary command can be called before the cut, and another
command after the cut? What I would like to have is {\space\wrapsign}
before the cut and an indentation after the cut to show that the line is
wrapped.
Thanks for any hints.
% listing frame
\defineframedtext
[framelisting]
[background=screen,
frame=off,
strut=yes,
offset=2mm,
width=broad,
framecolor=black,
align=right]
\definetyping[prog]
\setuptyping[prog]
[bodyfont=small,
before={\setuplinenumbering[style=small,step=2,start=3,location=intext]
\startframelisting\startlinenumbering},
after={\stoplinenumbering\stopframelisting}]
% after={\stoplinenumbering\setuplinenumbering[reset]}]
\startprog
first line: blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah
second line
third line
last line
\stopprog
Regards,
BG
next reply other threads:[~2006-03-15 22:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-15 22:02 nico [this message]
2006-03-16 9:02 ` Taco Hoekwater
2006-03-16 21:41 ` nico
2006-03-16 22:16 ` Hans Hagen
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=ops6g56d0i9niby6@localhost \
--to=nicolas.marsgui@libertysurf.fr \
--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).