[NTG-context] Re: breakpoints in verbatim text

2023-08-18 Thread Hans Hagen

On 8/18/2023 1:02 PM, Wolfgang Schuster wrote:

Alex Leray schrieb am 18.08.2023 um 12:19:

Hello Wolfgang,

Le 17/08/23 à 18:56, Wolfgang Schuster a écrit :
Is it correct all your listing are HTML code and you need line breaks 
for the entries of the href attributes?


The content is from a dutch net-artist artist from the early days of 
the public web, and is often (volontary) mixing different natural nd 
machine langages. Not all snippets are HTML, but most of them are some 
sort of HTML pidgin.



I see, the typing environment is in this case the safest option to 
ensure special characters like % remain i the output.


For simple text without special characters you could have switched to 
the lines environment and use a monospaced but

I wouldn't trust it here (even when you enable \asciimode).



Syntax highlighting of the code listing isn't needed in your case.


No, I don't need syntax highlighting

My problem is solved using manual zero width spaces at the moment but 
I'd be interested to find a more structural solution.


Checking at the Context source code I would have thought that 
breakpoints were possible withing typing env. See


https://source.contextgarden.net/tex/context/base/mkiv/buff-ver.mkiv?search=typing#l51

It would be interesting to document on the wiki that behavior, which I 
can do later when my understanding is better.


The typing environment disables the breakpoint (and a few other) 
mechanism because they can lead to undesired
side effects but Hans suggestion to provide a hook which can be used to 
re-enable the feature, e.g.


     \startsetups [typing:mine]
         \setbreakpoints[compound]
     \stopsetups

     \setuptyping [CUSTOM] [setups=typing:mine]

The only flaw I can see in the suggestion is the use of the 
\everyinitializeverbatim register because it is used for
inline and display verbatim. A better place to add the option is 
\buff_verbatim_initialize_typing_two for \starttyping

and \buff_verbatim_initialize_type_two for \type.


ok

--

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

[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Wolfgang Schuster

Alex Leray schrieb am 17.08.2023 um 17:59:

Hi,

I think I need to use verbatim because I'm typesetting source code and 
I need it to be as verbatim as possible.


For the moment, I'm manually inserting zero-width spaces... seems to 
do the trick, although it's becoming unreadable :P


Which language do you have to typeset, maybe the scite module already 
supports it.
A real example rather than dummy text can be of help to give a proper 
solution.


Wolfgang

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


[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Alex Leray

Hi,

I think I need to use verbatim because I'm typesetting source code and I 
need it to be as verbatim as possible.


For the moment, I'm manually inserting zero-width spaces... seems to do 
the trick, although it's becoming unreadable :P


Thanks,

Alex


Le 17/08/23 à 17:22, Wolfgang Schuster a écrit :

Alex Leray schrieb am 17.08.2023 um 14:41:

Hi,

I'd like to break lines in verbatim on certain characters like "/".

I can do it for normal texte, but not inside typing environment.


Do you need the verbatim environment or is the lines-environment 
sufficient.


\setuppapersize[A7]
\setbreakpoints[compound]

\starttext

\startlines[style=mono]
1. Thisisthetruth:waste-not-want-not
2. Thisisthetruth:waste/not/want/not
3. Thisisthetruth:waste+not+want+not
4. Thisisthetruth:waste(not(want(not))
5. Thisisthetruth(waste)not)want)not
\stoplines

\stoptext

Wolfgang

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


--
Alexandre Leray
+32 487 947 030

Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
___
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
___

[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Wolfgang Schuster

Alex Leray schrieb am 17.08.2023 um 14:41:

Hi,

I'd like to break lines in verbatim on certain characters like "/".

I can do it for normal texte, but not inside typing environment.


Do you need the verbatim environment or is the lines-environment sufficient.

\setuppapersize[A7]
\setbreakpoints[compound]

\starttext

\startlines[style=mono]
1. Thisisthetruth:waste-not-want-not
2. Thisisthetruth:waste/not/want/not
3. Thisisthetruth:waste+not+want+not
4. Thisisthetruth:waste(not(want(not))
5. Thisisthetruth(waste)not)want)not
\stoplines

\stoptext

Wolfgang

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


[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Alex Leray

Thanks,

Unfortunatly, it doesn't work (no difference in output with or without 
the `setups` parameter)


I'm not up-to-date, Should I update? Here is my version.

mtx-context | current version: 2023.03.10 12:15

Many thanks

Le 17/08/23 à 16:32, Hans Hagen a écrit :

On 8/17/2023 2:41 PM, Alex Leray wrote:

Hi,

I'd like to break lines in verbatim on certain characters like "/".

I can do it for normal texte, but not inside typing environment.

Is there a way to achieve this?


For now do this:

   \appendtoks
  \usesetupsparameter\typingparameter
   \to \everyinitializeverbatim

and then

   \startsetups typing:mine
   \setbreakpoints[compound]
   \stopsetups

with

   \starttyping[lines=yes,setups=typing:mine]

I need Wolfgang to check it for possible interferences.

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 / 
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
___


--
Alexandre Leray
+32 487 947 030

Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
___
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
___

[NTG-context] Re: breakpoints in verbatim text

2023-08-17 Thread Hans Hagen

On 8/17/2023 2:41 PM, Alex Leray wrote:

Hi,

I'd like to break lines in verbatim on certain characters like "/".

I can do it for normal texte, but not inside typing environment.

Is there a way to achieve this?


For now do this:

  \appendtoks
 \usesetupsparameter\typingparameter
  \to \everyinitializeverbatim

and then

  \startsetups typing:mine
  \setbreakpoints[compound]
  \stopsetups

with

  \starttyping[lines=yes,setups=typing:mine]

I need Wolfgang to check it for possible interferences.

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 / 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
___