* \typefile from n-th line @ 2010-10-15 7:16 Procházka Lukáš Ing. - Pontex s. r. o. 2010-10-15 7:58 ` luigi scarso ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2010-10-15 7:16 UTC (permalink / raw) To: ConTeXt Hello, I'd need to \typefile a file from n-th line (= ignoring first n-1 lines). Is there such an option for \typefile macro? (http://wiki.contextgarden.net/Reference/en/typefile is silent.) I tried: \typefile[default][lines={10}]{a_file.txt} % Start at line 10 \typefile[default][lines={10,+1}]{a_file.txt} % Start at line 10, step = 1 \typefile[default][start=10]{a_file.txt} % Start at line 10 \typefile[default][from=10]{a_file.txt} % Start at line 10 No success. (The last Ctx minimals, WinXP.) Lukas ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: \typefile from n-th line 2010-10-15 7:16 \typefile from n-th line 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:09 ` Peter Münster 2 siblings, 0 replies; 6+ messages in thread From: luigi scarso @ 2010-10-15 7:58 UTC (permalink / raw) To: mailing list for ConTeXt users 2010/10/15 Procházka Lukáš Ing. - Pontex s. r. o. <LPr@pontex.cz>: > Hello, > > I'd need to \typefile a file from n-th line (= ignoring first n-1 lines). > > Is there such an option for \typefile macro? > (http://wiki.contextgarden.net/Reference/en/typefile is silent.) > > I tried: > > \typefile[default][lines={10}]{a_file.txt} % Start at line 10 > > \typefile[default][lines={10,+1}]{a_file.txt} % Start at line 10, step = 1 > > \typefile[default][start=10]{a_file.txt} % Start at line 10 > > \typefile[default][from=10]{a_file.txt} % Start at line 10 > > No success. > > (The last Ctx minimals, WinXP.) > > Lukas 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. -- luigi ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: \typefile from n-th line 2010-10-15 7:16 \typefile from n-th line 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. 2010-10-15 8:09 ` Peter Münster 2 siblings, 1 reply; 6+ messages in thread From: Henning Hraban Ramm @ 2010-10-15 8:00 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-15 um 09:16 schrieb Procházka Lukáš Ing. - Pontex s. r. o.: > I'd need to \typefile a file from n-th line (= ignoring first n-1 > lines). > \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) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: \typefile from n-th line 2010-10-15 8:00 ` Henning Hraban Ramm @ 2010-10-15 8:20 ` Procházka Lukáš Ing. - Pontex s. r. o. 0 siblings, 0 replies; 6+ messages in thread From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2010-10-15 8:20 UTC (permalink / raw) To: mailing list for ConTeXt users [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: \typefile from n-th line 2010-10-15 7:16 \typefile from n-th line 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:09 ` Peter Münster 2010-10-15 8:24 ` Procházka Lukáš Ing. - Pontex s. r. o. 2 siblings, 1 reply; 6+ messages in thread From: Peter Münster @ 2010-10-15 8:09 UTC (permalink / raw) To: mailing list for ConTeXt users On Fri, Oct 15 2010, Procházka Lukáš Ing. - Pontex s. r. o. wrote: > > I'd need to \typefile a file from n-th line (= ignoring first n-1 lines). \starttext % 1 \typefile[range=3]{test.tex} % 2 bla % 3 bla % 4 bla % 5 bla % 6 \stoptext % 7 See also: http://tracker.luatex.org/view.php?id=475 Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: \typefile from n-th line 2010-10-15 8:09 ` Peter Münster @ 2010-10-15 8:24 ` Procházka Lukáš Ing. - Pontex s. r. o. 0 siblings, 0 replies; 6+ messages in thread From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2010-10-15 8:24 UTC (permalink / raw) To: mailing list for ConTeXt users ... Yes, thanks, that's it: \typefile[default][range={3,5}]{t-TypeF2.mkiv} % If also the upper limit is to be specified Regards, Lukas On Fri, 15 Oct 2010 10:09:13 +0200, Peter Münster <pmlists@free.fr> wrote: > On Fri, Oct 15 2010, Procházka Lukáš Ing. - Pontex s. r. o. wrote: >> >> I'd need to \typefile a file from n-th line (= ignoring first n-1 lines). > > \starttext % 1 > \typefile[range=3]{test.tex} % 2 > bla % 3 > bla % 4 > bla % 5 > bla % 6 > \stoptext % 7 > > See also: http://tracker.luatex.org/view.php?id=475 > > Cheers, Peter > -- 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 ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-15 8:24 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-10-15 7:16 \typefile from n-th line 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. 2010-10-15 8:09 ` Peter Münster 2010-10-15 8:24 ` Procházka Lukáš Ing. - Pontex s. r. o.
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).