* two issues with \sciteinlinebuffer
@ 2022-07-07 16:19 Pablo Rodriguez via ntg-context
2022-07-07 21:30 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-07-07 16:19 UTC (permalink / raw)
To: ConTeXt users; +Cc: Pablo Rodriguez
Hi Hans,
many thanks for the new release.
I experience two issues with scite buffers:
\usemodule[scite]
\setuptyping[margin=yes]
\starttext
\startbuffer[b]b\stopbuffer
\startTEXpage[offset=1em]
no margin
a \sciteinlinebuffer[none][b] a
a \typeinlinebuffer[b][option] a
\stopTEXpage
\stoptext
1. Margin is applied to \sciteinlinebuffer.
2. An extra unwanted space is added after \sciteinlinebuffer.
Isn’t it intended that \sciteinlinebuffer behaves in a similar way as
\typeinlinebuffer?
Many thanks for your help and your excellent work,
Pablo
___________________________________________________________________________________
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: two issues with \sciteinlinebuffer
2022-07-07 16:19 two issues with \sciteinlinebuffer Pablo Rodriguez via ntg-context
@ 2022-07-07 21:30 ` Hans Hagen via ntg-context
2022-07-08 17:51 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen via ntg-context @ 2022-07-07 21:30 UTC (permalink / raw)
To: Pablo Rodriguez via ntg-context; +Cc: Hans Hagen
On 7/7/2022 6:19 PM, Pablo Rodriguez via ntg-context wrote:
> Hi Hans,
>
> many thanks for the new release.
>
> I experience two issues with scite buffers:
>
> \usemodule[scite]
> \setuptyping[margin=yes]
> \starttext
> \startbuffer[b]b\stopbuffer
> \startTEXpage[offset=1em]
> no margin
>
> a \sciteinlinebuffer[none][b] a
>
> a \typeinlinebuffer[b][option] a
> \stopTEXpage
> \stoptext
>
> 1. Margin is applied to \sciteinlinebuffer.
>
> 2. An extra unwanted space is added after \sciteinlinebuffer.
>
> Isn’t it intended that \sciteinlinebuffer behaves in a similar way as
> \typeinlinebuffer?
>
> Many thanks for your help and your excellent work,
\unexpanded\def\module_scite_buffer[#1][#2]%
{\begingroup
\setcatcodetable\ctxcatcodes % needed in xml
\ifsecondargument
\clf_scitelexbuffer{#2}{#1}%
\else
\clf_scitelexbuffer{#1}{tex}%
\fi
\tt
\installscitecommandsdisplay
\module_scite_inherit_typing
\dontcomplain
\raggedright
\startscitelines
\getbuffer[lex]
\stopscitelines
\endgroup}
some day i need to make an lmtx version (less code)
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: two issues with \sciteinlinebuffer
2022-07-07 21:30 ` Hans Hagen via ntg-context
@ 2022-07-08 17:51 ` Pablo Rodriguez via ntg-context
2022-07-09 6:42 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-07-08 17:51 UTC (permalink / raw)
To: Hans Hagen via ntg-context; +Cc: Pablo Rodriguez
On 7/7/22 23:30, Hans Hagen via ntg-context wrote:
> On 7/7/2022 6:19 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> 1. Margin is applied to \sciteinlinebuffer.
>>
>> 2. An extra unwanted space is added after \sciteinlinebuffer.
>>
>> Isn’t it intended that \sciteinlinebuffer behaves in a similar way as
>> \typeinlinebuffer?
>>
> \unexpanded\def\module_scite_buffer[#1][#2]%
> {\begingroup
> \setcatcodetable\ctxcatcodes % needed in xml
> \ifsecondargument
> \clf_scitelexbuffer{#2}{#1}%
> \else
> \clf_scitelexbuffer{#1}{tex}%
> \fi
> \tt
> \installscitecommandsdisplay
> \module_scite_inherit_typing
> \dontcomplain
> \raggedright
> \startscitelines
> \getbuffer[lex]
> \stopscitelines
> \endgroup}
Many thanks for your code, Hans.
I’m afraid I cannot make it work for the inline buffer.
After checking m-scite.mkiv, the code above isn’t different from
"\module_scite_buffer" defined on lines 433-449 (checked with a visual
diff tool [https://meldmerge.org/]).
Sorry, but isn’t it "\module_scite_buffer_inline" (lines 454-468 from
m-scite.mkiv) the command that needs fixing?
Excuse my ignorance, but it is \sciteinlinebuffer the misbehaving
command in my code.
Many thanks for your help,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: two issues with \sciteinlinebuffer
2022-07-08 17:51 ` Pablo Rodriguez via ntg-context
@ 2022-07-09 6:42 ` Hans Hagen via ntg-context
2022-07-09 8:05 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen via ntg-context @ 2022-07-09 6:42 UTC (permalink / raw)
To: Pablo Rodriguez via ntg-context; +Cc: Hans Hagen
On 7/8/2022 7:51 PM, Pablo Rodriguez via ntg-context wrote:
> On 7/7/22 23:30, Hans Hagen via ntg-context wrote:
>> On 7/7/2022 6:19 PM, Pablo Rodriguez via ntg-context wrote:
>>> [...]
>>> 1. Margin is applied to \sciteinlinebuffer.
>>>
>>> 2. An extra unwanted space is added after \sciteinlinebuffer.
>>>
>>> Isn’t it intended that \sciteinlinebuffer behaves in a similar way as
>>> \typeinlinebuffer?
>>>
>> \unexpanded\def\module_scite_buffer[#1][#2]%
>> {\begingroup
>> \setcatcodetable\ctxcatcodes % needed in xml
>> \ifsecondargument
>> \clf_scitelexbuffer{#2}{#1}%
>> \else
>> \clf_scitelexbuffer{#1}{tex}%
>> \fi
>> \tt
>> \installscitecommandsdisplay
>> \module_scite_inherit_typing
>> \dontcomplain
>> \raggedright
>> \startscitelines
>> \getbuffer[lex]
>> \stopscitelines
>> \endgroup}
>
> Many thanks for your code, Hans.
>
> I’m afraid I cannot make it work for the inline buffer.
>
> After checking m-scite.mkiv, the code above isn’t different from
> "\module_scite_buffer" defined on lines 433-449 (checked with a visual
> diff tool [https://meldmerge.org/]).
>
> Sorry, but isn’t it "\module_scite_buffer_inline" (lines 454-468 from
> m-scite.mkiv) the command that needs fixing?
>
> Excuse my ignorance, but it is \sciteinlinebuffer the misbehaving
> command in my code.
\unexpanded\def\module_scite_buffer_inline[#1][#2]%
{\dontleavehmode
\begingroup
\lettypingparameter\c!margin\zeropoint
\setcatcodetable\ctxcatcodes % needed in xml
\ifsecondargument
\clf_scitelexbuffer{#2}{#1}%
\else
\clf_scitelexbuffer{#1}{tex}%
\fi
\tt
\installscitecommandsinline
\module_scite_inherit_typing
\dontcomplain
\getbuffer[lex]%
\removeunwantedspaces
\endgroup}
-----------------------------------------------------------------
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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: two issues with \sciteinlinebuffer
2022-07-09 6:42 ` Hans Hagen via ntg-context
@ 2022-07-09 8:05 ` Pablo Rodriguez via ntg-context
0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-07-09 8:05 UTC (permalink / raw)
To: Hans Hagen via ntg-context; +Cc: Pablo Rodriguez
On 7/9/22 08:42, Hans Hagen via ntg-context wrote:
> On 7/8/2022 7:51 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Excuse my ignorance, but it is \sciteinlinebuffer the misbehaving
>> command in my code.
> \unexpanded\def\module_scite_buffer_inline[#1][#2]%
> {\dontleavehmode
> \begingroup
> \lettypingparameter\c!margin\zeropoint
> \setcatcodetable\ctxcatcodes % needed in xml
> \ifsecondargument
> \clf_scitelexbuffer{#2}{#1}%
> \else
> \clf_scitelexbuffer{#1}{tex}%
> \fi
> \tt
> \installscitecommandsinline
> \module_scite_inherit_typing
> \dontcomplain
> \getbuffer[lex]%
> \removeunwantedspaces
> \endgroup}
Many thanks for the fix, Hans.
It works perfectly fine now.
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-07-09 8:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 16:19 two issues with \sciteinlinebuffer Pablo Rodriguez via ntg-context
2022-07-07 21:30 ` Hans Hagen via ntg-context
2022-07-08 17:51 ` Pablo Rodriguez via ntg-context
2022-07-09 6:42 ` Hans Hagen via ntg-context
2022-07-09 8:05 ` Pablo Rodriguez via ntg-context
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).