ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Typing with text wrapping
@ 2023-08-05 15:36 Alex Leray
  2023-08-07  7:00 ` [NTG-context] " Hans Hagen via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Leray @ 2023-08-05 15:36 UTC (permalink / raw)
  To: ntg-context

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!
___________________________________________________________________________________
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] 2+ messages in thread

* [NTG-context] Re: Typing with text wrapping
  2023-08-05 15:36 [NTG-context] Typing with text wrapping Alex Leray
@ 2023-08-07  7:00 ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen via ntg-context @ 2023-08-07  7:00 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

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

___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2023-08-07  7:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-05 15:36 [NTG-context] Typing with text wrapping Alex Leray
2023-08-07  7:00 ` [NTG-context] " Hans Hagen 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).