ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Verbatim Text with Embedded Formatting Commands (MkIV)
@ 2009-12-13 11:26 Tad Ashlock
  2009-12-13 12:18 ` Wolfgang Schuster
  2009-12-30 22:59 ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Tad Ashlock @ 2009-12-13 11:26 UTC (permalink / raw)
  To: ntg-context

As noted at 
http://wiki.contextgarden.net/Verbatim_text#Embedded_formatting_commands, 
the embedded formatting commands in verbatim text don't work in MkIV.

Are there any plans to fix this capability soon?  I'm planning on 
working on a project on over the holiday break that will need it.

I'm not pushing to change your priorities.  If it's not going to be 
fixed soon, then I'll implement a simple verbatim module that supports 
embedded formatting commands that will do until the official module 
works.  I just don't want to waste that effort if verbatim is going to 
be fixed soon anyway.

Thanks,
Tad Ashlock
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verbatim Text with Embedded Formatting Commands (MkIV)
  2009-12-13 11:26 Verbatim Text with Embedded Formatting Commands (MkIV) Tad Ashlock
@ 2009-12-13 12:18 ` Wolfgang Schuster
  2009-12-30 22:59 ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2009-12-13 12:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 13.12.2009 um 12:26 schrieb Tad Ashlock:

> As noted at http://wiki.contextgarden.net/Verbatim_text#Embedded_formatting_commands, the embedded formatting commands in verbatim text don't work in MkIV.
> 
> Are there any plans to fix this capability soon?  I'm planning on working on a project on over the holiday break that will need it.
> 
> I'm not pushing to change your priorities.  If it's not going to be fixed soon, then I'll implement a simple verbatim module that supports embedded formatting commands that will do until the official module works.  I just don't want to waste that effort if verbatim is going to be fixed soon anyway.

When you don't need syntax highlighting you can use \startlines

\setuplines[space=on]

\startlines\tt
IF A==B THEN
  do this
ELSE
  do that
END
\stoplines

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verbatim Text with Embedded Formatting Commands (MkIV)
  2009-12-13 11:26 Verbatim Text with Embedded Formatting Commands (MkIV) Tad Ashlock
  2009-12-13 12:18 ` Wolfgang Schuster
@ 2009-12-30 22:59 ` Hans Hagen
  2010-01-08 23:52   ` Tad Ashlock
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2009-12-30 22:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Tad Ashlock

On 13-12-2009 12:26, Tad Ashlock wrote:
> As noted at
> http://wiki.contextgarden.net/Verbatim_text#Embedded_formatting_commands, the
> embedded formatting commands in verbatim text don't work in MkIV.
>
> Are there any plans to fix this capability soon? I'm planning on working
> on a project on over the holiday break that will need it.

the beta has:

\starttext

\setuptyping[TEX][escape=yes]

\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before \after
\stopTEX

\setuptyping[TEX][escape={[[,]]}]

\startTEX
[[\em sometex]]
[[\em sometex]] \after
\before [[\em sometex]]
\before [[\em sometex]] \after
\before [[\em sometex]] \inbetween [[\em sometex]] \after
\before \after
\stopTEX

\setuptyping[TEX][escape=//]

\startTEX
//\em sometex
\before //\em sometex
\stopTEX

\stoptext

so, in mkiv option-commands is gone and escape no longer is an escape 
character but a condition (range or start)

please wikify this

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verbatim Text with Embedded Formatting Commands (MkIV)
  2009-12-30 22:59 ` Hans Hagen
@ 2010-01-08 23:52   ` Tad Ashlock
  2010-01-11 12:32     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Tad Ashlock @ 2010-01-08 23:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hans Hagen wrote:
> On 13-12-2009 12:26, Tad Ashlock wrote:
>> As noted at
>> http://wiki.contextgarden.net/Verbatim_text#Embedded_formatting_commands, 
>> the
>> embedded formatting commands in verbatim text don't work in MkIV.
>>
>> Are there any plans to fix this capability soon? I'm planning on working
>> on a project on over the holiday break that will need it.
>
> the beta has:
>
> \starttext
>
> \setuptyping[TEX][escape=yes]
>
> \startTEX
> /BTEX\em sometex/ETEX
> /BTEX\em sometex/ETEX \after
> \before /BTEX\em sometex/ETEX
> \before /BTEX\em sometex/ETEX \after
> \before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
> \before \after
> \stopTEX
>
> \setuptyping[TEX][escape={[[,]]}]
>
> \startTEX
> [[\em sometex]]
> [[\em sometex]] \after
> \before [[\em sometex]]
> \before [[\em sometex]] \after
> \before [[\em sometex]] \inbetween [[\em sometex]] \after
> \before \after
> \stopTEX
>
> \setuptyping[TEX][escape=//]
>
> \startTEX
> //\em sometex
> \before //\em sometex
> \stopTEX
>
> \stoptext
>
> so, in mkiv option-commands is gone and escape no longer is an escape 
> character but a condition (range or start)
>
> please wikify this
>
> Hans
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
>

Ok, I'm (finally) getting back to this subject.

Is this supposed to work for any verbatim environment besides 
\startTEX...\stopTEX?  I can't get it to work for 'C' or even basic 
'typing'.  They don't pick up on the embedded formatting, everything is 
typeset verbatim.

Tad

PS: Here are my test cases:

============================
\definetyping[C][option=C]
\setuptyping[C][escape=yes]
\starttext
\startC
#include <stdio.h>
int main(){
    return 0;
    /BTEX{\em unreachedCode;}/ETEX
}
\stopC
\stoptext
============================

============================
\starttext
\setuptyping[escape=yes]
\starttyping
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before \after
\stoptyping
\stoptext
============================

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verbatim Text with Embedded Formatting Commands (MkIV)
  2010-01-08 23:52   ` Tad Ashlock
