ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Procházka Lukáš Ing. - Pontex s. r. o." <LPr@pontex.cz>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: \typefile from n-th line
Date: Fri, 15 Oct 2010 10:20:53 +0200	[thread overview]
Message-ID: <op.vklys3uvtpjj8f@lpr> (raw)
In-Reply-To: <0B0C58F9-4B9D-46C1-9026-4426BF97638D@fiee.net>

[-- Attachment #1: Type: text/plain, Size: 1777 bytes --]

Hello, it doesn't seem to work.

Let's have "t-TypeF2.mkiv" with the following content:

---
\setuptyping[default][bodyfont=small,style={\ttx\setupinterlinespace}] % 1
% 2
\starttext % 3
   \typefile[default][start=4]{t-TypeF2.mkiv} % = This file; 4
   \typefile[default][start=4,stop=99]{t-TypeF2.mkiv} % = This file; 5
   \typefile[default][lines={4,+1}]{t-TypeF2.mkiv} % = This file; 6
\stoptext % 7
---

If you see the result, all lines are printed in all cases.

Moreover, "4" and "99" are also printed in the front and at the end of the typed file in the second case.

2Luigi:

> Not an answer, but quick recipe:
> With mkiv is trivial ; use lua to skip the first n-1 lines.
> With  mkii just use luatex as lua interpreter to call with
> \executesystemcommand  and then see previous point.

I had also such idea, but I believed to be simply solvable even with the existing \typefile command - supposing there is start/stop line option (or it couldn't be so complicated to provide them). So I supposed the valid syntax is unknown for me.

Lukas


On Fri, 15 Oct 2010 10:00:10 +0200, Henning Hraban Ramm <hraban@fiee.net> wrote:

>> \typefile[default][start=10]{a_file.txt} % Start at line 10
>
>
> According to older ML messages and the source, \typefile[start=10]
> should work. Maybe it need "stop" also?
> Otherwise it's undocumented.
>
> see
> http://source.contextgarden.net/tex/context/base/buff-ver.mkii?search=typefile
>   (MkII)
> http://source.contextgarden.net/tex/context/base/buff-ver.mkiv?search=typefile
>   (MkIV)

-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

[-- Attachment #2: t-TypeF2.mkiv --]
[-- Type: application/octet-stream, Size: 314 bytes --]

\setuptyping[default][bodyfont=small,style={\ttx\setupinterlinespace}] % 1
% 2
\starttext % 3
  \typefile[default][start=4]{t-TypeF2.mkiv} % = This file; 4
  \typefile[default][start=4,stop=99]{t-TypeF2.mkiv} % = This file; 5
  \typefile[default][lines={4,+1}]{t-TypeF2.mkiv} % = This file; 6
\stoptext % 7

[-- Attachment #3: t-TypeF2.pdf --]
[-- Type: application/pdf, Size: 10346 bytes --]

[-- Attachment #4: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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:[~2010-10-15  8:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15  7:16 Procházka Lukáš Ing. - Pontex s. r. o.
2010-10-15  7:58 ` luigi scarso
2010-10-15  8:00 ` Henning Hraban Ramm
2010-10-15  8:20   ` Procházka Lukáš Ing. - Pontex s. r. o. [this message]
2010-10-15  8:09 ` Peter Münster
2010-10-15  8:24   ` Procházka Lukáš Ing. - Pontex s. r. o.

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=op.vklys3uvtpjj8f@lpr \
    --to=lpr@pontex.cz \
    --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).