ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \startstopcomment fails on latest beta
@ 2012-02-01 18:31 Marco Pessotto
  2012-02-02 23:27 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Pessotto @ 2012-02-01 18:31 UTC (permalink / raw)
  To: ntg-context


Hello there.

See the following minimal example. Without the \setupinteraction the
document compiles just fine.

%% begin
\setupinteraction[state=start]

\starttext

hello

\startcomment

This won’t be published

\stopcomment

\stoptext
%% end

Best regards.


Error log:

mtx-context     | run 1: luatex --fmt="/media/data/melmoth/progetti/context-cutting-edge/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en" --lua="/media/data/melmoth/progetti/context-cutting-edge/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en.lui" --backend="pdf" "./min.tex" \stoptext
This is LuaTeX, Version beta-0.70.1-2011051923 (rev 4277) 
 \write18 enabled.
(min.tex

ConTeXt  ver: 2012.01.25 14:16 MKIV  fmt: 2012.2.1  int: english/english

system          > cont-new.mkiv loaded
(/media/data/melmoth/progetti/context-cutting-edge/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > min.top loaded
(min.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
{/media/data/melmoth/progetti/context-cutting-edge/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
fonts           > typescripts > unknown: library 'loc'
{/media/data/melmoth/progetti/context-cutting-edge/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/media/data/melmoth/progetti/context-cutting-edge/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > fallback modern rm 12pt is loaded
check           > missing or ungrouped '=' after 'comment' in line 10 (182>comment:)
! LuaTeX error ...edge/tex/texmf-context/tex/context/base/scrn-wid.lua:120: incorrect index value -1 for tex.setbox()
stack traceback:
	[C]: ?
	...edge/tex/texmf-context/tex/context/base/scrn-wid.lua:120: in function 'insertcomment'
	<main ctx instance>:1: in main chunk.

system          > tex > error on line 13 in file min.tex: LuaTeX error  ...

 3     \setupinteraction[state=start]
 4     
 5     \starttext
 6     
 7     hello
 8     
 9     \startcomment
10     
11     This won’t be published
12     
13 >>  \stopcomment
14     
15     \stoptext
16     


\ctxcommand ...\directlua \zerocount {commands.#1}
                                                  
\184>normal ...\commentparameter \c!textlayer " }}
                                                  \wd \b_scrn_comment_link \...
\scrn_comment_stop ->\scrn_comment_inject 
                                          \egroup 
l.13 \stopcomment
                 
? X


-- 
Marco

___________________________________________________________________________________
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: \startstopcomment fails on latest beta
  2012-02-01 18:31 \startstopcomment fails on latest beta Marco Pessotto
@ 2012-02-02 23:27 ` Hans Hagen
  2012-02-03  9:13   ` Marco Pessotto
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2012-02-02 23:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco Pessotto

On 1-2-2012 19:31, Marco Pessotto wrote:
>
> Hello there.
>
> See the following minimal example. Without the \setupinteraction the
> document compiles just fine.

as there is no beta this week, you can patch yourself ... scrn-wid.lua 
... should either have

b_scrn_comment_link

or

scrn_comment_box_link

(depending on what's n your system; you can search in scrn-wid.mkiv for 
the right box name)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \startstopcomment fails on latest beta
  2012-02-02 23:27 ` Hans Hagen
@ 2012-02-03  9:13   ` Marco Pessotto
  2012-02-03 14:19     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Pessotto @ 2012-02-03  9:13 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Hans Hagen <pragma@wxs.nl> writes:

> On 1-2-2012 19:31, Marco Pessotto wrote:
>>
>> Hello there.
>>
>> See the following minimal example. Without the \setupinteraction the
>> document compiles just fine.
>
> as there is no beta this week, you can patch yourself ... scrn-wid.lua
> ... should either have
>
> b_scrn_comment_link
>
> or
>
> scrn_comment_box_link
>
> (depending on what's n your system; you can search in scrn-wid.mkiv
> for the right box name)
>

Well, I've applied this change and executed context --make

--- ./tex/texmf-context/tex/context/base/scrn-wid.lua~	2011-05-24 11:32:54.000000000 +0200
+++ ./tex/texmf-context/tex/context/base/scrn-wid.lua	2012-02-03 09:44:14.000000000 +0100
@@ -117,7 +117,7 @@
 end
 
 function commands.insertcomment(specification)
-    tex.box["scrn_comment_box_link"] = comments.insert(specification)
+    tex.box["b_scrn_comment_link"] = comments.insert(specification)
 end
 
 -- Soundclips

This is better, as the compilation doesn't fail and the comment appears
as comment, but on the page there is a literal "[title=,]" (in the first
example) or "[title=commentname,]" in the second and third example.

\setupinteraction[state=start]
\starttext
Regular 1
\startcomment
1. This won't be published, but attached as a comment
\stopcomment
Regular 2
\startcomment[commentname]
2. This won't be published, but attached as a comment
\stopcomment
Regular 3
\startcomment[commentname][]
3. This won't be published, but attached as a comment
\stopcomment
\stoptext

There is no problem in the "current" version (2011.05.18), but is
present in version 2011.11.29 23:11 (which is the other previous version
I have on my machine).

Thanks for your attention and all your work.

Best regards.

-- 
Marco
___________________________________________________________________________________
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: \startstopcomment fails on latest beta
  2012-02-03  9:13   ` Marco Pessotto
@ 2012-02-03 14:19     ` Wolfgang Schuster
  2012-02-03 14:54       ` Marco Pessotto
  2012-02-03 15:13       ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2012-02-03 14:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 03.02.2012 um 10:13 schrieb Marco Pessotto:

> This is better, as the compilation doesn't fail and the comment appears
> as comment, but on the page there is a literal "[title=,]" (in the first
> example) or "[title=commentname,]" in the second and third example.

scrn-wid.mkvi

\def\scrn_comment_start_indeed[#title][#settings]%
  {\bgroup
   \doifassignmentelse{#title}
-    {\setupcurrentcomment[\currentcomment][#title]}
-    {\setupcurrentcomment[\currentcomment][\c!title=#title,#settings]}%
+    {\setupcurrentcomment[#title]}
+    {\setupcurrentcomment[\c!title=#title,#settings]}%
   \def\scrn_comment_stop{\scrn_comment_inject\egroup}%
   \grabbufferdatadirect\v!comment{\e!start\currentcomment}{\e!stop\currentcomment}}

@Hans: \scrn_comment_start_indeed is defined twice 

\def\scrn_comment_start_indeed
  {\doifelse{\commentparameter\c!state}\v!start
     {\scrn_comment_start_indeed}
     {\scrn_comment_start_ignore}}

\def\scrn_comment_start_indeed[#title][#settings]%
  {\bgroup
   \doifassignmentelse{#title}
     {\setupcurrentcomment[\currentcomment][#title]}
     {\setupcurrentcomment[\currentcomment][\c!title=#title,#settings]}%
   \def\scrn_comment_stop{\scrn_comment_inject\egroup}%
   \grabbufferdatadirect\v!comment{\e!start\currentcomment}{\e!stop\currentcomment}}

Wolfgang
___________________________________________________________________________________
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: \startstopcomment fails on latest beta
  2012-02-03 14:19     ` Wolfgang Schuster
@ 2012-02-03 14:54       ` Marco Pessotto
  2012-02-03 15:13       ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Marco Pessotto @ 2012-02-03 14:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

Wolfgang Schuster <schuster.wolfgang@googlemail.com> writes:

> Am 03.02.2012 um 10:13 schrieb Marco Pessotto:
>
>> This is better, as the compilation doesn't fail and the comment appears
>> as comment, but on the page there is a literal "[title=,]" (in the first
>> example) or "[title=commentname,]" in the second and third example.
>
> scrn-wid.mkvi
>
> \def\scrn_comment_start_indeed[#title][#settings]%
>   {\bgroup
>    \doifassignmentelse{#title}
> -    {\setupcurrentcomment[\currentcomment][#title]}
> -    {\setupcurrentcomment[\currentcomment][\c!title=#title,#settings]}%
> +    {\setupcurrentcomment[#title]}
> +    {\setupcurrentcomment[\c!title=#title,#settings]}%
>    \def\scrn_comment_stop{\scrn_comment_inject\egroup}%
>    \grabbufferdatadirect\v!comment{\e!start\currentcomment}{\e!stop\currentcomment}}
>

Tested and works like a charm. Thanks a lot.
Best wishes

-- 
Marco
___________________________________________________________________________________
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: \startstopcomment fails on latest beta
  2012-02-03 14:19     ` Wolfgang Schuster
  2012-02-03 14:54       ` Marco Pessotto
@ 2012-02-03 15:13       ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2012-02-03 15:13 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 3-2-2012 15:19, Wolfgang Schuster wrote:

> @Hans: \scrn_comment_start_indeed is defined twice
>
> \def\scrn_comment_start_indeed
>    {\doifelse{\commentparameter\c!state}\v!start
>       {\scrn_comment_start_indeed}
>       {\scrn_comment_start_ignore}}
>
> \def\scrn_comment_start_indeed[#title][#settings]%
>    {\bgroup
>     \doifassignmentelse{#title}
>       {\setupcurrentcomment[\currentcomment][#title]}
>       {\setupcurrentcomment[\currentcomment][\c!title=#title,#settings]}%
>     \def\scrn_comment_stop{\scrn_comment_inject\egroup}%
>     \grabbufferdatadirect\v!comment{\e!start\currentcomment}{\e!stop\currentcomment}}

should be

\unexpanded\def\scrn_comment_start#category%
   {\def\currentcomment{#category}%
    \doifelselocation
      {\dodoubleempty\scrn_comment_start_status}
      {\dodoubleempty\scrn_comment_start_ignore}}

\def\scrn_comment_start_status



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-03 15:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-01 18:31 \startstopcomment fails on latest beta Marco Pessotto
2012-02-02 23:27 ` Hans Hagen
2012-02-03  9:13   ` Marco Pessotto
2012-02-03 14:19     ` Wolfgang Schuster
2012-02-03 14:54       ` Marco Pessotto
2012-02-03 15:13       ` Hans Hagen

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).