* [NTG-context] breakpoints in verbatim text
@ 2023-08-17 12:41 Alex Leray
2023-08-17 14:32 ` [NTG-context] " Hans Hagen
2023-08-17 15:22 ` Wolfgang Schuster
0 siblings, 2 replies; 7+ messages in thread
From: Alex Leray @ 2023-08-17 12:41 UTC (permalink / raw)
To: mailing list for ConTeXt users
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?
Below is my test code.
Thanks,
Alex
* * *
\setuppapersize[A7]
\setbreakpoints[compound]
\starttext
1. This is the truth: waste-not-want-not \par
2. This is the truth: waste/not/want/not \par
3. This is the truth: waste+not+want+not \par
4. This is the truth: waste(not(want(not)) \par
5. This is the truth: ((waste)not)want)not
\starttyping[lines=yes]
1. Thisisthetruth:waste-not-want-not \par
2. Thisisthetruth:waste/not/want/not \par
3. Thisisthetruth:waste+not+want+not \par
4. Thisisthetruth:waste(not(want(not)) \par
5. Thisisthetruth:((waste)not)want)not
\stoptyping
\stoptext
___________________________________________________________________________________
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] 7+ messages in thread
* [NTG-context] Re: breakpoints in verbatim text
2023-08-17 12:41 [NTG-context] breakpoints in verbatim text Alex Leray
@ 2023-08-17 14:32 ` Hans Hagen
2023-08-17 14:47 ` Alex Leray
2023-08-17 15:22 ` Wolfgang Schuster
1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2023-08-17 14:32 UTC (permalink / raw)
To: ntg-context, Wolfgang Schuster
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: breakpoints in verbatim text
2023-08-17 14:32 ` [NTG-context] " Hans Hagen
@ 2023-08-17 14:47 ` Alex Leray
0 siblings, 0 replies; 7+ messages in thread
From: Alex Leray @ 2023-08-17 14:47 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: breakpoints in verbatim text
2023-08-17 12:41 [NTG-context] breakpoints in verbatim text Alex Leray
2023-08-17 14:32 ` [NTG-context] " Hans Hagen
@ 2023-08-17 15:22 ` Wolfgang Schuster
2023-08-17 15:59 ` Alex Leray
1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2023-08-17 15:22 UTC (permalink / raw)
To: mailing list for ConTeXt users, Alex Leray
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: breakpoints in verbatim text
2023-08-17 15:22 ` Wolfgang Schuster
@ 2023-08-17 15:59 ` Alex Leray
2023-08-17 16:23 ` Wolfgang Schuster
0 siblings, 1 reply; 7+ messages in thread
From: Alex Leray @ 2023-08-17 15:59 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: breakpoints in verbatim text
2023-08-17 15:59 ` Alex Leray
@ 2023-08-17 16:23 ` Wolfgang Schuster
[not found] ` <7f05a67b-2e44-a590-0768-3c6dc23f5349@stdin.fr>
0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2023-08-17 16:23 UTC (permalink / raw)
To: mailing list for ConTeXt users, Alex Leray
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: breakpoints in verbatim text
[not found] ` <54f222a3-fbf7-e5dc-4dc7-71c4ddfc7d1d@gmail.com>
@ 2023-08-18 11:19 ` Hans Hagen
0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2023-08-18 11:19 UTC (permalink / raw)
To: Wolfgang Schuster, mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-08-18 11:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17 12:41 [NTG-context] breakpoints in verbatim text Alex Leray
2023-08-17 14:32 ` [NTG-context] " Hans Hagen
2023-08-17 14:47 ` Alex Leray
2023-08-17 15:22 ` Wolfgang Schuster
2023-08-17 15:59 ` Alex Leray
2023-08-17 16:23 ` Wolfgang Schuster
[not found] ` <7f05a67b-2e44-a590-0768-3c6dc23f5349@stdin.fr>
[not found] ` <58e3cc9b-9614-79e0-4a5f-6f72a4cf7fcf@gmail.com>
[not found] ` <aa70b518-c14f-ab41-681c-0fe4de737a81@stdin.fr>
[not found] ` <54f222a3-fbf7-e5dc-4dc7-71c4ddfc7d1d@gmail.com>
2023-08-18 11:19 ` 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).