Hi all, I'm having another issue with my project. I'm trying to typeset fragments of HTML, including tabs and (repeating) spaces. I'd like to have my snippet with some words in bold. So I used `typing` together with the `escape` option. But now, I'd like my snippets to wrap when the lines are too long. The snippets can un over several pages so that recipe[^1] doesn't work for me. [^1]: https://www.contextgarden.net/Verbatim_with_line_breaks> Is there a way to do that? Here is my code: ``` \definepapersize[page][width=105mm,height=148.5mm] \setuppapersize[page, portrait][page, portrait] \definehead[poem][section] \setuphead[poem][] \definetyping[CUSTOM] \setuptyping[CUSTOM][escape={[[,]]}] \starttext \showgrid \startpoem[title={My title}][] \startCUSTOM[] <!-- [[\bf you = 'me']] browserName = navigator.appName; browserVer = parseInt(navigator.appVersion); if (browserName == "Microsoft Internet Explorer" && browserVer <= 3) { [[\bf you = 'crash']] } var y = 0; function glijden() { if ( [[\bf you == 'me']] ) { window.scroll(0,y); y = y + 1; if ( y >= 400000 ) { y = 0 }; setTimeout('glijden()', 50); } } // --> \stopCUSTOM \stoppoem \stoptext ``` Thanks!
On 8/5/2023 5:36 PM, Alex Leray wrote:
Hi all,
I'm having another issue with my project. I'm trying to typeset fragments of HTML, including tabs and (repeating) spaces. I'd like to have my snippet with some words in bold.
So I used `typing` together with the `escape` option.
But now, I'd like my snippets to wrap when the lines are too long. The snippets can un over several pages so that recipe[^1] doesn't work for me.
[^1]: https://www.contextgarden.net/Verbatim_with_line_breaks>
Is there a way to do that? it will wrap but there is nothing to break here, i'd use s smaller font
\setuptyping[CUSTOM][escape={[[,]]},style=\small\small\tt] ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Alex Leray
-
Hans Hagen