* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? @ 2009-07-01 18:18 ivo welch 2009-07-01 18:40 ` Hans Hagen 2009-07-02 21:52 ` Mojca Miklavec 0 siblings, 2 replies; 15+ messages in thread From: ivo welch @ 2009-07-01 18:18 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 260 bytes --] is there also a way to determine the current output page number on which typesetting is currently being made? (I know this is a difficult problem in LaTeX, and I presume the same is the case for ConTeXt, because it uses the same underlying TeX engine.) /iaw [-- Attachment #1.2: Type: text/html, Size: 281 bytes --] [-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-01 18:18 How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? ivo welch @ 2009-07-01 18:40 ` Hans Hagen 2009-07-02 21:52 ` Mojca Miklavec 1 sibling, 0 replies; 15+ messages in thread From: Hans Hagen @ 2009-07-01 18:40 UTC (permalink / raw) To: mailing list for ConTeXt users ivo welch wrote: > is there also a way to determine the current output page number on which > typesetting is currently being made? (I know this is a difficult problem in > LaTeX, and I presume the same is the case for ConTeXt, because it uses the > same underlying TeX engine.) \realpageno \userpageno \subpageno of course it depends on the pagebreak so the other ways is to use the referencing mechanism ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-01 18:18 How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? ivo welch 2009-07-01 18:40 ` Hans Hagen @ 2009-07-02 21:52 ` Mojca Miklavec 2009-07-03 6:56 ` Taco Hoekwater 1 sibling, 1 reply; 15+ messages in thread From: Mojca Miklavec @ 2009-07-02 21:52 UTC (permalink / raw) To: mailing list for ConTeXt users Hello, Did you take a look at the thread "How to Determine the Current File Name and Line Number in the ConTeXt Source?" from yesterday? On Wed, Jul 1, 2009 at 20:18, ivo welch wrote: > Current File Name There's \jobname, but if you read from other files this won't help you. > Line Number I don't know of any way, but TeX sometimes complains on errors and outputs the line number along. I could imagine an ugly hack: to trigger an artificial error, read the line number, ignore that number and continue ... but I don't know if that's doable. Another ugly hack would be "talking to synctex". SyncTeX definitely knows the current line number and file name, but I don't know if there's a way to fetch those variables back to TeX. In any case it's probably something that's equally difficult in ConTeXt than in plain TeX. On the other hand, in LuaTeX there might exist elegant solutions. > AND PAGE NUMBER in the ConTeXt Source? What do you mean by "page number in ConTeXt source"? > is there also a way to determine the current output page number on which > typesetting is currently being made? See Hans' response. > (I know this is a difficult problem in > LaTeX, and I presume the same is the case for ConTeXt, because it uses the > same underlying TeX engine.) ... but LuaTeX simplifies matters a lot. In LuaTeX that should be doable. Mojca ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-02 21:52 ` Mojca Miklavec @ 2009-07-03 6:56 ` Taco Hoekwater 2009-07-03 7:05 ` luigi scarso 0 siblings, 1 reply; 15+ messages in thread From: Taco Hoekwater @ 2009-07-03 6:56 UTC (permalink / raw) To: mailing list for ConTeXt users Mojca Miklavec wrote: > >> Line Number > I don't know of any way, but TeX sometimes complains on errors and > outputs the line number along. There is \inputlineno in TeX, so \the\inputlineno or the lua equivalent \ctxlua{tex.inputlineno} will work. Best wishes, Taco ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 6:56 ` Taco Hoekwater @ 2009-07-03 7:05 ` luigi scarso 2009-07-03 7:14 ` Taco Hoekwater 0 siblings, 1 reply; 15+ messages in thread From: luigi scarso @ 2009-07-03 7:05 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 516 bytes --] On Fri, Jul 3, 2009 at 8:56 AM, Taco Hoekwater <taco@elvenkind.com> wrote: > Mojca Miklavec wrote: > >> >> Line Number >>> >> I don't know of any way, but TeX sometimes complains on errors and >> outputs the line number along. >> > > There is \inputlineno in TeX, so \the\inputlineno or the lua > equivalent \ctxlua{tex.inputlineno} will work. > The problem is exactly locate the error in source . Sometimes the errorline of the log are in someway imprecise , ie. "the errors is (are) around here " . -- luigi [-- Attachment #1.2: Type: text/html, Size: 1148 bytes --] [-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 7:05 ` luigi scarso @ 2009-07-03 7:14 ` Taco Hoekwater 2009-07-03 7:30 ` luigi scarso 0 siblings, 1 reply; 15+ messages in thread From: Taco Hoekwater @ 2009-07-03 7:14 UTC (permalink / raw) To: mailing list for ConTeXt users luigi scarso wrote: > > > On Fri, Jul 3, 2009 at 8:56 AM, Taco Hoekwater <taco@elvenkind.com > <mailto:taco@elvenkind.com>> wrote: > > Mojca Miklavec wrote: > > > Line Number > > I don't know of any way, but TeX sometimes complains on errors and > outputs the line number along. > > > There is \inputlineno in TeX, so \the\inputlineno or the lua > equivalent \ctxlua{tex.inputlineno} will work. > > The problem is exactly locate the error in source . > Sometimes the errorline of the log are in someway imprecise , ie. "the > errors is (are) > around here " . Yeah, that can't be helped (unless you don't do multi-line paragraphs nor macros) Best wishes, Taco ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 7:14 ` Taco Hoekwater @ 2009-07-03 7:30 ` luigi scarso 2009-07-03 7:33 ` Taco Hoekwater 0 siblings, 1 reply; 15+ messages in thread From: luigi scarso @ 2009-07-03 7:30 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 917 bytes --] On Fri, Jul 3, 2009 at 9:14 AM, Taco Hoekwater <taco@elvenkind.com> wrote: > > > luigi scarso wrote: > > > > > > On Fri, Jul 3, 2009 at 8:56 AM, Taco Hoekwater <taco@elvenkind.com > > <mailto:taco@elvenkind.com>> wrote: > > > > Mojca Miklavec wrote: > > > > > > Line Number > > > > I don't know of any way, but TeX sometimes complains on errors > and > > outputs the line number along. > > > > > > There is \inputlineno in TeX, so \the\inputlineno or the lua > > equivalent \ctxlua{tex.inputlineno} will work. > > > > The problem is exactly locate the error in source . > > Sometimes the errorline of the log are in someway imprecise , ie. "the > > errors is (are) > > around here " . > > Yeah, that can't be helped (unless you don't do multi-line paragraphs > nor macros) > we need something like a stack trace; also a lua "try/except" construct should be nice . -- luigi [-- Attachment #1.2: Type: text/html, Size: 1574 bytes --] [-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 7:30 ` luigi scarso @ 2009-07-03 7:33 ` Taco Hoekwater 2009-07-03 7:44 ` luigi scarso 0 siblings, 1 reply; 15+ messages in thread From: Taco Hoekwater @ 2009-07-03 7:33 UTC (permalink / raw) To: mailing list for ConTeXt users luigi scarso wrote: > > we need something like a stack trace; > also a lua "try/except" construct should be nice . stack trace of tex? ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 7:33 ` Taco Hoekwater @ 2009-07-03 7:44 ` luigi scarso 2009-07-03 7:47 ` Taco Hoekwater 0 siblings, 1 reply; 15+ messages in thread From: luigi scarso @ 2009-07-03 7:44 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 830 bytes --] On Fri, Jul 3, 2009 at 9:33 AM, Taco Hoekwater <taco@elvenkind.com> wrote: > > > luigi scarso wrote: > > > > we need something like a stack trace; > > also a lua "try/except" construct should be nice . > > stack trace of tex? > No no, sorry -- I mean traceback, something like this Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module OFS.ObjectManager, line 569, in manage_exportObject Module OFS.XMLExportImport, line 56, in exportXML Module OFS.XMLExportImport, line 31, in XMLrecord Module Shared.DC.xml.ppml, line 263, in load Module pickle, line 872, in load Module Shared.DC.xml.ppml, line 418, in load_binput AttributeError: 'unicode' object has no attribute 'id' -- luigi [-- Attachment #1.2: Type: text/html, Size: 1287 bytes --] [-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 7:44 ` luigi scarso @ 2009-07-03 7:47 ` Taco Hoekwater 2009-07-03 7:51 ` luigi scarso 0 siblings, 1 reply; 15+ messages in thread From: Taco Hoekwater @ 2009-07-03 7:47 UTC (permalink / raw) To: mailing list for ConTeXt users luigi scarso wrote: > > No no, sorry -- I mean traceback, something like this > Traceback (innermost last): Yeah, I though so. Repeat question: for TeX (macros)? ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 7:47 ` Taco Hoekwater @ 2009-07-03 7:51 ` luigi scarso 2009-07-03 8:06 ` Taco Hoekwater 0 siblings, 1 reply; 15+ messages in thread From: luigi scarso @ 2009-07-03 7:51 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 294 bytes --] On Fri, Jul 3, 2009 at 9:47 AM, Taco Hoekwater <taco@elvenkind.com> wrote: > > > luigi scarso wrote: > > > > No no, sorry -- I mean traceback, something like this > > Traceback (innermost last): > > Yeah, I though so. ok > Repeat question: for TeX (macros)? > Is it impossible ? -- luigi [-- Attachment #1.2: Type: text/html, Size: 826 bytes --] [-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 7:51 ` luigi scarso @ 2009-07-03 8:06 ` Taco Hoekwater 2009-07-03 8:13 ` luigi scarso 0 siblings, 1 reply; 15+ messages in thread From: Taco Hoekwater @ 2009-07-03 8:06 UTC (permalink / raw) To: mailing list for ConTeXt users luigi scarso wrote: > > Repeat question: for TeX (macros)? > > Is it impossible ? Right now: yes. Later: doable. ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 8:06 ` Taco Hoekwater @ 2009-07-03 8:13 ` luigi scarso 2009-07-03 8:18 ` Taco Hoekwater 0 siblings, 1 reply; 15+ messages in thread From: luigi scarso @ 2009-07-03 8:13 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 303 bytes --] On Fri, Jul 3, 2009 at 10:06 AM, Taco Hoekwater <taco@elvenkind.com> wrote: > > > luigi scarso wrote: > > > > Repeat question: for TeX (macros)? > > > > Is it impossible ? > > Right now: yes. Later: doable. So doable . Given that I like to lost in code, where should I start to look ? -- luigi [-- Attachment #1.2: Type: text/html, Size: 651 bytes --] [-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 8:13 ` luigi scarso @ 2009-07-03 8:18 ` Taco Hoekwater 2009-07-03 8:24 ` luigi scarso 0 siblings, 1 reply; 15+ messages in thread From: Taco Hoekwater @ 2009-07-03 8:18 UTC (permalink / raw) To: mailing list for ConTeXt users luigi scarso wrote: > > > On Fri, Jul 3, 2009 at 10:06 AM, Taco Hoekwater <taco@elvenkind.com > <mailto:taco@elvenkind.com>> wrote: > > > > luigi scarso wrote: > > > > Repeat question: for TeX (macros)? > > > > Is it impossible ? > > Right now: yes. Later: doable. > > So doable . > Given that I like to lost in code, where should I start to look ? Not now, you will need a bit of luatex interfacing that is not programmed yet. ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? 2009-07-03 8:18 ` Taco Hoekwater @ 2009-07-03 8:24 ` luigi scarso 0 siblings, 0 replies; 15+ messages in thread From: luigi scarso @ 2009-07-03 8:24 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 217 bytes --] On Fri, Jul 3, 2009 at 10:18 AM, Taco Hoekwater <taco@elvenkind.com> wrote: > > Not now, you will need a bit of luatex interfacing that is not > programmed yet. ok -- stop here . Eventually at eurotex . -- luigi [-- Attachment #1.2: Type: text/html, Size: 528 bytes --] [-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-07-03 8:24 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-07-01 18:18 How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source? ivo welch 2009-07-01 18:40 ` Hans Hagen 2009-07-02 21:52 ` Mojca Miklavec 2009-07-03 6:56 ` Taco Hoekwater 2009-07-03 7:05 ` luigi scarso 2009-07-03 7:14 ` Taco Hoekwater 2009-07-03 7:30 ` luigi scarso 2009-07-03 7:33 ` Taco Hoekwater 2009-07-03 7:44 ` luigi scarso 2009-07-03 7:47 ` Taco Hoekwater 2009-07-03 7:51 ` luigi scarso 2009-07-03 8:06 ` Taco Hoekwater 2009-07-03 8:13 ` luigi scarso 2009-07-03 8:18 ` Taco Hoekwater 2009-07-03 8:24 ` luigi scarso
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).