Dear list, I have the following sample: \starttext This is \linenote{abed intended. \stoptext
From which I get the error:
close source > level 2, order 3, name '/home/ousia/untitled.tex' close source > level 1, order 3, name '/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv' * tex error > tex error on line 0 in file : ! Emergency stop <*> cont-yes.mkiv <empty file> End of file on the terminal! Would it be any way to make ConTeXt report that \linenote{ hasn’t been closed? I mean, with a three line source, it is stupid to get this. But in a longer file, it can be an exhausting task. The scenario may be worse. At work I have a system to generate some documents (mainly letters) automatically. I have to add an option (which I didn’t find the time to fully implement it). The system uses ConTeXt and there are about 30 source files. Depending on the options you need, the main file requires the other files (via modes and \input commands). Well, in this context (no pun intended), I get an error such as this: open source > level 3, order 4, name 'untitled.tex' But the source isn’t closed. I don’t have the files here, but I don’t know even how to start searching. In this second case, how could I get a hint of what is ConTeXt expecting? May thanks fory your help, Pablo -- http://www.ousia.tk
Dear Pablo,
On Tue, 06 Jun 2017 14:02:24 -0600, Pablo Rodriguez
Dear list,
I have the following sample:
\starttext This is \linenote{abed intended. \stoptext
From which I get the error:
close source > level 2, order 3, name '/home/ousia/untitled.tex' close source > level 1, order 3, name '/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
*
tex error > tex error on line 0 in file : ! Emergency stop
<*> cont-yes.mkiv
<empty file>
End of file on the terminal!
Would it be any way to make ConTeXt report that \linenote{ hasn’t been closed?
Just check your file before running it: mtxrun --autogenerate --script check test.tex Running this on your example gives 2 grouping error \starttext <cr> <lf> This is \linenote{abed intended. <cr> <lf> \stoptext <cr> <lf> -) Best wishes Idris
I mean, with a three line source, it is stupid to get this. But in a longer file, it can be an exhausting task.
The scenario may be worse.
At work I have a system to generate some documents (mainly letters) automatically. I have to add an option (which I didn’t find the time to fully implement it).
The system uses ConTeXt and there are about 30 source files. Depending on the options you need, the main file requires the other files (via modes and \input commands).
Well, in this context (no pun intended), I get an error such as this:
open source > level 3, order 4, name 'untitled.tex'
But the source isn’t closed. I don’t have the files here, but I don’t know even how to start searching.
In this second case, how could I get a hint of what is ConTeXt expecting?
May thanks fory your help,
Pablo
-- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512
On 06/06/2017 10:56 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
[...] Would it be any way to make ConTeXt report that \linenote{ hasn’t been closed?
Just check your file before running it:
mtxrun --autogenerate --script check test.tex
Running this on your example gives
2 grouping error \starttext <cr> <lf> This is \linenote{abed intended. <cr> <lf> \stoptext <cr> <lf>
Dear Idris, many thanks for the advice. I’m afraid that it doesn’t report errors in files loaded with the \input command %%% contents of file a.tex: \starttext This is \linenote{error intended \stoptext %%% contents of file b.tex: \starttext This only loads a file. \input a.tex \stoptext If I runt "mtxrunjit --autogenerate --script check b.tex", I get the following message: no error Is there no way to check also the files loaded by the main source? Many thanks for your help, Pablo -- http://www.ousia.tk
On 6/7/2017 7:02 AM, Pablo Rodriguez wrote:
On 06/06/2017 10:56 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
[...] Would it be any way to make ConTeXt report that \linenote{ hasn’t been closed?
Just check your file before running it:
mtxrun --autogenerate --script check test.tex
Running this on your example gives
2 grouping error \starttext <cr> <lf> This is \linenote{abed intended. <cr> <lf> \stoptext <cr> <lf>
Dear Idris,
many thanks for the advice.
I’m afraid that it doesn’t report errors in files loaded with the \input command
%%% contents of file a.tex: \starttext This is \linenote{error intended \stoptext
%%% contents of file b.tex: \starttext This only loads a file.
\input a.tex \stoptext
If I runt "mtxrunjit --autogenerate --script check b.tex", I get the following message:
no error
Is there no way to check also the files loaded by the main source? i just run that command from the editor (configured under a key) so i can use it when editing a file
(but i have to admit that i normally just run files and redo after fixing an error, running is fast enough) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 06/07/2017 10:09 AM, Hans Hagen wrote:
On 6/7/2017 7:02 AM, Pablo Rodriguez wrote:
[...] If I runt "mtxrunjit --autogenerate --script check b.tex", I get the following message:
no error
Is there no way to check also the files loaded by the main source?
i just run that command from the editor (configured under a key) so i can use it when editing a file
Hans, I have just discovered the command (thanks to the kind help of Idris), so I still have to experiment with it. First of all, many thanks for the command (method, or whatever it should be called). It is really useful. In my real-world issue, the tool it spotted my mistake (a non-closed \startnotmode nested in \startmode and followed by another \startmode). My previous reply came before having used the checking method.
(but i have to admit that i normally just run files and redo after fixing an error, running is fast enough)
My question here isn’t about speed. If a source may load twenty source files and it actually loads five source files, the problem is having to check the files individually. Many thanks for your help, Pablo -- http://www.ousia.tk
On Wed, 07 Jun 2017 12:11:14 -0600, Pablo Rodriguez
(but i have to admit that i normally just run files and redo after fixing an error, running is fast enough)
My question here isn’t about speed. If a source may load twenty source files and it actually loads five source files, the problem is having to check the files individually.
I suppose it wouldn't be too hard for someone with the requisite ability to write a script to pipe and run the check on the argument of each \input in a main file. OTOH, \input's can have \input's so it could get unwieldy pretty quick.. As a matter of workflow, I would just check each \input when editing it, don't see the need to check them all over and over - but maybe you have some huge collaborative project with lots of \inputs frequently changing.. Best wishes Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512
On 06/07/2017 09:02 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
[...] As a matter of workflow, I would just check each \input when editing it, don't see the need to check them all over and over - but maybe you have some huge collaborative project with lots of \inputs frequently changing..
My project isn’t collaborative (I’m the only one who writes code there) and it is by no means huge. It is probably too complex for such simple mind as mine 😉. \inputs don’t change too frequently. But the code I wrote a month ago is totally forgotten to me. I mean, I read and I understand what I wrote, but I may not remember why I did something in that particular way. I don’t need external examination to see that the code is unnecessarily complex in many ways. But I’m neither a ConTeXt or programming expert. The most common problem is that we have different conditions that weren’t considered when writing the original code. And these code additions may cause trouble. Because they need to be implemented in the shortest period of time and in the not the quietest working environment. At least for me, this is the perfect scenario to forget to close something I opened before. That being said, "mtxrunjit --autogenerate --script check" is the perfect tool to spot those stupid errors. Many thanks for your help, Pablo -- http://www.ousia.tk
On 6/7/2017 9:02 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Wed, 07 Jun 2017 12:11:14 -0600, Pablo Rodriguez
wrote: (but i have to admit that i normally just run files and redo after fixing an error, running is fast enough)
My question here isn’t about speed. If a source may load twenty source files and it actually loads five source files, the problem is having to check the files individually.
I suppose it wouldn't be too hard for someone with the requisite ability to write a script to pipe and run the check on the argument of each \input in a main file.
OTOH, \input's can have \input's so it could get unwieldy pretty quick..
As a matter of workflow, I would just check each \input when editing it, don't see the need to check them all over and over - but maybe you have some huge collaborative project with lots of \inputs frequently changing.. sure it's no big deal to write such a script but in decades of tex i never felt the need
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 06/07/2017 11:01 PM, Hans Hagen wrote:
sure it's no big deal to write such a script but in decades of tex i never felt the need
I wrote a small script for my Linux machine (check-context.sh), to be able to check a single file: source $HOME/ctxbeta/tex/setuptex mtxrunjit --autogenerate --script check $1 echo $1 But when applied to a file, I get the following: $ check-context untitled.tex The argument "/home/ousia/untitled.tex" is not a valid TEXROOT path. (There is no file "/home/ousia/untitled.tex/texmf/tex/plain /base/plain.tex") 8 grouping error ode[abc] <lf> This is \linenote{abed intended. <lf> <lf> \stopt 10 missing stop enote{abed intended. <lf> <lf> \stoptext <lf> (see line 7) untitled.tex I mean, I get the output, but after an error. $1 has full path in the first ocurrence, but it has only the relative path with echo. Of course, I get not error by direct invocation: $ mtxrunjit --autogenerate --script check untitled.tex 8 grouping error ode[abc] <lf> This is \linenote{abed intended. <lf> <lf> \stopt 10 missing stop enote{abed intended. <lf> <lf> \stoptext <lf> (see line 7) What am I doing wrong here? Many thanks for your help, Pablo -- http://www.ousia.tk
Hi Pablo,
Your script doesn't have texroot set.
You either need to source ~/.profile (or whatever sets texroot) or
explicitly set it.
At the top of my compile script, I've got:
TEXROOT=/opt/context/tex/
TEXMFOS=$TEXROOT/texmf-linux-64
export PATH=$TEXMFOS/bin:$PATH
I think the fact that you're sourcing setuptex but passing in $1 as a file
path is problematic, since setuptex eats $1 as the texroot.
On 8 June 2017 at 14:05, Pablo Rodriguez
On 06/07/2017 11:01 PM, Hans Hagen wrote:
sure it's no big deal to write such a script but in decades of tex i never felt the need
I wrote a small script for my Linux machine (check-context.sh), to be able to check a single file:
source $HOME/ctxbeta/tex/setuptex mtxrunjit --autogenerate --script check $1 echo $1
But when applied to a file, I get the following:
$ check-context untitled.tex The argument "/home/ousia/untitled.tex" is not a valid TEXROOT path. (There is no file "/home/ousia/untitled.tex/texmf/tex/plain /base/plain.tex") 8 grouping error ode[abc] <lf> This is \linenote{abed intended. <lf> <lf> \stopt 10 missing stop enote{abed intended. <lf> <lf> \stoptext <lf> (see line 7)
untitled.tex
I mean, I get the output, but after an error. $1 has full path in the first ocurrence, but it has only the relative path with echo.
Of course, I get not error by direct invocation:
$ mtxrunjit --autogenerate --script check untitled.tex 8 grouping error ode[abc] <lf> This is \linenote{abed intended. <lf> <lf> \stopt 10 missing stop enote{abed intended. <lf> <lf> \stoptext <lf> (see line 7)
What am I doing wrong here?
Many thanks for your help,
Pablo -- http://www.ousia.tk ____________________________________________________________ _______________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ____________________________________________________________ _______________________
-- http://fedarch.org/ Brian Ballsun-Stanton Ph.D. FAIMS Project http://fedarch.org/ - Data Architect http://www.mendeley.com/profiles/brian-ballsun-stanton/ brian@fedarch.org 0479 178 749
On 6/7/2017 8:11 PM, Pablo Rodriguez wrote:
My question here isn’t about speed. If a source may load twenty source files and it actually loads five source files, the problem is having to check the files individually. in that case i always run the individual files independently when editing them
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 06/07/2017 09:08 PM, Hans Hagen wrote:
On 6/7/2017 8:11 PM, Pablo Rodriguez wrote:
My question here isn’t about speed. If a source may load twenty source files and it actually loads five source files, the problem is having to check the files individually.
in that case i always run the individual files independently when editing them
As Idris pointed out too, I need to get the habit of ckecking source files every time I edit them. And creating a keyboard shortcut to launch the script automatically helps a lot. Many thanks for your help, Pablo -- http://www.ousia.tk
On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguez
And creating a keyboard shortcut to launch the script automatically helps a lot.
Scite: Ctrl-0 Notepad++: Ctrl-Shift-0 (new n++ setup for context currently under development) Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512
On 06/07/2017 10:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguez
wrote: And creating a keyboard shortcut to launch the script automatically helps a lot.
Scite: Ctrl-0 Notepad++: Ctrl-Shift-0
(new n++ setup for context currently under development)
Where are these setops? I mean, in the past, I tried to add them to Notepad++ with the help of the wiki and I gave up because I couldn’t make it work. Pablo -- http://www.ousia.tk
On Wed, 07 Jun 2017 14:33:05 -0600, Pablo Rodriguez
On 06/07/2017 10:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguez
wrote: And creating a keyboard shortcut to launch the script automatically helps a lot.
Scite: Ctrl-0 Notepad++: Ctrl-Shift-0
(new n++ setup for context currently under development)
Where are these setops? I mean, in the past, I tried to add them to Notepad++ with the help of the wiki and I gave up because I couldn’t make it work.
Best to forget the old stuff on the wiki... Will make an announcement once the new system is ready. It includes a dedicated lexer plugin and some other neat things; stay tuned. Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512
On Wed, 07 Jun 2017 02:09:48 -0600, Hans Hagen
On 6/7/2017 7:02 AM, Pablo Rodriguez wrote:
On 06/06/2017 10:56 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
[...] Would it be any way to make ConTeXt report that \linenote{ hasn’t been closed?
Just check your file before running it:
mtxrun --autogenerate --script check test.tex
Running this on your example gives
2 grouping error \starttext <cr> <lf> This is \linenote{abed intended. <cr> <lf> \stoptext <cr> <lf> Dear Idris, many thanks for the advice. I’m afraid that it doesn’t report errors in files loaded with the \input command %%% contents of file a.tex: \starttext This is \linenote{error intended \stoptext %%% contents of file b.tex: \starttext This only loads a file. \input a.tex \stoptext If I runt "mtxrunjit --autogenerate --script check b.tex", I get the following message: no error Is there no way to check also the files loaded by the main source? i just run that command from the editor (configured under a key) so i can use it when editing a file
Same here.
(but i have to admit that i normally just run files and redo after fixing an error, running is fast enough)
Again, same here. Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512
On 06/06/2017 10:57 PM, Alan BRASLAU wrote:
My favorite is:
\startext
;-)
Well, I guess this is our star typo :-). Pablo -- http://www.ousia.tk
participants (5)
-
Alan BRASLAU
-
Brian Ballsun-Stanton
-
Hans Hagen
-
Idris Samawi Hamid ادريس سماوي ح امد
-
Pablo Rodriguez