ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* option=tex in setuptyping causes the background to be drawn twice
@ 2019-04-28 15:00 Aditya Mahajan
  2019-04-28 15:13 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2019-04-28 15:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Hi,

The following minimal example:

\definetextbackground
     [EXAMPLE]
     [
           location=paragraph,
      rulethickness=1pt,
         leftoffset=5em,
        rightoffset=0mm,
     ]

\setuptyping[option=tex, before=\startEXAMPLE, after=\stopEXAMPLE]

\starttext
\starttyping
   A = B + C
\stoptyping
\stoptext

gives the attached output where the background is repeated twice. The bug 
is present with both mkiv and ltmx.

Aditya

[-- Attachment #2: Type: application/pdf, Size: 7634 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: option=tex in setuptyping causes the background to be drawn twice
  2019-04-28 15:00 option=tex in setuptyping causes the background to be drawn twice Aditya Mahajan
@ 2019-04-28 15:13 ` Wolfgang Schuster
  2019-04-28 15:56   ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2019-04-28 15:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Aditya Mahajan


[-- Attachment #1.1: Type: text/plain, Size: 1377 bytes --]

The problem are these settings in buff-imp-default.mkiv:

\setupstartstop
   [DefaultSnippet]
   [\c!before={\typingparameter\c!before},
    \c!after={\typingparameter\c!after},
    \c!style={\typingparameter\c!style}]

In buff-imp-tex.mkiv these values are inherited:

\definestartstop
     [TexSnippet]
     [DefaultSnippet]

Wolfgang


Aditya Mahajan schrieb am 28.04.2019 um 17:00:
> Hi,
>
> The following minimal example:
>
> \definetextbackground
>     [EXAMPLE]
>     [
>           location=paragraph,
>      rulethickness=1pt,
>         leftoffset=5em,
>        rightoffset=0mm,
>     ]
>
> \setuptyping[option=tex, before=\startEXAMPLE, after=\stopEXAMPLE]
>
> \starttext
> \starttyping
>   A = B + C
> \stoptyping
> \stoptext
>
> gives the attached output where the background is repeated twice. The 
> bug is present with both mkiv and ltmx.
>
> Aditya
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 2374 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: option=tex in setuptyping causes the background to be drawn twice
  2019-04-28 15:13 ` Wolfgang Schuster
@ 2019-04-28 15:56   ` Aditya Mahajan
  2019-04-28 16:42     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2019-04-28 15:56 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

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

On Sun, 28 Apr 2019, Wolfgang Schuster wrote:

> The problem are these settings in buff-imp-default.mkiv:
>
> \setupstartstop
>   [DefaultSnippet]
>   [\c!before={\typingparameter\c!before},
>    \c!after={\typingparameter\c!after},
>    \c!style={\typingparameter\c!style}]
>
> In buff-imp-tex.mkiv these values are inherited:
>
> \definestartstop
>     [TexSnippet]
>     [DefaultSnippet]

So I can fix this locally by resetting before and after keys for 
TexSnippet. What would be a good fix in buff-imp-default?

Aditya

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: option=tex in setuptyping causes the background to be drawn twice
  2019-04-28 15:56   ` Aditya Mahajan
@ 2019-04-28 16:42     ` Hans Hagen
  2019-04-28 18:33       ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2019-04-28 16:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Aditya Mahajan, Wolfgang Schuster

On 4/28/2019 5:56 PM, Aditya Mahajan wrote:
> On Sun, 28 Apr 2019, Wolfgang Schuster wrote:
> 
>> The problem are these settings in buff-imp-default.mkiv:
>>
>> \setupstartstop
>>   [DefaultSnippet]
>>   [\c!before={\typingparameter\c!before},
>>    \c!after={\typingparameter\c!after},
>>    \c!style={\typingparameter\c!style}]
>>
>> In buff-imp-tex.mkiv these values are inherited:
>>
>> \definestartstop
>>     [TexSnippet]
>>     [DefaultSnippet]
> 
> So I can fix this locally by resetting before and after keys for 
> TexSnippet. What would be a good fix in buff-imp-default?
I assume Wolfgang will cook up a patch ...

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: option=tex in setuptyping causes the background to be drawn twice
  2019-04-28 16:42     ` Hans Hagen
@ 2019-04-28 18:33       ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2019-04-28 18:33 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Hans Hagen schrieb am 28.04.2019 um 18:42:
> On 4/28/2019 5:56 PM, Aditya Mahajan wrote:
>> On Sun, 28 Apr 2019, Wolfgang Schuster wrote:
>>> The problem are these settings in buff-imp-default.mkiv:
>>>
>>> \setupstartstop
>>>   [DefaultSnippet]
>>>   [\c!before={\typingparameter\c!before},
>>>    \c!after={\typingparameter\c!after},
>>>    \c!style={\typingparameter\c!style}]
>>>
>>> In buff-imp-tex.mkiv these values are inherited:
>>>
>>> \definestartstop
>>>     [TexSnippet]
>>>     [DefaultSnippet]
>> So I can fix this locally by resetting before and after keys for 
>> TexSnippet. What would be a good fix in buff-imp-default?
> I assume Wolfgang will cook up a patch ...
The best solution is to remove the values from all three keys because 
for now each of them is applies twice (even the style).

\setuptyping
   [before=\hairline,
     after=\hairline,
     style=\tt\em]

\starttext

\starttyping[option=tex]
\donothing
\stoptyping

\stoptext

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2019-04-28 18:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-28 15:00 option=tex in setuptyping causes the background to be drawn twice Aditya Mahajan
2019-04-28 15:13 ` Wolfgang Schuster
2019-04-28 15:56   ` Aditya Mahajan
2019-04-28 16:42     ` Hans Hagen
2019-04-28 18:33       ` Wolfgang Schuster

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