@ 2010-01-11 12:32     ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2010-01-11 12:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Tad Ashlock

On 9-1-2010 0:52, Tad Ashlock wrote:

 > ...

you can try the beta with

\enabletrackers[buffers.visualize]

\starttext

\definetyping[C] % [option=C]
\setuptyping[C][escape=yes]

\startC
#include <stdio.h>
int main(){
    return 0;
    /BTEX{\em unreachedCode;}/ETEX
}
\stopC

\setuptyping[escape=yes]

\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before \after
\stopTEX

\setuptyping[TEX][escape=no]

\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before \after
\stopTEX

\stoptext



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verbatim Text with Embedded Formatting Commands (MkIV)
@ 2010-01-29 23:15 Tad Ashlock
  0 siblings, 0 replies; 6+ messages in thread
From: Tad Ashlock @ 2010-01-29 23:15 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

[-- Attachment #1: Type: text/plain, Size: 2382 bytes --]

Hans Hagen wrote:
> On 9-1-2010 0:52, Tad Ashlock wrote:
>
> > ...
>
> you can try the beta with
>
> \enabletrackers[buffers.visualize]
>
> \starttext
>
> \definetyping[C] % [option=C]
> \setuptyping[C][escape=yes]
>
> \startC
> #include <stdio.h>
> int main(){
>    return 0;
>    /BTEX{\em unreachedCode;}/ETEX
> }
> \stopC
>
> \setuptyping[escape=yes]
>
> \startTEX
> /BTEX\em sometex/ETEX
> /BTEX\em sometex/ETEX \after
> \before /BTEX\em sometex/ETEX
> \before /BTEX\em sometex/ETEX \after
> \before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
> \before \after
> \stopTEX
>
> \setuptyping[TEX][escape=no]
>
> \startTEX
> /BTEX\em sometex/ETEX
> /BTEX\em sometex/ETEX \after
> \before /BTEX\em sometex/ETEX
> \before /BTEX\em sometex/ETEX \after
> \before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
> \before \after
> \stopTEX
>
> \stoptext


I did try the beta with that example and it worked, of course.  But if
I add a second \startC ... \stopC section, then it breaks.  For
example, this code (also attached as tadtest0.tex):

============================================================
\enabletrackers[buffers.visualize]

\starttext

\definetyping[C] % [option=C]
\setuptyping[C][escape=yes]

\startC
#include <stdio.h>
int main(){
    return 0;
    /BTEX{\em unreachedCode;}/ETEX
}
\stopC

\startC
printf("The second C segment doesn't work.\n");
\stopC

\stoptext
============================================================

Produces this output:

============================================================
systems         : begin file test.tex at line 3
!buffers        : mapping 'c' visualizer onto 'typing'
!buffers        : setting escape range for visualizer 'C' to /BTEX -> /ETEX
! LuaTeX error ...text/tex/texmf-context/tex/context/base/buff-ini.lua:705:
attempt to index local 'visualizer' (a number value)
stack traceback:
    ...text/tex/texmf-context/tex/context/base/buff-ini.lua:705: in
function 'set_escape'
    <main ctx instance>:1: in main chunk.
\setupcommandsintype ...rameter \c!escape \!!es )}

\doinitializeverbatim ...\everyinitializeverbatim
                                                  \relax
\nododowithbuffer ->\egroup \doinitializeverbatim
                                                  \beginofverbatimlines \ctx...
l.18 \stopC
============================================================

Tad

[-- Attachment #2: tadtest0.tex --]
[-- Type: application/x-tex, Size: 299 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-29 23:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-13 11:26 Verbatim Text with Embedded Formatting Commands (MkIV) Tad Ashlock
2009-12-13 12:18 ` Wolfgang Schuster
2009-12-30 22:59 ` Hans Hagen
2010-01-08 23:52   ` Tad Ashlock
2010-01-11 12:32     ` Hans Hagen
2010-01-29 23:15 Tad Ashlock

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