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
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 -----------------------------------------------------------------
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
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
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
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
participants (3)
-
Alex Leray
-
Hans Hagen
-
Wolfgang Schuster